Skip to content

Commit fdefdd6

Browse files
committed
Fixes
1 parent 1286894 commit fdefdd6

3 files changed

Lines changed: 20 additions & 20 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
java-version: '17'
2020

2121
- name: Publish Maven Libraries
22-
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
22+
run: ./gradlew modulefs:publishToSonatype closeAndReleaseSonatypeStagingRepository
2323
env:
2424
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
2525
GPG_KEY: ${{ secrets.GPG_KEY }}

build.gradle

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
11
plugins {
22
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
3+
}
4+
5+
def user = project.hasProperty('sonatypeUsername') ? project.property('sonatypeUsername') : System.getenv('SONATYPE_USERNAME')
6+
def pass = project.hasProperty('sonatypePassword') ? project.property('sonatypePassword') : System.getenv('SONATYPE_PASSWORD')
7+
8+
tasks.withType(GenerateModuleMetadata).configureEach {
9+
enabled = false
10+
}
11+
12+
nexusPublishing {
13+
repositories {
14+
sonatype {
15+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
16+
snapshotRepositoryUrl.set(uri('https://central.sonatype.com/repository/maven-snapshots/'))
17+
username = user
18+
password = pass
19+
}
20+
}
21+
useStaging = true
322
}

modulefs/publish.gradle

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,3 @@ signing {
4444

4545
sign publishing.publications.mavenJava
4646
}
47-
48-
tasks.withType(GenerateModuleMetadata).configureEach {
49-
enabled = false
50-
}
51-
52-
def user = project.hasProperty('sonatypeUsername') ? project.property('sonatypeUsername') : System.getenv('SONATYPE_USERNAME')
53-
def pass = project.hasProperty('sonatypePassword') ? project.property('sonatypePassword') : System.getenv('SONATYPE_PASSWORD')
54-
55-
nexusPublishing {
56-
repositories {
57-
sonatype {
58-
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
59-
snapshotRepositoryUrl.set(uri('https://central.sonatype.com/repository/maven-snapshots/'))
60-
username = user
61-
password = pass
62-
}
63-
}
64-
useStaging = true
65-
}

0 commit comments

Comments
 (0)