@@ -3,20 +3,20 @@ buildscript {
33 google()
44 mavenCentral()
55 }
6- ext. kotlin_version = ' 2.1.0 '
6+ ext. kotlin_version = ' 1.9.22 '
77// ext {
88// agp_version = '7.4.2'
99// }
1010 dependencies {
1111 // START: FlutterFire Configuration
1212 classpath ' com.google.gms:google-services:4.3.15'
1313 // END: FlutterFire Configuration
14- classpath ' com.android.tools.build:gradle:7.4.2 '
14+ classpath ' com.android.tools.build:gradle:8.7.3 '
1515 }
1616}
1717
1818allprojects {
19- ext. kotlin_version = ' 1.8.10'
19+ // ext.kotlin_version = '1.8.10'
2020 repositories {
2121 google()
2222 mavenCentral()
@@ -40,7 +40,7 @@ rootProject.buildDir = '../build'
4040subprojects {
4141 project. buildDir = " ${ rootProject.buildDir} /${ project.name} "
4242
43- afterEvaluate {
43+ afterEvaluate { project ->
4444 // check if android block is available
4545
4646 if (it. hasProperty(' android' )) {
@@ -52,25 +52,38 @@ subprojects {
5252 android. namespace = packageName
5353 }
5454
55- // def javaVersion = JavaVersion.VERSION_17
56- // android {
57- // def androidApiVersion = 34
58- // compileSdkVersion androidApiVersion
59- // defaultConfig {
60- // targetSdkVersion androidApiVersion
55+ // if (project.plugins.hasPlugin("com.android.application") ||
56+ // project.plugins.hasPlugin("com. android.library")) {
57+ // project.android {
58+ // compileSdkVersion 34
59+ // buildToolsVersion "34.0.0"
60+ //
6161// }
62- // compileOptions {
63- // sourceCompatibility javaVersion
64- // targetCompatibility javaVersion
62+ // project.android.defaultConfig {
63+ // minSdkVersion 30
64+ // //targetSdkVersion 34
6565// }
66- // tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
67- // kotlinOptions {
68- // jvmTarget = javaVersion.toString()
69- // }
70- // }
71- // println("Setting java version to ${javaVersion.toString()} which is $javaVersion")
72- // println("Setting compileSdkVersion and targetSdkVersion to $androidApiVersion")
7366// }
67+
68+ def javaVersion = JavaVersion . VERSION_18
69+ android {
70+ def androidApiVersion = 34
71+ compileSdkVersion androidApiVersion
72+ defaultConfig {
73+ targetSdkVersion androidApiVersion
74+ }
75+ compileOptions {
76+ sourceCompatibility javaVersion
77+ targetCompatibility javaVersion
78+ }
79+ tasks. withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile ). configureEach {
80+ kotlinOptions {
81+ jvmTarget = javaVersion. toString()
82+ }
83+ }
84+ println (" Setting java version to ${ javaVersion.toString()} which is $javaVersion " )
85+ println (" Setting compileSdkVersion and targetSdkVersion to $androidApiVersion " )
86+ }
7487 }
7588
7689 }
0 commit comments