antasofa

build.gradle

Jul 8th, 2024 (edited)
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.07 KB | Source Code | 0 0
  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 GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
  12. }
  13.  
  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 plugin: 'kotlin-android'
  26. apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  27.  
  28. android {
  29.     compileSdkVersion 34
  30.     ndkVersion '25.2.9519653'
  31.  
  32.     sourceSets {
  33.         main.java.srcDirs += 'src/main/kotlin'
  34.     }
  35.  
  36.     lintOptions {
  37.         disable 'InvalidPackage'
  38.     }
  39.  
  40.     defaultConfig {
  41.         // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  42.         applicationId "org.seameoceccep.Anaking"
  43.         minSdkVersion 23
  44.         targetSdkVersion 34
  45.         versionCode flutterVersionCode.toInteger()
  46.         versionName flutterVersionName
  47.     }
  48.  
  49.     buildTypes {
  50.         release {
  51.             // TODO: Add your own signing config for the release build.
  52.             // Signing with the debug keys for now, so `flutter run --release` works.
  53.             signingConfig signingConfigs.debug
  54.  
  55.             minifyEnabled true
  56.             shrinkResources true
  57.             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  58.  
  59.             // ndk {
  60.             //         abiFilters 'armeabi-v7a'
  61.             // }
  62.         }
  63.     }
  64. }
  65.  
  66. flutter {
  67.     source '../..'
  68. }
  69.  
  70. dependencies {
  71.     implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  72. }
  73.  
Add Comment
Please, Sign In to add comment