rsflutterapp

Bahnhofsfoto-App for Android and iOS using Flutter
git clone git://archive.git.mtrnord.blog/MTRNord/rsflutterapp.git
Log | Files | Refs | README

build.gradle (2130B)


      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 29
     30 
     31     sourceSets {
     32         main.java.srcDirs += 'src/main/kotlin'
     33     }
     34 
     35     lintOptions {
     36         disable 'InvalidPackage'
     37     }
     38 
     39     defaultConfig {
     40         applicationId "de.bahnhoefe.deutschlands.bahnhofsfotos"
     41         minSdkVersion 20
     42         targetSdkVersion 29
     43         versionCode flutterVersionCode.toInteger()
     44         versionName flutterVersionName
     45         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
     46     }
     47 
     48     buildTypes {
     49         release {
     50             // TODO: Add your own signing config for the release build.
     51             // Signing with the debug keys for now, so `flutter run --release` works.
     52             signingConfig signingConfigs.debug
     53             applicationIdSuffix '.release'
     54 
     55             minifyEnabled true
     56             shrinkResources true
     57         }
     58         debug {
     59             applicationIdSuffix '.debug'
     60             versionNameSuffix "-debug"
     61         }
     62     }
     63 }
     64 
     65 flutter {
     66     source '../..'
     67 }
     68 
     69 dependencies {
     70     implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
     71     testImplementation 'junit:junit:4.12'
     72     androidTestImplementation 'androidx.test:runner:1.1.1'
     73     androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
     74 }