fluffychat/android/app/build.gradle

86 lines
2.5 KiB
Groovy
Raw Permalink Normal View History

2020-01-01 19:10:13 +01:00
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 = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
2020-01-01 19:10:13 +01:00
android {
compileSdkVersion 33
2020-01-01 19:10:13 +01:00
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
2021-01-28 18:50:29 +01:00
lintOptions {
disable 'InvalidPackage'
}
2020-01-01 19:10:13 +01:00
defaultConfig {
applicationId "chat.fluffy.fluffychat"
minSdkVersion 19
2022-11-21 17:31:29 +01:00
targetSdkVersion 31
2020-01-01 19:10:13 +01:00
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
2020-01-01 19:10:13 +01:00
}
signingConfigs {
release {
2020-01-03 11:47:31 +01:00
if (keystorePropertiesFile.exists()) {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
}
2020-01-01 19:10:13 +01:00
buildTypes {
2020-01-03 11:47:31 +01:00
debug {
signingConfig signingConfigs.debug
}
2020-01-01 19:10:13 +01:00
release {
signingConfig signingConfigs.release
2020-01-01 19:10:13 +01:00
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
//implementation 'com.google.firebase:firebase-messaging:19.0.1' // Workaround for https://github.com/microg/android_packages_apps_GmsCore/issues/313#issuecomment-617651698
implementation 'androidx.multidex:multidex:2.0.1'
2020-01-01 19:10:13 +01:00
}
2020-01-03 17:23:40 +01:00
//apply plugin: 'com.google.gms.google-services'