Advertisement
jevixlugya

build.gradle file

Apr 16th, 2024 (edited)
599
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 2.01 KB | None | 0 0
  1. plugins {
  2.     id "com.android.application"
  3.     id "kotlin-android"
  4.     id "dev.flutter.flutter-gradle-plugin"
  5.     id("com.google.gms.google-services")
  6. }
  7.  
  8. def localProperties = new Properties()//error here
  9. def localPropertiesFile = rootProject.file('local.properties')
  10. if (localPropertiesFile.exists()) {
  11.     localPropertiesFile.withReader('UTF-8') { reader ->
  12.         localProperties.load(reader)
  13.     }
  14. }
  15.  
  16. def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
  17. if (flutterVersionCode == null) {
  18.     flutterVersionCode = '1'
  19. }
  20.  
  21. def flutterVersionName = localProperties.getProperty('flutter.versionName')
  22. if (flutterVersionName == null) {
  23.     flutterVersionName = '1.0'
  24. }
  25.  
  26. android {
  27.     namespace "com.example.sda_community_app"
  28.     compileSdkVersion 34
  29.     ndkVersion flutter.ndkVersion
  30.  
  31.     compileOptions {
  32.         sourceCompatibility JavaVersion.VERSION_1_8
  33.         targetCompatibility JavaVersion.VERSION_1_8
  34.     }
  35.  
  36.     kotlinOptions {
  37.         jvmTarget = '1.8'
  38.     }
  39.  
  40.     sourceSets {
  41.         main.java.srcDirs += 'src/main/kotlin'
  42.     }
  43.  
  44.     defaultConfig {
  45.         // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  46.         applicationId "com.example.sda_community_app"
  47.         // You can update the following values to match your application needs.
  48.         // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
  49.         minSdkVersion 21
  50.         targetSdkVersion
  51.         versionCode flutterVersionCode.toInteger()
  52.         versionName flutterVersionName
  53.     }
  54.  
  55.     buildTypes {
  56.         release {
  57.             // TODO: Add your own signing config for the release build.
  58.             // Signing with the debug keys for now, so `flutter run --release` works.
  59.             signingConfig signingConfigs.debug
  60.         }
  61.     }
  62. }
  63.  
  64. flutter {
  65.     source '../..'
  66. }
  67.  
  68. dependencies {
  69.     implementation(platform("com.google.firebase:firebase-bom:32.7.1"))
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement