Skip to content

Commit e94428a

Browse files
authored
Merge pull request #149 from bensonarafat/app-migrate-android
App migrate android
2 parents a086d63 + eecdea5 commit e94428a

File tree

7 files changed

+34
-23
lines changed

7 files changed

+34
-23
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ example/flutter_weather_demo/pubspec.lock
1515
example/android.iml
1616

1717
# FVM Version Cache
18-
.fvm/
18+
.fvm/
19+
.fvmrc

example/.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,11 @@ app.*.map.json
4343
# Exceptions to above rules.
4444
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
4545

46+
47+
ios/Runner.xcodeproj/project.pbxproj
48+
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
49+
4650
# FVM Version Cache
47-
.fvm/
51+
.fvm/
52+
.fvmrc
53+

example/android/app/build.gradle

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
plugins {
22
id "com.android.application"
3-
id "kotlin-android"
3+
id "org.jetbrains.kotlin.android"
44
id "dev.flutter.flutter-gradle-plugin"
55
}
6+
67
def localProperties = new Properties()
78
def localPropertiesFile = rootProject.file('local.properties')
89
if (localPropertiesFile.exists()) {
910
localPropertiesFile.withReader('UTF-8') { reader ->
1011
localProperties.load(reader)
1112
}
1213
}
14+
1315
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
1416
if (flutterVersionCode == null) {
1517
flutterVersionCode = '1'
@@ -20,12 +22,9 @@ if (flutterVersionName == null) {
2022
flutterVersionName = '1.0'
2123
}
2224

23-
// apply plugin: 'com.android.application'
24-
// apply plugin: 'kotlin-android'
25-
// apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26-
2725
android {
28-
compileSdkVersion flutter.compileSdkVersion
26+
compileSdkVersion 34
27+
namespace "com.example.super_tooltip_example"
2928

3029
sourceSets {
3130
main.java.srcDirs += 'src/main/kotlin'
@@ -39,7 +38,7 @@ android {
3938
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
4039
applicationId "com.example.super_tooltip_example"
4140
minSdkVersion flutter.minSdkVersion
42-
targetSdkVersion 28
41+
targetSdkVersion 34
4342
versionCode flutterVersionCode.toInteger()
4443
versionName flutterVersionName
4544
}
@@ -51,12 +50,17 @@ android {
5150
signingConfig signingConfigs.debug
5251
}
5352
}
53+
54+
kotlinOptions {
55+
jvmTarget = "1.8"
56+
}
57+
58+
compileOptions {
59+
sourceCompatibility = JavaVersion.VERSION_1_8
60+
targetCompatibility = JavaVersion.VERSION_1_8
61+
}
5462
}
5563

5664
flutter {
5765
source '../..'
58-
}
59-
60-
dependencies {
61-
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
6266
}

example/android/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
android:theme="@style/LaunchTheme"
1616
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1717
android:hardwareAccelerated="true"
18-
android:windowSoftInputMode="adjustResize">
18+
android:exported="true"
19+
android:windowSoftInputMode="adjustResize"
20+
>
1921
<!-- Specifies an Android theme to apply to this Activity as soon as
2022
the Android process has started. This theme is visible to the user
2123
while the Flutter UI initializes. After that, this theme continues

example/android/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
21
allprojects {
32
repositories {
43
google()
5-
jcenter()
4+
mavenCentral()
65
}
76
}
87

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
43
zipStoreBase=GRADLE_USER_HOME
5-
zipStorePath=wrapper/dists
4+
zipStorePath=wrapper/dists
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip

example/android/settings.gradle

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
pluginManagement {
42
def flutterSdkPath = {
53
def properties = new Properties()
@@ -20,7 +18,8 @@ pluginManagement {
2018

2119
plugins {
2220
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
23-
id "com.android.application" version "7.3.0" apply false
24-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
21+
id "com.android.application" version "8.6.0" apply false
22+
id "org.jetbrains.kotlin.android" version "2.1.0" apply false
2523
}
26-
include ':app'
24+
25+
include ":app"

0 commit comments

Comments
 (0)