Skip to content

Commit

Permalink
Add kotlinOptions jvmTarget to templates (#147326)
Browse files Browse the repository at this point in the history
Adds jvmTarget to gradle templates. 

Fixes #147185.

Interestingly, we already had this in many of our examples/tests, see search results here https://github.com/search?q=repo%3Aflutter%2Fflutter%20jvmTarget&type=code.
  • Loading branch information
gmackall committed May 7, 2024
1 parent 95be3fb commit d04edd1
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 7 deletions.
Expand Up @@ -4,8 +4,8 @@

plugins {
id "com.android.application"
id "dev.flutter.flutter-gradle-plugin"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
Expand Down
Expand Up @@ -4,8 +4,8 @@

plugins {
id "com.android.application"
id "dev.flutter.flutter-gradle-plugin"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
Expand Down
Expand Up @@ -4,8 +4,8 @@

plugins {
id "com.android.application"
id "dev.flutter.flutter-gradle-plugin"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
Expand All @@ -25,6 +25,10 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

defaultConfig {
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
Expand Down
4 changes: 4 additions & 0 deletions dev/integration_tests/channels/android/app/build.gradle
Expand Up @@ -36,6 +36,10 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.channels"
Expand Down
Expand Up @@ -4,8 +4,8 @@

plugins {
id "com.android.application"
id "dev.flutter.flutter-gradle-plugin"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
Expand Down
Expand Up @@ -4,8 +4,8 @@

plugins {
id "com.android.application"
id "dev.flutter.flutter-gradle-plugin"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
Expand Down Expand Up @@ -35,6 +35,10 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.release_smoke_test"
Expand Down
2 changes: 1 addition & 1 deletion dev/integration_tests/spell_check/android/app/build.gradle
Expand Up @@ -4,8 +4,8 @@

plugins {
id "com.android.application"
id "dev.flutter.flutter-gradle-plugin"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
Expand Down
4 changes: 4 additions & 0 deletions dev/integration_tests/ui/android/app/build.gradle
Expand Up @@ -17,6 +17,10 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

defaultConfig {
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
Expand Down
Expand Up @@ -15,6 +15,10 @@ android {
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "{{androidIdentifier}}"
Expand Down
Expand Up @@ -15,6 +15,10 @@ android {
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "{{androidIdentifier}}"
Expand Down
Expand Up @@ -37,7 +37,7 @@ android {
}

kotlinOptions {
jvmTarget = "1.8"
jvmTarget = JavaVersion.VERSION_1_8
}

sourceSets {
Expand Down

0 comments on commit d04edd1

Please sign in to comment.