File tree Expand file tree Collapse file tree 13 files changed +76
-80
lines changed Expand file tree Collapse file tree 13 files changed +76
-80
lines changed Original file line number Diff line number Diff line change @@ -32,13 +32,13 @@ jobs:
3232 - name : Grant execute permission for gradlew
3333 run : chmod +x gradlew
3434 - name : Build with Gradle
35- run : ./gradlew clean build
36- - name : Publish Packages to Bintray
37- run : ./gradlew -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" - Pversion="${githubRef#refs/tags/}" -PbuildNumber="${buildNumber}" bintrayUpload
35+ run : ./gradlew clean build -x test
36+ - name : Publish Packages to Sonotype
37+ run : ./gradlew -Pversion="${githubRef#refs/tags/}" -PbuildNumber="${buildNumber}" sign publishMavenPublicationToSonatypeRepository
3838 env :
39- bintrayUser : ${{ secrets.bintrayUser }}
40- bintrayKey : ${{ secrets.bintrayKey }}
41- sonatypeUsername : ${{ secrets.sonatypeUsername }}
42- sonatypePassword : ${{ secrets.sonatypePassword }}
4339 githubRef : ${{ github.ref }}
44- buildNumber : ${{ github.run_number }}
40+ buildNumber : ${{ github.run_number }}
41+ ORG_GRADLE_PROJECT_signingKey : ${{secrets.signingKey}}
42+ ORG_GRADLE_PROJECT_signingPassword : ${{secrets.signingPassword}}
43+ ORG_GRADLE_PROJECT_sonatypeUsername : ${{secrets.sonatypeUsername}}
44+ ORG_GRADLE_PROJECT_sonatypePassword : ${{secrets.sonatypePassword}}
Original file line number Diff line number Diff line change 1717plugins {
1818 id ' com.github.sherter.google-java-format' version ' 0.9' apply false
1919 id ' com.jfrog.artifactory' version ' 4.21.0' apply false
20- id ' com.jfrog.bintray' version ' 1.8.5' apply false
2120 id ' me.champeau.jmh' version ' 0.6.4' apply false
2221 id ' io.spring.dependency-management' version ' 1.0.11.RELEASE' apply false
2322 id ' io.morethan.jmhreport' version ' 0.9.0' apply false
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ subprojects {
2+
3+ plugins. withType(JavaLibraryPlugin ) {
4+ plugins. withType(MavenPublishPlugin ) {
5+ publishing {
6+ repositories {
7+ maven {
8+ name = " GitHubPackages"
9+ url = uri(" https://maven.pkg.github.com/rsocket/rsocket-java" )
10+ credentials {
11+ username = project. findProperty(" gpr.user" ) ?: System . getenv(" USERNAME" )
12+ password = project. findProperty(" gpr.key" ) ?: System . getenv(" TOKEN" )
13+ }
14+ }
15+ }
16+ }
17+
18+ tasks. named(" publish" ). configure {
19+ onlyIf { System . getenv(' SKIP_RELEASE' ) != " true" }
20+ }
21+ }
22+ }
23+ }
Original file line number Diff line number Diff line change 11apply from : " ${ rootDir} /gradle/artifactory.gradle"
2- apply from : " ${ rootDir} /gradle/bintray.gradle"
2+ apply from : " ${ rootDir} /gradle/github-pkg.gradle"
3+ apply from : " ${ rootDir} /gradle/sonotype.gradle"
34
45subprojects {
56 plugins. withType(MavenPublishPlugin ) {
Original file line number Diff line number Diff line change 1+ subprojects {
2+ if (project. hasProperty(' sonatypeUsername' ) && project. hasProperty(' sonatypePassword' )) {
3+ plugins. withType(JavaLibraryPlugin ) {
4+ plugins. withType(MavenPublishPlugin ) {
5+ plugins. withType(SigningPlugin ) {
6+
7+ signing {
8+ // requiring signature if there is a publish task that is not to MavenLocal
9+ required { gradle. taskGraph. allTasks. any { it. name. toLowerCase(). contains(" publish" ) && ! it. name. contains(" MavenLocal" ) } }
10+ def signingKey = project. findProperty(" signingKey" )
11+ def signingPassword = project. findProperty(" signingPassword" )
12+
13+ useInMemoryPgpKeys(signingKey, signingPassword)
14+
15+ afterEvaluate {
16+ sign publishing. publications. maven
17+ }
18+ }
19+
20+ publishing {
21+ repositories {
22+ maven {
23+ name = " sonatype"
24+ url = " https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
25+ credentials {
26+ username project. findProperty(" sonatypeUsername" )
27+ password project. findProperty(" sonatypePassword" )
28+ }
29+ }
30+ }
31+ }
32+ }
33+ }
34+ }
35+ }
36+ }
Original file line number Diff line number Diff line change 1616plugins {
1717 id ' java-platform'
1818 id ' maven-publish'
19+ id ' signing'
1920 id ' com.jfrog.artifactory'
20- id ' com.jfrog.bintray'
2121}
2222
2323description = ' RSocket Java Bill of materials.'
Original file line number Diff line number Diff line change 1717plugins {
1818 id ' java-library'
1919 id ' maven-publish'
20+ id ' signing'
2021 id ' com.jfrog.artifactory'
21- id ' com.jfrog.bintray'
2222 id ' io.morethan.jmhreport'
2323 id ' me.champeau.jmh'
2424 id ' io.github.reyerizo.gradle.jcstress'
Original file line number Diff line number Diff line change 1717plugins {
1818 id ' java-library'
1919 id ' maven-publish'
20+ id ' signing'
2021 id ' com.jfrog.artifactory'
21- id ' com.jfrog.bintray'
2222}
2323
2424dependencies {
Original file line number Diff line number Diff line change 1717plugins {
1818 id ' java-library'
1919 id ' maven-publish'
20+ id ' signing'
2021 id ' com.jfrog.artifactory'
21- id ' com.jfrog.bintray'
2222}
2323
2424dependencies {
You can’t perform that action at this time.
0 commit comments