Skip to content

Commit 923ede2

Browse files
committed
feat(android): Migrate plugins to built-in Kotlin
1 parent 6427bc6 commit 923ede2

11 files changed

Lines changed: 38 additions & 36 deletions

File tree

packages/device_info_plus/device_info_plus/android/build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ rootProject.allprojects {
2222
}
2323

2424
apply plugin: 'com.android.library'
25-
apply plugin: 'kotlin-android'
2625

2726
android {
2827
namespace 'dev.fluttercommunity.plus.device_info'
@@ -33,10 +32,6 @@ android {
3332
targetCompatibility JavaVersion.VERSION_17
3433
}
3534

36-
kotlinOptions {
37-
jvmTarget = 17
38-
}
39-
4035
defaultConfig {
4136
minSdk 19
4237
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -50,3 +45,9 @@ android {
5045
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
5146
}
5247
}
48+
49+
kotlin {
50+
compilerOptions {
51+
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
52+
}
53+
}

packages/device_info_plus/device_info_plus/example/pubspec.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,5 @@ flutter:
1919
uses-material-design: true
2020

2121
environment:
22-
sdk: '>=3.10.0 <4.0.0'
23-
flutter: '>=3.38.1'
24-
25-
22+
sdk: ">=3.12.0-0 <4.0.0"
23+
flutter: ">=3.44.0-0.0.pre"

packages/device_info_plus/device_info_plus/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ dev_dependencies:
4848
mockito: ^5.6.4
4949

5050
environment:
51-
sdk: ">=3.10.0 <4.0.0"
52-
flutter: ">=3.38.1"
51+
sdk: ">=3.12.0-0 <4.0.0"
52+
flutter: ">=3.44.0-0.0.pre"

packages/package_info_plus/package_info_plus/android/build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ rootProject.allprojects {
2323
}
2424

2525
apply plugin: 'com.android.library'
26-
apply plugin: 'kotlin-android'
2726

2827
android {
2928
namespace 'dev.fluttercommunity.plus.packageinfo'
@@ -34,10 +33,6 @@ android {
3433
targetCompatibility JavaVersion.VERSION_17
3534
}
3635

37-
kotlinOptions {
38-
jvmTarget = 17
39-
}
40-
4136
defaultConfig {
4237
minSdk 19
4338
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -51,3 +46,9 @@ android {
5146
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
5247
}
5348
}
49+
50+
kotlin {
51+
compilerOptions {
52+
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
53+
}
54+
}

packages/package_info_plus/package_info_plus/example/pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ version: 1.2.3+4
44
publish_to: "none"
55

66
environment:
7-
sdk: ">=3.10.0 <4.0.0"
7+
sdk: ">=3.12.0-0 <4.0.0"
8+
flutter: ">=3.44.0-0.0.pre"
89

910
dependencies:
1011
clock: ^1.1.1

packages/package_info_plus/package_info_plus/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ dev_dependencies:
4747
sdk: flutter
4848

4949
environment:
50-
sdk: ">=3.10.0 <4.0.0"
51-
flutter: ">=3.38.1"
50+
sdk: ">=3.12.0-0 <4.0.0"
51+
flutter: ">=3.44.0-0.0.pre"

packages/sensors_plus/sensors_plus/android/build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ rootProject.allprojects {
2222
}
2323

2424
apply plugin: 'com.android.library'
25-
apply plugin: 'kotlin-android'
2625

2726
android {
2827
namespace 'dev.fluttercommunity.plus.sensors'
@@ -33,10 +32,6 @@ android {
3332
targetCompatibility JavaVersion.VERSION_17
3433
}
3534

36-
kotlinOptions {
37-
jvmTarget = 17
38-
}
39-
4035
defaultConfig {
4136
minSdk 19
4237
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -49,3 +44,9 @@ android {
4944
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
5045
}
5146
}
47+
48+
kotlin {
49+
compilerOptions {
50+
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
51+
}
52+
}

packages/sensors_plus/sensors_plus/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ dev_dependencies:
3636
flutter_lints: ">=4.0.0 <6.0.0"
3737

3838
environment:
39-
sdk: ">=3.3.0 <4.0.0"
40-
flutter: ">=3.19.0"
39+
sdk: ">=3.12.0-0 <4.0.0"
40+
flutter: ">=3.44.0-0.0.pre"

packages/share_plus/share_plus/android/build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ rootProject.allprojects {
2222
}
2323

2424
apply plugin: 'com.android.library'
25-
apply plugin: 'kotlin-android'
2625

2726
android {
2827
namespace 'dev.fluttercommunity.plus.share'
@@ -33,10 +32,6 @@ android {
3332
targetCompatibility JavaVersion.VERSION_17
3433
}
3534

36-
kotlinOptions {
37-
jvmTarget = 17
38-
}
39-
4035
defaultConfig {
4136
minSdk 19
4237
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -52,3 +47,9 @@ android {
5247
implementation 'androidx.annotation:annotation:1.9.1'
5348
}
5449
}
50+
51+
kotlin {
52+
compilerOptions {
53+
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
54+
}
55+
}

packages/share_plus/share_plus/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ flutter:
2424
- assets/flutter_logo.png
2525

2626
environment:
27-
sdk: '>=3.10.0 <4.0.0'
28-
flutter: '>=3.38.1'
27+
sdk: ">=3.12.0-0 <4.0.0"
28+
flutter: ">=3.44.0-0.0.pre"

0 commit comments

Comments
 (0)