Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bring back Java 8 compatibility #267

Merged
merged 3 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a bonus, you should be able to use latest version to compile the project, there is no reason to stick to an old java for the build 🤷

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'])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't used and AFAIK is considered a bad practice because makes the build less deterministic

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that should rather not be on the Gradle file.

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
Loading