Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.12 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.  
  28. android {
  29.     compileSdkVersion 28
  30.  
  31.     sourceSets {
  32.         main.java.srcDirs += 'src/main/kotlin'
  33.     }
  34.  
  35.     lintOptions {
  36.         disable 'InvalidPackage'
  37.     }
  38.  
  39.     defaultConfig {
  40.         // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  41.         applicationId "com.example.f_test_conn"
  42.         minSdkVersion 16
  43.         targetSdkVersion 28
  44.         versionCode flutterVersionCode.toInteger()
  45.         versionName flutterVersionName
  46.         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  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.     }
  56. }
  57.  
  58. flutter {
  59.     source '../..'
  60. }
  61.  
  62. dependencies {
  63.     implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  64.     testImplementation 'junit:junit:4.12'
  65.     androidTestImplementation 'com.android.support.test:runner:1.0.2'
  66.     androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  67. }
  68.  
  69. apply plugin: 'com.google.gms.google-services'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement