Skip to content

Commit

Permalink
fix: bring back Java 8 compatibility (#267)
Browse files Browse the repository at this point in the history
* fix: bring back Java 8 compatibility

* build: Compile with latest JDK

* build: Suppress deprecated target version warning on Java 21
  • Loading branch information
mateuszkwiecinski authored Jul 9, 2024
1 parent a9488f6 commit fded4c0
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
- name: Checkout android-maps-ktx
uses: actions/checkout@v3

- name: Set up JDK 17
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'

# Run dokka and create tar
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 17
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
- name: Checkout
uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
- name: Gradle Wrapper Validation
uses: gradle/[email protected]

- name: Set up JDK 17
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'

- name: Build modules
Expand Down
7 changes: 3 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,17 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = "17"
jvmTarget = "1.8"
}
namespace 'com.google.maps.android.ktx.demo'
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation libs.kotlinStdlib
implementation libs.androidxAppcompat
implementation libs.androidxCoreKtx
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ subprojects { project ->

// Code coverage
jacoco {
toolVersion = "0.8.7"
toolVersion = "0.8.12"
}


Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ sonatypeTokenPassword=

# Migration to AGP 8.2.1
android.nonTransitiveRClass=false
android.nonFinalResIds=false
android.nonFinalResIds=false

# Despite being deprecated, targeting lowest java version is needed to support old Android runtime
android.javaCompile.suppressSourceTargetDeprecationWarning=true
6 changes: 3 additions & 3 deletions maps-ktx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
freeCompilerArgs += '-Xexplicit-api=strict'
jvmTarget = "17"
jvmTarget = "1.8"
}
buildFeatures {
viewBinding true
Expand Down
6 changes: 3 additions & 3 deletions maps-utils-ktx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
freeCompilerArgs += '-Xexplicit-api=strict'
jvmTarget = "17"
jvmTarget = "1.8"
}
buildFeatures {
viewBinding true
Expand Down

0 comments on commit fded4c0

Please sign in to comment.