1- def localProperties = new Properties ()
2- def localPropertiesFile = rootProject. file(' local.properties' )
3- if (localPropertiesFile. exists()) {
4- localPropertiesFile. withReader(' UTF-8' ) { reader ->
5- localProperties. load(reader)
6- }
7- }
8-
9- def flutterRoot = localProperties. getProperty(' flutter.sdk' )
10- if (flutterRoot == null ) {
11- throw new GradleException (" Flutter SDK not found. Define location with flutter.sdk in the local.properties file." )
1+ plugins {
2+ id " com.android.application"
3+ id " kotlin-android"
4+ id " dev.flutter.flutter-gradle-plugin"
125}
136
14- def flutterVersionCode = localProperties. getProperty(' flutter.versionCode' )
15- if (flutterVersionCode == null ) {
16- flutterVersionCode = ' 1'
17- }
18-
19- def flutterVersionName = localProperties. getProperty(' flutter.versionName' )
20- if (flutterVersionName == null ) {
21- flutterVersionName = ' 1.0'
22- }
23-
24- apply plugin : ' com.android.application'
25- apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
26-
277android {
28- compileSdkVersion 31
29- ndkVersion " 21.4.7075529"
8+ namespace = " com.zero.flutter_gromore_ads_example"
9+ compileSdk = flutter. compileSdkVersion
10+ ndkVersion = flutter. ndkVersion
11+
3012 compileOptions {
31- sourceCompatibility JavaVersion . VERSION_1_8
32- targetCompatibility JavaVersion . VERSION_1_8
13+ sourceCompatibility = JavaVersion . VERSION_1_8
14+ targetCompatibility = JavaVersion . VERSION_1_8
15+ }
16+
17+ kotlinOptions {
18+ jvmTarget = JavaVersion . VERSION_1_8
3319 }
3420
3521 defaultConfig {
3622 // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3723 applicationId " com.flutterads.app"
38- minSdkVersion flutter. minSdkVersion
39- targetSdkVersion 30
40- versionCode flutterVersionCode. toInteger()
41- versionName flutterVersionName
42- multiDexEnabled true
24+ // You can update the following values to match your application needs.
25+ // For more information, see: https://flutter.dev/to/review-gradle-config.
26+ minSdk = flutter. minSdkVersion
27+ targetSdk = flutter. targetSdkVersion
28+ versionCode = flutter. versionCode
29+ versionName = flutter. versionName
30+ multiDexEnabled = true
4331 }
4432
4533 buildTypes {
@@ -57,7 +45,7 @@ android {
5745}
5846
5947flutter {
60- source ' ../..'
48+ source = " ../.."
6149}
6250
6351dependencies {
0 commit comments