Skip to content

Commit ee5a934

Browse files
committed
replaces artifactory release with github packages for snapshots
Signed-off-by: Oleh Dokuka <[email protected]> Signed-off-by: Oleh Dokuka <[email protected]> Signed-off-by: Oleh Dokuka <[email protected]>
1 parent a1996a1 commit ee5a934

File tree

14 files changed

+25
-85
lines changed

14 files changed

+25
-85
lines changed

.github/workflows/gradle-all.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ jobs:
3737
run: ./gradlew clean build
3838
- name: Publish Packages to Artifactory
3939
if: ${{ matrix.jdk == '1.8' }}
40-
run: ./gradlew -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PversionSuffix="-${githubRef#refs/heads/}-SNAPSHOT" -PbuildNumber="${buildNumber}" artifactoryPublish --stacktrace
40+
run: ./gradlew -PversionSuffix="-${githubRef#refs/heads/}-SNAPSHOT" -PbuildNumber="${buildNumber}" publishMavenPublicationToGitHubPackagesRepository --stacktrace
4141
env:
42-
bintrayUser: ${{ secrets.bintrayUser }}
43-
bintrayKey: ${{ secrets.bintrayKey }}
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4443
githubRef: ${{ github.ref }}
4544
buildNumber: ${{ github.run_number }}

.github/workflows/gradle-main.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ jobs:
3737
run: ./gradlew clean build
3838
- name: Publish Packages to Artifactory
3939
if: ${{ matrix.jdk == '1.8' }}
40-
run: ./gradlew -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PversionSuffix="-SNAPSHOT" -PbuildNumber="${buildNumber}" artifactoryPublish --stacktrace
40+
run: ./gradlew -PversionSuffix="-SNAPSHOT" -PbuildNumber="${buildNumber}" publishMavenPublicationToGitHubPackagesRepository --stacktrace
4141
env:
42-
bintrayUser: ${{ secrets.bintrayUser }}
43-
bintrayKey: ${{ secrets.bintrayKey }}
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4443
buildNumber: ${{ github.run_number }}
4544
- name: Aggregate test reports with ciMate
4645
if: always()

build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
plugins {
1818
id 'com.github.sherter.google-java-format' version '0.8' apply false
19-
id 'com.jfrog.artifactory' version '4.21.0' apply false
2019
id 'me.champeau.gradle.jmh' version '0.5.0' apply false
2120
id 'io.spring.dependency-management' version '1.0.11.RELEASE' apply false
2221
id 'io.morethan.jmhreport' version '0.9.0' apply false

gradle/artifactory.gradle

-47
This file was deleted.

gradle/github-pkg.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ subprojects {
88
name = "GitHubPackages"
99
url = uri("https://maven.pkg.github.com/rsocket/rsocket-java")
1010
credentials {
11-
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
12-
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
11+
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
12+
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
1313
}
1414
}
1515
}

gradle/publications.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
apply from: "${rootDir}/gradle/artifactory.gradle"
21
apply from: "${rootDir}/gradle/github-pkg.gradle"
32
apply from: "${rootDir}/gradle/sonotype.gradle"
43

gradle/sonotype.gradle

+19-21
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
11
subprojects {
22
if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')) {
3-
plugins.withType(JavaLibraryPlugin) {
4-
plugins.withType(MavenPublishPlugin) {
5-
plugins.withType(SigningPlugin) {
3+
plugins.withType(MavenPublishPlugin) {
4+
plugins.withType(SigningPlugin) {
65

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")
6+
signing {
7+
//requiring signature if there is a publish task that is not to MavenLocal
8+
required { gradle.taskGraph.allTasks.any { it.name.toLowerCase().contains("publish") && !it.name.contains("MavenLocal") } }
9+
def signingKey = project.findProperty("signingKey")
10+
def signingPassword = project.findProperty("signingPassword")
1211

13-
useInMemoryPgpKeys(signingKey, signingPassword)
12+
useInMemoryPgpKeys(signingKey, signingPassword)
1413

15-
afterEvaluate {
16-
sign publishing.publications.maven
17-
}
14+
afterEvaluate {
15+
sign publishing.publications.maven
1816
}
17+
}
1918

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-
}
19+
publishing {
20+
repositories {
21+
maven {
22+
name = "sonatype"
23+
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
24+
credentials {
25+
username project.findProperty("sonatypeUsername")
26+
password project.findProperty("sonatypePassword")
2927
}
3028
}
3129
}

rsocket-bom/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ plugins {
1717
id 'java-platform'
1818
id 'maven-publish'
1919
id 'signing'
20-
id 'com.jfrog.artifactory'
2120
}
2221

2322
description = 'RSocket Java Bill of materials.'

rsocket-core/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ plugins {
1818
id 'java-library'
1919
id 'maven-publish'
2020
id 'signing'
21-
id 'com.jfrog.artifactory'
2221
id 'io.morethan.jmhreport'
2322
id 'me.champeau.gradle.jmh'
2423
}

rsocket-load-balancer/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ plugins {
1818
id 'java-library'
1919
id 'maven-publish'
2020
id 'signing'
21-
id 'com.jfrog.artifactory'
2221
}
2322

2423
dependencies {

rsocket-micrometer/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ plugins {
1818
id 'java-library'
1919
id 'maven-publish'
2020
id 'signing'
21-
id 'com.jfrog.artifactory'
2221
}
2322

2423
dependencies {

rsocket-test/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ plugins {
1818
id 'java-library'
1919
id 'maven-publish'
2020
id 'signing'
21-
id 'com.jfrog.artifactory'
2221
}
2322

2423
dependencies {

rsocket-transport-local/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ plugins {
1818
id 'java-library'
1919
id 'maven-publish'
2020
id 'signing'
21-
id 'com.jfrog.artifactory'
2221
}
2322

2423
dependencies {

rsocket-transport-netty/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ plugins {
1818
id 'java-library'
1919
id 'maven-publish'
2020
id 'signing'
21-
id 'com.jfrog.artifactory'
2221
id "com.google.osdetector" version "1.4.0"
2322
}
2423

0 commit comments

Comments
 (0)