-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Matt Domsch <[email protected]> Prepare gradle for publishing Signed-off-by: Matt Domsch <[email protected]>
- Loading branch information
1 parent
9c10830
commit 8c4f289
Showing
2 changed files
with
82 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
/* | ||
* This file was generated by the Gradle 'init' task. | ||
* | ||
* This generated file contains a sample Java project to get you started. | ||
* For more details take a look at the Java Quickstart chapter in the Gradle | ||
* User Manual available at https://docs.gradle.org/5.2.1/userguide/tutorial_java_projects.html | ||
*/ | ||
|
||
plugins { | ||
// Apply the java plugin to add support for Java | ||
id 'java-library' | ||
id 'java-library-distribution' | ||
id 'maven-publish' | ||
id 'signing' | ||
} | ||
|
||
version = '0.2.0-SNAPSHOT' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
version = '0.1.0' | ||
|
||
jar { | ||
manifest { | ||
attributes('Implementation-Title': project.name, | ||
|
@@ -28,7 +22,7 @@ jar { | |
|
||
distributions { | ||
main { | ||
baseName = 'fastfed-java-sdk' | ||
baseName = 'openid-fastfed-sdk' | ||
contents { | ||
from 'src/main/resources/' | ||
into "config" | ||
|
@@ -67,4 +61,79 @@ allprojects { | |
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" | ||
} | ||
} | ||
} | ||
} | ||
|
||
java { | ||
modularity.inferModulePath = true | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
javadoc { | ||
if (JavaVersion.current().isJava9Compatible()) { | ||
options.addBooleanOption('html5', true) | ||
} | ||
} | ||
|
||
ext.isReleaseVersion = !version.endsWith("SNAPSHOT") | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
from components.java | ||
pom { | ||
name = 'openid-fastfed-sdk' | ||
description = 'OpenID Fast Federation SDK for Java' | ||
url = 'http://github.com/sailpoint-oss/fastfed-sdk' | ||
|
||
licenses { | ||
license { | ||
name = 'MIT' | ||
url = 'https://opensource.org/licenses/MIT' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'brian-rose-sp' | ||
name = 'Brian Rose' | ||
email = '[email protected]' | ||
} | ||
developer { | ||
id = 'matt-domsch-sp' | ||
name = 'Matt Domsch' | ||
email = '[email protected]' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:git://github.com/sailpoint-oss/fastfed-sdk.git' | ||
developerConnection = 'scm:git:ssh://github.com/sailpoint-oss/fastfed-sdk.git' | ||
url = 'https://github.com/sailpoint-oss/fastfed-sdk/' | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
name = 'myRepo' | ||
url = "file://${buildDir}/repo" | ||
} | ||
maven { | ||
def releaseRepo = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
def snapshotRepo = "https://s01.oss.sonatype.org/content/repositories/snapshots/" | ||
url = isReleaseVersion ? releaseRepo : snapshotRepo | ||
credentials { | ||
username = project.hasProperty('ossrhUsername') ? ossrhUsername : "Unknown user" | ||
password = project.hasProperty('ossrhPassword') ? ossrhPassword : "Unknown password" | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
useGpgCmd() | ||
sign publishing.publications.maven | ||
} | ||
|
||
group = 'com.sailpoint' | ||
sourceCompatibility = 9; | ||
targetCompatibility = 9; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters