@@ -21,7 +21,6 @@ plugins {
2121 id ' com.github.jk1.dependency-license-report' version ' 2.1'
2222 id ' io.spring.dependency-management' version ' 1.1.0'
2323 id ' net.ltgt.errorprone' version ' 3.0.1' apply false
24- id ' maven-publish'
2524 id ' org.jreleaser' version ' 1.16.0'
2625 id ' java'
2726 id ' application'
@@ -50,19 +49,21 @@ allprojects {
5049 group = project. group
5150 version = project. version
5251 apply plugin : ' java-library'
53- apply plugin : ' java-test-fixtures'
5452 apply plugin : ' io.spring.dependency-management'
5553 apply plugin : ' net.ltgt.errorprone'
56- apply plugin : ' maven-publish'
5754 apply from : " ${ rootDir} /gradle/versions.gradle"
58-
5955 version = rootProject. version
6056
6157 java {
6258 withSourcesJar()
6359 withJavadocJar()
6460 }
6561
62+ test {
63+ // set a runtime shomei version for tests not executing from a jar
64+ systemProperty " shomei.version" , project. version
65+ }
66+
6667 sourceCompatibility = ' 21'
6768 targetCompatibility = ' 21'
6869
@@ -195,50 +196,53 @@ def groupVal = project.findProperty("groupVal") ?: 'io.consensys.protocols.shome
195196subprojects {
196197
197198 apply plugin : ' maven-publish'
199+ publishing {
200+ publications {
201+ mavenJava(MavenPublication ) {
202+ versionMapping {
203+ allVariants {
204+ fromResolutionResult()
205+ }
206+ }
198207
199- afterEvaluate { project ->
200- publishing {
201- publications {
202- create(" mavenJava" , MavenPublication ) {
203- from components. java
204- artifactId = project. name == ' shomei' ? ' shomei' : " shomei-${ project.name} "
205- groupId = groupVal
206- version = project. version. toString()
207- suppressPomMetadataWarningsFor(" testFixturesApiElements" )
208- suppressPomMetadataWarningsFor(" testFixturesRuntimeElements" )
209-
210- pom {
211- name. set(" Shomei module: ${ project.path} " )
212- description. set(" Module ${ project.name} of shomei" )
213- url. set(" https://github.com/consensys/shomei" )
214- licenses {
215- license {
216- name. set(" Apache-2.0" )
217- url. set(" https://www.apache.org/licenses/LICENSE-2.0" )
218- }
208+ from components. java
209+ artifactId = project. name == ' shomei' ? ' shomei' : " shomei-${ project.name} "
210+ groupId = groupVal
211+ version = project. version. toString()
212+ suppressPomMetadataWarningsFor(" testFixturesApiElements" )
213+ suppressPomMetadataWarningsFor(" testFixturesRuntimeElements" )
214+
215+ pom {
216+ name. set(" Shomei module: ${ project.path} " )
217+ description. set(" Module ${ project.name} of shomei" )
218+ url. set(" https://github.com/consensys/shomei" )
219+ licenses {
220+ license {
221+ name. set(" Apache-2.0" )
222+ url. set(" https://www.apache.org/licenses/LICENSE-2.0" )
219223 }
220- scm {
221- connection . set( " scm:git:https://github.com/consensys/shomei.git " )
222- developerConnection . set(" scm:git:ssh ://git@ github.com: consensys/shomei.git" )
223- url . set(" https:// github.com/ consensys/shomei" )
224- }
225- developers {
226- developer {
227- id . set( " consensys " )
228- name . set(" Protocols Team " )
229- email . set(" devops@consensys.net " )
230- }
224+ }
225+ scm {
226+ connection . set(" scm:git:https ://github.com/ consensys/shomei.git" )
227+ developerConnection . set(" scm:git:ssh://git@ github.com: consensys/shomei.git " )
228+ url . set( " https://github.com/consensys/shomei " )
229+ }
230+ developers {
231+ developer {
232+ id . set(" consensys " )
233+ name . set(" Protocols Team " )
234+ email . set( " devops@consensys.net " )
231235 }
232236 }
233237 }
234238 }
239+ }
235240
236- repositories {
237- // publish to a staging directory for jreleaser to release from:
238- // ./gradlew publish
239- maven {
240- url = rootProject. layout. buildDirectory. dir(" staging-deploy" )
241- }
241+ repositories {
242+ // publish to a staging directory for jreleaser to release from:
243+ // ./gradlew publish
244+ maven {
245+ url = rootProject. layout. buildDirectory. dir(" staging-deploy" )
242246 }
243247 }
244248 }
@@ -297,7 +301,7 @@ tasks.all { t ->
297301jar { enabled = false }
298302
299303dependencies {
300- implementation project(' :shomei' )
304+ // implementation project(':shomei')
301305 errorprone ' com.google.errorprone:error_prone_core'
302306}
303307
0 commit comments