From 1f813aff981b6ec20b60864e1dbea9afa5942504 Mon Sep 17 00:00:00 2001 From: Norbel Ambanumben Date: Sat, 21 Oct 2023 17:50:30 +0100 Subject: [PATCH] AGP upgrade --- .github/workflows/archive.yml | 4 ++-- .github/workflows/build.yml | 2 +- .github/workflows/emulator.yml | 2 +- .github/workflows/test.yml | 2 +- app/build.gradle | 6 +++--- app/jacoco.gradle | 20 +++++++++++++------- gradle.properties | 3 +++ gradle/libs.versions.toml | 6 +++--- gradle/wrapper/gradle-wrapper.properties | 2 +- shared-test/build.gradle | 11 ++++++++--- 10 files changed, 36 insertions(+), 22 deletions(-) diff --git a/.github/workflows/archive.yml b/.github/workflows/archive.yml index d41537923..b04392ac3 100644 --- a/.github/workflows/archive.yml +++ b/.github/workflows/archive.yml @@ -7,7 +7,7 @@ jobs: steps: - uses: actions/setup-java@v2 with: - java-version: '11' + java-version: '17' distribution: 'temurin' - name: checkout uses: actions/checkout@v2 @@ -16,4 +16,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: dev-apk - path: app/build/outputs/apk/devFull/release \ No newline at end of file + path: app/build/outputs/apk/devFull/release diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ed6c7a7e..46f49645d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/setup-java@v2 with: - java-version: '11' + java-version: '17' distribution: 'temurin' - name: checkout uses: actions/checkout@v2 diff --git a/.github/workflows/emulator.yml b/.github/workflows/emulator.yml index 0a599c15a..de92c9393 100644 --- a/.github/workflows/emulator.yml +++ b/.github/workflows/emulator.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/setup-java@v2 with: - java-version: '11' + java-version: '17' distribution: 'temurin' - name: checkout uses: actions/checkout@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e678fedd6..f743fca58 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: steps: - uses: actions/setup-java@v2 with: - java-version: '11' + java-version: '17' distribution: 'temurin' - name: checkout uses: actions/checkout@v2 diff --git a/app/build.gradle b/app/build.gradle index ade32bc44..1c215b084 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -86,11 +86,11 @@ android { } } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 + jvmTarget = JavaVersion.VERSION_17 } buildFeatures { viewBinding = true diff --git a/app/jacoco.gradle b/app/jacoco.gradle index f75812752..15b2b36c1 100644 --- a/app/jacoco.gradle +++ b/app/jacoco.gradle @@ -48,13 +48,19 @@ task jacocoAndroidTestReport(type: JacocoReport) { executionData.from += fileTree(dir: codeCoverageDataLocation, includes: ['**/*.ec']) } - reports { - html.enabled true - html.destination file("${buildDir}/reports/coverage") - xml.enabled true - xml.destination file("${buildDir}/reports/coverage.xml") - csv.enabled false - } + reports { + html { + enabled true + destination file("${buildDir}/reports/coverage") + } + xml { + enabled true + destination file("${buildDir}/reports/coverage.xml") + } + csv { + enabled false + } + } doLast { println "Wrote HTML coverage report to ${reports.html.destination}/index.html" diff --git a/gradle.properties b/gradle.properties index 8de505811..a8c570082 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,10 @@ # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. +android.defaults.buildfeatures.buildconfig=true android.enableJetifier=true +android.nonFinalResIds=false +android.nonTransitiveRClass=false android.useAndroidX=true org.gradle.jvmargs=-Xmx1536m # When configured, Gradle will run in incubating parallel mode. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 45a0cb6c7..4c1c32406 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -androidGradlePlugin = "7.4.1" +androidGradlePlugin = "8.1.2" barista = "3.9.0" countlySdk = "21.11.0" faker = "1.2.8" @@ -10,7 +10,7 @@ fastlaneScreengrab = "2.0.0" sentryAndroid = "6.3.0" xanscaleLocalhostToolkit = "19.05.01" commonsIo = "2.6" -jacoco = "0.8.5" +jacoco = "0.8.7" kotlin = "1.8.0" # Android X @@ -29,7 +29,7 @@ androidxEspressoCore = "3.5.1" googleGson = "2.8.9" googleGuava = "30.1.1-android" googleMaterial = "1.6.1" -googleDagger = "2.44.2" +googleDagger = "2.45" googleFirebaseBon = "26.3.0" googlePlaycore = "1.10.3" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2ec77e51a..3a0290794 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/shared-test/build.gradle b/shared-test/build.gradle index 1877880b9..34d70a978 100644 --- a/shared-test/build.gradle +++ b/shared-test/build.gradle @@ -6,13 +6,17 @@ plugins { android { namespace 'org.openobservatory.ooniprobe.shared.test' - compileSdk 33 + compileSdk libs.versions.compileSdk.get().toInteger() defaultConfig { - minSdk 21 + minSdk libs.versions.minSdk.get().toInteger() } + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 + jvmTarget = JavaVersion.VERSION_17 } flavorDimensions = ['testing', 'license'] productFlavors { @@ -60,6 +64,7 @@ dependencies { implementation libs.retrofit.logging.interceptor implementation libs.androidx.appcompat + implementation libs.xanscale.localhost.toolkit testImplementation libs.junit4 androidTestImplementation libs.androidx.junit