Skip to content

Commit aadf836

Browse files
authored
Use the same Java/Kotlin versions as the flutter android template (#1708)
1 parent 2e1a9a6 commit aadf836

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.github/workflows/okhttp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b
3333
with:
3434
distribution: 'zulu'
35-
java-version: '21'
35+
java-version: '17'
3636
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
3737
with:
3838
channel: 'stable'

pkgs/ok_http/android/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ group = "com.example.ok_http"
44
version = "1.0"
55

66
buildscript {
7-
ext.kotlin_version = '2.1.10'
7+
ext.kotlin_version = '1.8.22'
88
repositories {
99
google()
1010
mavenCentral()
@@ -33,7 +33,7 @@ android {
3333
}
3434

3535
kotlinOptions {
36-
jvmTarget = JavaVersion.VERSION_21
36+
jvmTarget = JavaVersion.VERSION_11
3737
}
3838

3939
sourceSets {
@@ -42,7 +42,7 @@ android {
4242

4343
// Bumping the plugin compileSdk version requires all clients of this plugin
4444
// to bump the version in their app.
45-
compileSdk = 34
45+
compileSdk = 35
4646

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

5353
compileOptions {
54-
sourceCompatibility = JavaVersion.VERSION_21
55-
targetCompatibility = JavaVersion.VERSION_21
54+
sourceCompatibility = JavaVersion.VERSION_11
55+
targetCompatibility = JavaVersion.VERSION_11
5656
}
5757

5858
defaultConfig {

pkgs/ok_http/example/android/app/build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,12 @@ android {
2929
ndkVersion = flutter.ndkVersion
3030

3131
compileOptions {
32-
sourceCompatibility = JavaVersion.VERSION_21
33-
targetCompatibility = JavaVersion.VERSION_21
32+
sourceCompatibility = JavaVersion.VERSION_11
33+
targetCompatibility = JavaVersion.VERSION_11
34+
}
35+
36+
kotlinOptions {
37+
jvmTarget = JavaVersion.VERSION_11
3438
}
3539

3640
defaultConfig {

0 commit comments

Comments
 (0)