Zanak

build.gradle

May 19th, 2021
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 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 new 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. apply plugin: 'com.google.gms.google-services'
  28.  
  29. android {
  30. compileSdkVersion 30
  31.  
  32. sourceSets {
  33. main.java.srcDirs += 'src/main/kotlin'
  34. }
  35.  
  36. defaultConfig {
  37. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  38. applicationId "com.zanak.firestore_demo"
  39. minSdkVersion 21
  40. targetSdkVersion 30
  41. versionCode flutterVersionCode.toInteger()
  42. versionName flutterVersionName
  43. }
  44.  
  45. buildTypes {
  46. release {
  47. // TODO: Add your own signing config for the release build.
  48. // Signing with the debug keys for now, so `flutter run --release` works.
  49. signingConfig signingConfigs.debug
  50. }
  51. }
  52. }
  53.  
  54. flutter {
  55. source '../..'
  56. }
  57.  
  58. dependencies {
  59. implementation 'com.google.firebase:firebase-analytics-ktx'
  60. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  61.  
  62. }
  63.  
Add Comment
Please, Sign In to add comment