@@ -24,24 +24,62 @@ cp -r $ROOT_DIR/canaries/lib .
24
24
cp $ROOT_DIR /build-support/dummy_amplifyconfiguration.dart lib/amplifyconfiguration.dart
25
25
26
26
# Android
27
- sed -i ' ' -e " s/id \" com.android.application\" .*/id \" com.android.application\" version \" 8.1.0\" apply false/" ./android/settings.gradle
28
- sed -i ' ' -e " s/id \" org.jetbrains.kotlin.android\" .*/id \" org.jetbrains.kotlin.android\" version \" 1.9.10\" apply false/" ./android/settings.gradle
29
- cat ./android/settings.gradle
30
-
31
- # TODO(khatruong2009): remove this line after the next stable release (3.22.0 or 4.0)
32
- sed -i ' ' -e " s/minSdkVersion .*/minSdkVersion 24/" ./android/app/build.gradle
33
- sed -i ' ' -e " s/minSdk .*/minSdk 24/" ./android/app/build.gradle
34
- sed -i ' ' -e ' /id "kotlin-android"/a\
35
- id ' \' ' kotlin-parcelize' \' ' ' ./android/app/build.gradle
36
- sed -i ' ' -e " s/compileSdk .*/compileSdk = 35/" ./android/app/build.gradle
37
- sed -i ' ' -e " s/sourceCompatibility .*/sourceCompatibility = JavaVersion.VERSION_17/" ./android/app/build.gradle
38
- sed -i ' ' -e " s/targetCompatibility .*/targetCompatibility = JavaVersion.VERSION_17/" ./android/app/build.gradle
39
- # TODO(equartey): remove this line after the next stable release (3.22.0 or 4.0)
40
- sed -i ' ' -e ' /kotlinOptions {/,/}/ s/jvmTarget = .*/jvmTarget = ' \' ' 17' \' ' /' ./android/app/build.gradle
41
- cat ./android/app/build.gradle
42
-
43
- sed -i ' ' -e " s#distributionUrl=.*#distributionUrl=https\\ ://services.gradle.org/distributions/gradle-8.1-all.zip#" ./android/gradle/wrapper/gradle-wrapper.properties
44
- cat ./android/gradle/wrapper/gradle-wrapper.properties
27
+ # Flutter >=3.29.0
28
+ if [ -e ./android/settings.gradle.kts ]
29
+ then
30
+ sed -i ' ' -e " s/id(\" com.android.application\" ) .*/id(\" com.android.application\" ) version \" 8.1.0\" apply false/" ./android/settings.gradle.kts
31
+ sed -i ' ' -e " s/id(\" org.jetbrains.kotlin.android\" ) .*/id(\" org.jetbrains.kotlin.android\" ) version \" 1.9.10\" apply false/" ./android/settings.gradle.kts
32
+ cat ./android/settings.gradle.kts
33
+
34
+ # TODO(khatruong2009): remove this line after the next stable release (3.22.0 or 4.0)
35
+ sed -i ' ' -e " s/minSdkVersion = .*/minSdkVersion = 24/" ./android/app/build.gradle.kts
36
+ sed -i ' ' -e " s/minSdk = .*/minSdk = 24/" ./android/app/build.gradle.kts
37
+
38
+ sed -i ' ' -e ' /id "kotlin-android"/a\
39
+ id ' \' ' kotlin-parcelize' \' ' ' ./android/app/build.gradle.kts
40
+
41
+ sed -i ' ' -e " s/compileSdk = .*/compileSdk = 35/" ./android/app/build.gradle.kts
42
+
43
+ sed -i ' ' -e " s/sourceCompatibility = .*/sourceCompatibility = JavaVersion.VERSION_17/" ./android/app/build.gradle.kts
44
+
45
+ sed -i ' ' -e " s/targetCompatibility = .*/targetCompatibility = JavaVersion.VERSION_17/" ./android/app/build.gradle.kts
46
+
47
+ # TODO(equartey): remove this line after the next stable release (3.22.0 or 4.0)
48
+ sed -i ' ' -e " s/jvmTarget = .*/jvmTarget = JavaVersion.VERSION_17.toString()/" ./android/app/build.gradle.kts
49
+
50
+ sed -i ' ' -e " s/compileOptions {.*/compileOptions {\n\t\tisCoreLibraryDesugaringEnabled = true/" ./android/app/build.gradle.kts
51
+ sed -i ' ' -e " s/flutter {.*/dependencies {\n\tcoreLibraryDesugaring(\" com.android.tools:desugar_jdk_libs:2.0.3\" )\n}\n\nflutter {/" ./android/app/build.gradle.kts
52
+ cat ./android/app/build.gradle.kts
53
+
54
+ sed -i ' ' -e " s#distributionUrl=.*#distributionUrl=https\\ ://services.gradle.org/distributions/gradle-8.9-all.zip#" ./android/gradle/wrapper/gradle-wrapper.properties
55
+ cat ./android/gradle/wrapper/gradle-wrapper.properties
56
+ # Flutter <3.29.0 (delete this else block when min Flutter SDK is bumped to 3.29.0 or higher)
57
+ else
58
+ sed -i ' ' -e " s/id \" com.android.application\" .*/id \" com.android.application\" version \" 8.1.0\" apply false/" ./android/settings.gradle
59
+ sed -i ' ' -e " s/id \" org.jetbrains.kotlin.android\" .*/id \" org.jetbrains.kotlin.android\" version \" 1.9.10\" apply false/" ./android/settings.gradle
60
+ cat ./android/settings.gradle
61
+
62
+ sed -i ' ' -e " s/minSdkVersion = .*/minSdkVersion = 24/" ./android/app/build.gradle
63
+ sed -i ' ' -e " s/minSdk = .*/minSdk = 24/" ./android/app/build.gradle
64
+
65
+ sed -i ' ' -e ' /id "kotlin-android"/a\
66
+ id ' \' ' kotlin-parcelize' \' ' ' ./android/app/build.gradle
67
+
68
+ sed -i ' ' -e " s/compileSdk = .*/compileSdk = 35/" ./android/app/build.gradle
69
+
70
+ sed -i ' ' -e " s/sourceCompatibility = .*/sourceCompatibility = JavaVersion.VERSION_17/" ./android/app/build.gradle
71
+
72
+ sed -i ' ' -e " s/targetCompatibility = .*/targetCompatibility = JavaVersion.VERSION_17/" ./android/app/build.gradle
73
+
74
+ sed -i ' ' -e " s/jvmTarget = .*/jvmTarget = JavaVersion.VERSION_17/" ./android/app/build.gradle
75
+
76
+ # sed -i '' -e "s/compileOptions {.*/compileOptions {\n\t\tCoreLibraryDesugaringEnabled = true/" ./android/app/build.gradle
77
+ sed -i ' ' -e " s/flutter {.*/dependencies {\n\tcoreLibraryDesugaring(\" com.android.tools:desugar_jdk_libs:2.0.3\" )\n}\n\nflutter {/" ./android/app/build.gradle
78
+ cat ./android/app/build.gradle
79
+
80
+ sed -i ' ' -e " s#distributionUrl=.*#distributionUrl=https\\ ://services.gradle.org/distributions/gradle-8.9-all.zip#" ./android/gradle/wrapper/gradle-wrapper.properties
81
+ cat ./android/gradle/wrapper/gradle-wrapper.properties
82
+ fi
45
83
46
84
# iOS
47
85
sed -i ' ' -e " s/# platform .*/platform :ios, '13.0'/" ./ios/Podfile
0 commit comments