Skip to content

Commit

Permalink
Use the same Java/Kotlin versions as the flutter android template (#1708
Browse files Browse the repository at this point in the history
)
  • Loading branch information
brianquinlan authored Feb 5, 2025
1 parent 2e1a9a6 commit aadf836
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/okhttp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b
with:
distribution: 'zulu'
java-version: '21'
java-version: '17'
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
with:
channel: 'stable'
Expand Down
10 changes: 5 additions & 5 deletions pkgs/ok_http/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ group = "com.example.ok_http"
version = "1.0"

buildscript {
ext.kotlin_version = '2.1.10'
ext.kotlin_version = '1.8.22'
repositories {
google()
mavenCentral()
Expand Down Expand Up @@ -33,7 +33,7 @@ android {
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_21
jvmTarget = JavaVersion.VERSION_11
}

sourceSets {
Expand All @@ -42,7 +42,7 @@ android {

// Bumping the plugin compileSdk version requires all clients of this plugin
// to bump the version in their app.
compileSdk = 34
compileSdk = 35

// Use the NDK version
// declared in /android/app/build.gradle file of the Flutter project.
Expand All @@ -51,8 +51,8 @@ android {
ndkVersion = android.ndkVersion

compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

defaultConfig {
Expand Down
8 changes: 6 additions & 2 deletions pkgs/ok_http/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ android {
ndkVersion = flutter.ndkVersion

compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_11
}

defaultConfig {
Expand Down

0 comments on commit aadf836

Please sign in to comment.