diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c5e4eb3aa..4d596489b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,9 +38,9 @@ jobs: gpg --quiet --output $GITHUB_WORKSPACE/release.gpg --dearmor ./release.asc echo "Build and publish" - sed -i -e "s,sonatypeUsername=,sonatypeUsername=$SONATYPE_USERNAME,g" gradle.properties - SONATYPE_PASSWORD_ESCAPED=$(printf '%s\n' "$SONATYPE_PASSWORD" | sed -e 's/[\/&]/\\&/g') - sed -i -e "s,sonatypePassword=,sonatypePassword=$SONATYPE_PASSWORD_ESCAPED,g" gradle.properties + sed -i -e "s,sonatypeToken=,sonatypeToken=$SONATYPE_TOKEN_USERNAME,g" gradle.properties + SONATYPE_TOKEN_PASSWORD_ESCAPED=$(printf '%s\n' "$SONATYPE_TOKEN_PASSWORD" | sed -e 's/[\/&]/\\&/g') + sed -i -e "s,sonatypeTokenPassword=,sonatypeTokenPassword=$SONATYPE_TOKEN_PASSWORD_ESCAPED,g" gradle.properties sed -i -e "s,signing.keyId=,signing.keyId=$GPG_KEY_ID,g" gradle.properties sed -i -e "s,signing.password=,signing.password=$GPG_PASSWORD,g" gradle.properties sed -i -e "s,signing.secretKeyRingFile=,signing.secretKeyRingFile=$GITHUB_WORKSPACE/release.gpg,g" gradle.properties @@ -48,8 +48,8 @@ jobs: GPG_KEY_ARMOR: "${{ secrets.SYNCED_GPG_KEY_ARMOR }}" GPG_KEY_ID: ${{ secrets.SYNCED_GPG_KEY_ID }} GPG_PASSWORD: ${{ secrets.SYNCED_GPG_KEY_PASSWORD }} - SONATYPE_PASSWORD: ${{ secrets.SYNCED_SONATYPE_PASSWORD }} - SONATYPE_USERNAME: ${{ secrets.SYNCED_SONATYPE_USERNAME }} + SONATYPE_TOKEN_PASSWORD: ${{ secrets.SYNCED_SONATYPE_TOKEN_PASSWORD }} + SONATYPE_TOKEN_USERNAME: ${{ secrets.SYNCED_SONATYPE_TOKEN_USERNAME }} - uses: actions/setup-node@v4 with: diff --git a/build-logic/convention/src/main/kotlin/PublishingConventionPlugin.kt b/build-logic/convention/src/main/kotlin/PublishingConventionPlugin.kt index 2dcb9e37a..80139f7f1 100644 --- a/build-logic/convention/src/main/kotlin/PublishingConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/PublishingConventionPlugin.kt @@ -92,8 +92,8 @@ class PublishingConventionPlugin : Plugin { val snapshotsRepoUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/") url = if (project.version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl credentials { - username = project.findProperty("sonatypeUsername") as String? - password = project.findProperty("sonatypePassword") as String? + username = project.findProperty("sonatypeToken") as String? + password = project.findProperty("sonatypeTokenPassword") as String? } } } diff --git a/gradle.properties b/gradle.properties index 8ef066d3c..96145c064 100644 --- a/gradle.properties +++ b/gradle.properties @@ -27,8 +27,8 @@ signing.keyId= signing.password= signing.secretKeyRingFile= -sonatypeUsername= -sonatypePassword= +sonatypeToken= +sonatypeTokenPassword= android.nonTransitiveRClass=false android.nonFinalResIds=false \ No newline at end of file