From 54ad55aa775627b887f3fa81d384a003b8bf67d7 Mon Sep 17 00:00:00 2001 From: cvzi Date: Tue, 21 Feb 2023 21:04:00 +0100 Subject: [PATCH] Fix publishing for gradle 8.x --- .github/workflows/publish.gradle | 11 ++++++++++- .github/workflows/publishPackage.yml | 6 ++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.gradle b/.github/workflows/publish.gradle index 9961f6eb2..e51186b62 100644 --- a/.github/workflows/publish.gradle +++ b/.github/workflows/publish.gradle @@ -3,6 +3,15 @@ task sourcesJar(type: Jar) { archiveClassifier = 'sources' } +android { + publishing { + singleVariant('release') { + withSourcesJar() + withJavadocJar() + } + } +} + afterEvaluate { publishing { repositories { @@ -17,7 +26,7 @@ afterEvaluate { } publications { release(MavenPublication) { - from components.release_apk + from components.release groupId = 'com.github.cvzi' artifactId = 'screenshottile' version = android.defaultConfig.versionName diff --git a/.github/workflows/publishPackage.yml b/.github/workflows/publishPackage.yml index c57c7e2d1..b67a84404 100644 --- a/.github/workflows/publishPackage.yml +++ b/.github/workflows/publishPackage.yml @@ -17,10 +17,12 @@ jobs: with: distribution: 'temurin' java-version: '16' - - name: Add exec permission - run: chmod +x gradlew - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@v1 + - name: Add exec permission + run: chmod +x gradlew + - name: Disable configuration cache + run: echo -e "\norg.gradle.unsafe.configuration-cache=false\n" >> gradle.properties - name: Append publish.gradle to build.gradle run: cat .github/workflows/publish.gradle >> app/build.gradle - name: 🎁 Publish package