diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index a6f91f5d1..c8a05be04 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -8,7 +8,7 @@ if (localPropertiesFile.exists()) { def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") + throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") } def flutterVersionCode = localProperties.getProperty('flutter.versionCode') @@ -26,31 +26,54 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 29 + //compileSdkVersion flutter.compileSdkVersion + compileSdkVersion 33 + ndkVersion flutter.ndkVersion - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' } - lintOptions { - disable 'InvalidPackage' + sourceSets { + main.java.srcDirs += 'src/main/kotlin' } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.magarex.example" - minSdkVersion 16 - targetSdkVersion 29 + applicationId "com.arxara.arxara" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. + minSdkVersion 21 + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName + multiDexEnabled true + // multiDexEnabled true } + // signingConfigs{ + // debug{ + // KeyAlias 'upload' + // keyPassword 'android' + // storeFile file ('upload-keystore.jks') + // storePassword 'android' + // } + // } + buildTypes { - release { + debug { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig signingConfigs.debug } + release { + signingConfig signingConfigs.debug + } } } @@ -60,4 +83,8 @@ flutter { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + // implementation platform('com.google.firebase:firebase-bom:31.2.0') + // implementation 'com.google.firebase:firebase-analytics-ktx' + implementation 'com.android.support:multidex:1.0.3' + } diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 1e1091c6b..d4ce6f888 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -6,16 +6,20 @@ additional functionality it is fine to subclass or reimplement FlutterApplication and put your custom class here. --> +