Add kotlinOptions jvmTarget to templates (#147326)

Adds jvmTarget to gradle templates. 

Fixes https://github.com/flutter/flutter/issues/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.
This commit is contained in:
Gray Mackall 2024-05-07 10:32:10 -07:00 committed by GitHub
parent 95be3fb1fe
commit d04edd1d7f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 31 additions and 7 deletions

View file

@ -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()

View file

@ -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()

View file

@ -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()
@ -25,6 +25,10 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion

View file

@ -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"

View file

@ -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()

View file

@ -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()
@ -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"

View file

@ -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()

View file

@ -17,6 +17,10 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion

View file

@ -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}}"

View file

@ -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}}"

View file

@ -37,7 +37,7 @@ android {
}
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = JavaVersion.VERSION_1_8
}
sourceSets {