From 10e69b51b66592105ec8b18b44e7e3f7c5a2eda9 Mon Sep 17 00:00:00 2001 From: flofriday Date: Tue, 16 Apr 2024 23:24:40 +0200 Subject: [PATCH 1/8] Update build action versions --- .github/workflows/push.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 4fa7f99f..95d7b959 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -2,6 +2,7 @@ on: push: branches: - main + - updated-build-action pull_request: workflow_dispatch: @@ -10,13 +11,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 17 - - uses: gradle/gradle-build-action@v2 - with: - arguments: build --warning-mode all + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + - name: Build with Gradle + run: ./gradlew build --warning-mode all - uses: actions/upload-artifact@v3 with: name: apks From 2db1d20085ed9c616a4fdb8267c0e4b6da0aa35f Mon Sep 17 00:00:00 2001 From: flofriday Date: Tue, 16 Apr 2024 23:49:06 +0200 Subject: [PATCH 2/8] Test cache effectiveness --- .github/workflows/push.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 95d7b959..40804e77 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -18,6 +18,8 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 - name: Build with Gradle + with: + cache-read-only: false run: ./gradlew build --warning-mode all - uses: actions/upload-artifact@v3 with: From 3bffcb76c30fc84f40192a52f6819d7fd7f79dbb Mon Sep 17 00:00:00 2001 From: flofriday Date: Tue, 16 Apr 2024 23:51:51 +0200 Subject: [PATCH 3/8] Fix test cache effectiveness --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 40804e77..db16ff19 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -17,9 +17,9 @@ jobs: java-version: 17 - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 - - name: Build with Gradle with: cache-read-only: false + - name: Build with Gradle run: ./gradlew build --warning-mode all - uses: actions/upload-artifact@v3 with: From dbec879d6967f766edc56a388219dd6c9b60ae50 Mon Sep 17 00:00:00 2001 From: flofriday Date: Wed, 17 Apr 2024 00:22:46 +0200 Subject: [PATCH 4/8] Remove setup gradle action Honestly, I don't know if that action is needed but many others manage without it like the Antennapod app. --- .github/workflows/push.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index db16ff19..5fdad0da 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -13,14 +13,15 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: - distribution: temurin - java-version: 17 - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 - with: - cache-read-only: false + distribution: 'temurin' + java-version: '17' + cache: 'gradle' +# - name: Setup Gradle +# uses: gradle/actions/setup-gradle@v3 +# with: +# cache-read-only: false - name: Build with Gradle - run: ./gradlew build --warning-mode all + run: ./gradlew build --warning-mode all --no-daemon --parallel - uses: actions/upload-artifact@v3 with: name: apks From d54c3662785be40b0d446d603127a0dceeab3887 Mon Sep 17 00:00:00 2001 From: flofriday Date: Wed, 17 Apr 2024 10:47:39 +0200 Subject: [PATCH 5/8] Update the upload-artifact github action --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5fdad0da..4f824a0f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -22,7 +22,7 @@ jobs: # cache-read-only: false - name: Build with Gradle run: ./gradlew build --warning-mode all --no-daemon --parallel - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: apks path: app/build/outputs/apk From 0fb2578025ad221ae6fd5f49e14f03a3e564f804 Mon Sep 17 00:00:00 2001 From: flofriday Date: Wed, 17 Apr 2024 11:23:04 +0200 Subject: [PATCH 6/8] Update gradle --- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index eb5f6b57..656f7119 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ buildscript { } plugins { - id('com.android.application') version '8.2.0' apply false + id('com.android.application') version '8.3.2' apply false id 'org.jetbrains.kotlin.android' version '1.8.0' apply false } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d9c23f9f..f72940c0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Sat Nov 12 13:07:01 CET 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle b/settings.gradle index ab6d3cde..373ee089 100644 --- a/settings.gradle +++ b/settings.gradle @@ -9,7 +9,7 @@ dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() - jcenter() + mavenCentral() maven { url "https://jitpack.io" } } } From 35dd8f95255cfffd70cae5fa54c24a5b132cf2bc Mon Sep 17 00:00:00 2001 From: flofriday Date: Wed, 17 Apr 2024 11:25:32 +0200 Subject: [PATCH 7/8] Fix warning for deprecated build config The build config is still generated but the flag is now in the build.gradle instead of the gradle.properties --- app/build.gradle | 3 +++ gradle.properties | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 40bcd91f..ef6cf447 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -32,6 +32,9 @@ android { lint { disable 'NotificationPermission' } + buildFeatures { + buildConfig true + } } diff --git a/gradle.properties b/gradle.properties index bd81cdde..d41fa2f6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,7 +12,6 @@ org.gradle.jvmargs=-Xms1024m -Xmx4096m # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true android.useAndroidX=true -android.defaults.buildfeatures.buildconfig=true android.nonTransitiveRClass=true android.nonFinalResIds=true org.gradle.unsafe.configuration-cache=true From a91b93a3ae0aa982995e4e9816e62db8c5e76af2 Mon Sep 17 00:00:00 2001 From: flofriday Date: Wed, 17 Apr 2024 11:30:33 +0200 Subject: [PATCH 8/8] Remove debugging code from the CI script --- .github/workflows/push.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 4f824a0f..80b71540 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -2,7 +2,6 @@ on: push: branches: - main - - updated-build-action pull_request: workflow_dispatch: @@ -16,10 +15,6 @@ jobs: distribution: 'temurin' java-version: '17' cache: 'gradle' -# - name: Setup Gradle -# uses: gradle/actions/setup-gradle@v3 -# with: -# cache-read-only: false - name: Build with Gradle run: ./gradlew build --warning-mode all --no-daemon --parallel - uses: actions/upload-artifact@v4