Migrate to AGP 8.0.2 / Android Studio Flamingo / Java 17 (#3541)

- Update AGP in version catalog to 8.0.2
- Set Java version to 17
- Enable non-final resource IDs
This commit is contained in:
Nik Clayton 2023-07-30 15:50:04 +02:00 committed by GitHub
parent 0f74a6b3dc
commit 839d8bcc04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 15 deletions

View File

@ -17,7 +17,7 @@ jobs:
- uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
- name: Gradle Wrapper Validation

View File

@ -103,8 +103,8 @@ android {
// Can remove this once https://issuetracker.google.com/issues/260059413 is fixed.
// https://kotlinlang.org/docs/gradle-configure-project.html#gradle-java-toolchains-support
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
applicationVariants.configureEach { variant ->
variant.outputs.configureEach {

View File

@ -19,7 +19,7 @@ import org.mockito.kotlin.stub
import org.robolectric.annotation.Config
import retrofit2.HttpException
import retrofit2.Response
import java.util.*
import java.util.Date
@Config(sdk = [28])
@RunWith(AndroidJUnit4::class)

View File

@ -11,6 +11,9 @@ trigger_map:
workflows:
nightly:
steps:
- set-java-version@1:
inputs:
- set_java_version: '17'
- activate-ssh-key:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8.0: {}
@ -50,6 +53,9 @@ workflows:
- cache-push@2.7: {}
primary:
steps:
- set-java-version@1:
inputs:
- set_java_version: '17'
- activate-ssh-key:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone: {}
@ -87,6 +93,9 @@ workflows:
- cache-push@2.7: {}
release:
steps:
- set-java-version@1:
inputs:
- set_java_version: '17'
- activate-ssh-key:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone: {}

View File

@ -12,7 +12,7 @@ allprojects {
plugins.withType(JavaBasePlugin).configureEach {
java {
toolchain.languageVersion = JavaLanguageVersion.of(11)
toolchain.languageVersion = JavaLanguageVersion.of(17)
}
}
}

View File

@ -9,11 +9,6 @@ org.gradle.configuration-cache=true
kotlin.incremental.useClasspathSnapshot=true
# Disable buildFeatures flags by default
android.defaults.buildfeatures.aidl=false
android.defaults.buildfeatures.buildconfig=false
android.defaults.buildfeatures.renderscript=false
android.defaults.buildfeatures.resvalues=false
android.defaults.buildfeatures.shaders=false
android.enableR8.fullMode=true
android.nonTransitiveRClass=true
android.useAndroidX=true

View File

@ -1,5 +1,5 @@
[versions]
agp = "7.4.2"
agp = "8.0.2"
androidx-activity = "1.7.2"
androidx-appcompat = "1.6.1"
androidx-browser = "1.5.0"