Skip to content

Commit 9f8b1e9

Browse files
committed
Upgraded the example Android app to the latest supported Android and Gradle versions respectively.
1 parent ce07a4a commit 9f8b1e9

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

example/android/app/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 31
29+
namespace "com.example.example"
30+
31+
compileSdkVersion 33
3032

3133
sourceSets {
3234
main.java.srcDirs += 'src/main/kotlin'
@@ -36,7 +38,7 @@ android {
3638
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3739
applicationId "com.example.example"
3840
minSdkVersion 21
39-
targetSdkVersion 30
41+
targetSdkVersion 33
4042
versionCode flutterVersionCode.toInteger()
4143
versionName flutterVersionName
4244
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
android:theme="@style/LaunchTheme"
1010
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1111
android:hardwareAccelerated="true"
12-
android:windowSoftInputMode="adjustResize">
12+
android:windowSoftInputMode="adjustResize"
13+
android:exported="true">
1314
<!-- Specifies an Android theme to apply to this Activity as soon as
1415
the Android process has started. This theme is visible to the user
1516
while the Flutter UI initializes. After that, this theme continues

example/android/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
buildscript {
2-
ext.kotlin_version = '1.6.10'
2+
ext.kotlin_version = '1.7.22'
33
repositories {
44
google()
5-
jcenter()
5+
mavenCentral()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:4.1.0'
9+
classpath 'com.android.tools.build:gradle:7.4.2'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}
1313

1414
allprojects {
1515
repositories {
1616
google()
17-
jcenter()
17+
mavenCentral()
1818
}
1919
}
2020

@@ -24,6 +24,6 @@ subprojects {
2424
project.evaluationDependsOn(':app')
2525
}
2626

27-
task clean(type: Delete) {
27+
tasks.register("clean", Delete) {
2828
delete rootProject.buildDir
2929
}

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip

0 commit comments

Comments
 (0)