Skip to content

Commit

Permalink
Fix publishing for gradle 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
cvzi committed Feb 21, 2023
1 parent 7e9bb23 commit 54ad55a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
}

android {
publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}

afterEvaluate {
publishing {
repositories {
Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/publishPackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 54ad55a

Please sign in to comment.