@@ -56,16 +56,17 @@ tasks.create("v") {
5656 }
5757}
5858
59- val fireplaceModules = subprojects.filter { it.name != projects.fireplaceApp.name }
59+ val fireplaceModules = subprojects - project( " :fireplace-app " ) - project( " :fireplace-swt-experiment " )
6060configure(fireplaceModules) {
6161 apply (plugin = " java-library" ) // needed to get the java component
6262 apply (plugin = " maven-publish" )
6363 apply (plugin = " signing" )
6464 apply (plugin = " biz.aQute.bnd.builder" )
6565
66- // configure<JavaPluginExtension> {
67- // withSourcesJar()
68- // }
66+ configure<JavaPluginExtension > {
67+ withJavadocJar()
68+ withSourcesJar()
69+ }
6970
7071 repositories {
7172 mavenCentral()
@@ -84,15 +85,6 @@ configure(fireplaceModules) {
8485 metaInf.with (licenseSpec)
8586 }
8687
87- // todo replace by java.withSourcesJar()
88- val sourcesJar by registering(Jar ::class ) {
89- archiveClassifier.set(" sources" )
90- from(
91- // take extension from project instance
92- project.the<SourceSetContainer >().named(" main" ).get().allJava
93- )
94- }
95-
9688 val jar = named<Jar >(" jar" ) {
9789 bundle {
9890 val version by archiveVersion
@@ -138,9 +130,7 @@ configure(fireplaceModules) {
138130 publications {
139131 create<MavenPublication >(" mavenJava" ) {
140132 from(components[" java" ])
141- artifact(tasks[" sourcesJar" ])
142- groupId = project.group.toString()
143- artifactId = project.name
133+
144134 // OSSRH enforces the `-SNAPSHOT` suffix on snapshot repository
145135 // https://central.sonatype.org/faq/400-error/#question
146136 version = when {
@@ -149,19 +139,17 @@ configure(fireplaceModules) {
149139 }
150140 project.extra[" publishingVersion" ] = version
151141
152- afterEvaluate {
153- description = project.description
154- }
155-
156142 val gitRepo = " https://github.com/bric3/fireplace"
157143 pom {
144+ name.set(project.name)
158145 url.set(gitRepo)
159146
160147 scm {
161148 connection.set(" scm:git:${gitRepo} .git" )
162149 developerConnection.set(" scm:git:${gitRepo} .git" )
163150 url.set(gitRepo)
164151 }
152+
165153 issueManagement {
166154 system.set(" GitHub" )
167155 url.set(" https://github.com/spring-projects/spring-framework/issues" )
@@ -174,7 +162,23 @@ configure(fireplaceModules) {
174162 url.set(" https://www.mozilla.org/en-US/MPL/2.0/" )
175163 }
176164 }
165+
166+ developers {
167+ developer {
168+ id.set(" bric3" )
169+ name.set(" Brice Dutheil" )
170+ email.set(" brice.dutheil@gmail.com" )
171+ }
172+ }
173+ }
174+ // subprojects properties (like description) will be available
175+ // after they have been configured
176+ afterEvaluate {
177+ pom {
178+ description.set(project.description)
179+ }
177180 }
181+
178182 }
179183 }
180184 repositories {
@@ -195,7 +199,6 @@ configure(fireplaceModules) {
195199 url = uri(" ${rootProject.buildDir} /publishing-repository" )
196200 }
197201 project.extra[" publishingRepositoryUrl" ] = url
198-
199202 }
200203 }
201204 }
0 commit comments