1- // Note: "common.gradle" in the root project contains additional initialization
2- // for this project. This initialization is applied in the "build.gradle"
3- // of the root project.
4-
5- plugins {
6- id ' java-library'
7- id ' maven-publish'
8- id ' signing'
9- }
10-
11- description = ' A NiftyGUI library for jMonkeyEngine.'
12- ext {
13- artifact = ' jme3-utilities-nifty'
14- version = jme3utilitiesniftyVersion
15- baseName = " ${ artifact} -${ version} " // for POM and class JAR
16- }
17-
18- jar { archiveBaseName = project. ext. baseName }
19- javadocJar { archiveBaseName = project. ext. baseName }
20- sourcesJar { archiveBaseName = project. ext. baseName }
21-
22- dependencies {
23- api ' com.github.nifty-gui:nifty:1.4.3'
24- api ' com.github.nifty-gui:nifty-default-controls:1.4.3'
25-
26- // api 'com.github.stephengold:jme3-utilities-ui:' + jme3utilitiesuiVersion
27- api project(' :ui' )
28- }
29-
30- // publishing tasks
31-
32- build. dependsOn(' pom' , ' pomAsc' )
33- task(' pom' , type : Copy ) {
34- dependsOn ' generatePomFileForMavenPublication'
35- from " ${ buildDir} /publications/maven/pom-default.xml"
36- into " ${ buildDir} /libs"
37- rename ' pom-default.xml' , baseName + ' .pom'
38- }
39- task(' pomAsc' , type : Copy ) {
40- dependsOn ' signMavenPublication'
41- from " ${ buildDir} /publications/maven/pom-default.xml.asc"
42- into " ${ buildDir} /libs"
43- rename ' pom-default.xml.asc' , baseName + ' .pom.asc'
44- }
45-
46- publishToMavenLocal. doLast {
47- println ' published to ' + baseName
48- }
49-
50- publishing {
51- publications {
52- maven(MavenPublication ) {
53- artifact javadocJar
54- artifact sourcesJar
55- artifactId artifact
56- from components. java
57- pom {
58- description = project. description
59- developers {
60- developer {
61- 62- name = ' Stephen Gold'
63- }
64- }
65- licenses {
66- license {
67- distribution = ' repo'
68- name = ' New BSD (3-clause) License'
69- url = ' https://opensource.org/licenses/BSD-3-Clause'
70- }
71- }
72- name = ' com.github.stephengold:' + artifact
73- scm {
74- connection = ' scm:git:git://github.com/stephengold/jme3-utilities.git'
75- developerConnection = ' scm:git:ssh://github.com:stephengold/jme3-utilities.git'
76- url = ' https://github.com/stephengold/jme3-utilities/tree/master'
77- }
78- url = ' https://github.com/stephengold/jme3-utilities'
79- }
80- suppressPomMetadataWarningsFor(" apiElements" ) // Gradle issue #16555
81- version project. ext. version
82- }
83- }
84- repositories {
85- maven {
86- credentials {
87- username = project. hasProperty(' ossrhUsername' ) ? ossrhUsername : ' Unknown user'
88- password = project. hasProperty(' ossrhPassword' ) ? ossrhPassword : ' Unknown password'
89- }
90- name = ' OSSRH'
91- url = ' https://oss.sonatype.org/service/local/staging/deploy/maven2'
92- }
93- }
94- }
95- generateMetadataFileForMavenPublication. dependsOn(' pom' )
96-
97- // signing tasks
98-
99- signing {
100- sign publishing. publications. maven
101- }
102- tasks. withType(Sign ) {
103- onlyIf { gradle. rootProject. hasProperty(' signing.keyId' ) }
1+ // Note: "common.gradle" in the root project contains additional initialization
2+ // for this project. This initialization is applied in the "build.gradle"
3+ // of the root project.
4+
5+ plugins {
6+ id ' java-library'
7+ id ' maven-publish'
8+ id ' signing'
9+ }
10+
11+ description = ' A NiftyGUI library for jMonkeyEngine.'
12+ ext {
13+ artifact = ' jme3-utilities-nifty'
14+ version = jme3utilitiesniftyVersion
15+ baseName = " ${ artifact} -${ version} " // for POM and class JAR
16+ }
17+
18+ jar { archiveBaseName = project. ext. baseName }
19+ javadocJar { archiveBaseName = project. ext. baseName }
20+ sourcesJar { archiveBaseName = project. ext. baseName }
21+
22+ dependencies {
23+ api ' com.github.nifty-gui:nifty:1.4.3'
24+ api ' com.github.nifty-gui:nifty-default-controls:1.4.3'
25+
26+ api ' com.github.stephengold:jme3-utilities-ui:' + jme3utilitiesuiVersion
27+ // api project(':ui')
28+ }
29+
30+ // publishing tasks
31+
32+ build. dependsOn(' pom' , ' pomAsc' )
33+ task(' pom' , type : Copy ) {
34+ dependsOn ' generatePomFileForMavenPublication'
35+ from " ${ buildDir} /publications/maven/pom-default.xml"
36+ into " ${ buildDir} /libs"
37+ rename ' pom-default.xml' , baseName + ' .pom'
38+ }
39+ task(' pomAsc' , type : Copy ) {
40+ dependsOn ' signMavenPublication'
41+ from " ${ buildDir} /publications/maven/pom-default.xml.asc"
42+ into " ${ buildDir} /libs"
43+ rename ' pom-default.xml.asc' , baseName + ' .pom.asc'
44+ }
45+
46+ publishToMavenLocal. doLast {
47+ println ' published to ' + baseName
48+ }
49+
50+ publishing {
51+ publications {
52+ maven(MavenPublication ) {
53+ artifact javadocJar
54+ artifact sourcesJar
55+ artifactId artifact
56+ from components. java
57+ pom {
58+ description = project. description
59+ developers {
60+ developer {
61+ 62+ name = ' Stephen Gold'
63+ }
64+ }
65+ licenses {
66+ license {
67+ distribution = ' repo'
68+ name = ' New BSD (3-clause) License'
69+ url = ' https://opensource.org/licenses/BSD-3-Clause'
70+ }
71+ }
72+ name = ' com.github.stephengold:' + artifact
73+ scm {
74+ connection = ' scm:git:git://github.com/stephengold/jme3-utilities.git'
75+ developerConnection = ' scm:git:ssh://github.com:stephengold/jme3-utilities.git'
76+ url = ' https://github.com/stephengold/jme3-utilities/tree/master'
77+ }
78+ url = ' https://github.com/stephengold/jme3-utilities'
79+ }
80+ suppressPomMetadataWarningsFor(" apiElements" ) // Gradle issue #16555
81+ version project. ext. version
82+ }
83+ }
84+ repositories {
85+ maven {
86+ credentials {
87+ username = project. hasProperty(' ossrhUsername' ) ? ossrhUsername : ' Unknown user'
88+ password = project. hasProperty(' ossrhPassword' ) ? ossrhPassword : ' Unknown password'
89+ }
90+ name = ' OSSRH'
91+ url = ' https://oss.sonatype.org/service/local/staging/deploy/maven2'
92+ }
93+ }
94+ }
95+ generateMetadataFileForMavenPublication. dependsOn(' pom' )
96+
97+ // signing tasks
98+
99+ signing {
100+ sign publishing. publications. maven
101+ }
102+ tasks. withType(Sign ) {
103+ onlyIf { gradle. rootProject. hasProperty(' signing.keyId' ) }
104104}
0 commit comments