SHARE
TWEET

Untitled

a guest Apr 23rd, 2019 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  26.  
  27. def keystorePropertiesFile = rootProject.file("keystore.properties")
  28.  
  29. def keystoreProperties = new Properties()
  30.  
  31. keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  32.  
  33.  
  34. android {
  35.     signingConfigs {
  36.         relese {
  37.             keyAlias keystoreProperties['keyAlias']
  38.             keyPassword keystoreProperties['keyPassword']
  39.             storeFile file(keystoreProperties['storeFile'])
  40.             storePassword keystoreProperties['storePassword']
  41.         }
  42.     }
  43.     compileSdkVersion 28
  44.     lintOptions {
  45.         disable 'InvalidPackage'
  46.     }
  47.     defaultConfig {
  48.         applicationId "just_use.store_promotion"
  49.         minSdkVersion 21
  50.         targetSdkVersion 28
  51.         versionCode flutterVersionCode.toInteger()
  52.         versionName flutterVersionName
  53.         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  54.     }
  55.     buildTypes {
  56.         release {
  57.             signingConfig signingConfigs.relese
  58.         }
  59.     }
  60. }
  61.  
  62. flutter {
  63.     source '../..'
  64. }
  65.  
  66. dependencies {
  67.     testImplementation 'junit:junit:4.12'
  68.     androidTestImplementation 'com.android.support.test:runner:1.1.1'
  69.     androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.1.1'
  70. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top