1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- def localProperties = new Properties()
- def localPropertiesFile = rootProject.file('local.properties')
- if (localPropertiesFile.exists()) {
- localPropertiesFile.withReader('UTF-8') { reader ->
- localProperties.load(reader)
- }
- }
- def flutterRoot = localProperties.getProperty('flutter.sdk')
- if (flutterRoot == null) {
- throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
- }
- def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
- if (flutterVersionCode == null) {
- flutterVersionCode = '2'
- }
- def flutterVersionName = localProperties.getProperty('flutter.versionName')
- if (flutterVersionName == null) {
- flutterVersionName = '1.0'
- }
- def keystoreProperties = new Properties()
- def keystorePropertiesFile = rootProject.file('key.properties')
- if (keystorePropertiesFile.exists()) {
- keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
- }
- apply plugin: 'com.android.application'
- apply plugin: 'kotlin-android'
- apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
- android {
- compileSdkVersion 29
- sourceSets {
- main.java.srcDirs += 'src/main/kotlin'
- }
- lintOptions {
- disable 'InvalidPackage'
- }
- defaultConfig {
- applicationId "com.company55.notes"
- minSdkVersion 21
- targetSdkVersion 30
- versionCode flutterVersionCode.toInteger()
- versionName flutterVersionName
- }
- signingConfigs {
- release {
- keyAlias keystoreProperties['keyAlias']
- keyPassword keystoreProperties['keyPassword']
- storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
- storePassword keystoreProperties['storePassword']
- }
- }
- buildTypes {
- release {
- signingConfig signingConfigs.release
- }
- }
- }
- flutter {
- source '../..'
- }
- dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
- }
|