11plugins {
22 id(" com.diffplug.spotless" ) version " 6.13.0"
3+ id(" org.jreleaser" ) version " 1.19.0"
34}
45
6+ ext {
7+ projectGroup = ' com.scalar-labs'
8+ projectVersion = ' 3.10.3-SNAPSHOT'
9+ }
10+
11+ group = projectGroup
12+ version = projectVersion
13+
514subprojects {
615 apply plugin : ' java'
716 apply plugin : ' eclipse'
@@ -10,7 +19,8 @@ subprojects {
1019 apply plugin : ' java-library-distribution'
1120 apply plugin : ' com.diffplug.spotless'
1221
13- project. version = ' 3.10.3-SNAPSHOT'
22+ group = projectGroup
23+ project. version = projectVersion
1424
1525 ext {
1626 grpcVersion = ' 1.68.1'
@@ -78,8 +88,6 @@ subprojects {
7888 sourceCompatibility = 1.8
7989 targetCompatibility = 1.8
8090
81- group = " com.scalar-labs"
82-
8391 distZip {
8492 archiveFileName = " ${ project.name} .zip"
8593 duplicatesStrategy = DuplicatesStrategy . EXCLUDE
@@ -106,3 +114,39 @@ subprojects {
106114 executable " ${ rootDir} /scripts/docker/lint.sh"
107115 }
108116}
117+
118+ jreleaser {
119+ gitRootSearch = true
120+
121+ signing {
122+ active = ' ALWAYS'
123+ armored = true
124+ }
125+
126+ deploy {
127+ maven {
128+ def stagingRepositories = [' client/build/staging-deploy' ,
129+ ' common/build/staging-deploy' ,
130+ ' ledger/build/staging-deploy' ,
131+ ' rpc/build/staging-deploy' ]
132+ mavenCentral {
133+ ' release-deploy' {
134+ active = ' RELEASE'
135+ url = ' https://central.sonatype.com/api/v1/publisher'
136+ stagingRepositories. each { stagingRepository(it) }
137+ }
138+ }
139+ nexus2 {
140+ ' snapshot-deploy' {
141+ active = ' SNAPSHOT'
142+ snapshotUrl = ' https://central.sonatype.com/repository/maven-snapshots/'
143+ applyMavenCentralRules = true
144+ snapshotSupported = true
145+ closeRepository = true
146+ releaseRepository = true
147+ stagingRepositories. each { stagingRepository(it) }
148+ }
149+ }
150+ }
151+ }
152+ }
0 commit comments