2020-12-13 05:43:52 +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'
|
|
|
|
}
|
|
|
|
|
2023-03-01 17:32:06 +01:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
apply plugin: 'kotlin-android'
|
|
|
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
|
|
|
|
2020-12-13 05:43:52 +01:00
|
|
|
def keystoreProperties = new Properties()
|
|
|
|
def keystorePropertiesFile = rootProject.file('key.properties')
|
|
|
|
if (keystorePropertiesFile.exists()) {
|
|
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2023-03-01 17:32:06 +01:00
|
|
|
compileSdkVersion 33
|
2023-03-01 11:47:02 +01:00
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main.java.srcDirs += 'src/main/kotlin'
|
2020-12-13 05:43:52 +01:00
|
|
|
}
|
|
|
|
|
2023-03-01 17:32:06 +01:00
|
|
|
lintOptions {
|
|
|
|
disable 'InvalidPackage'
|
|
|
|
}
|
|
|
|
|
2020-12-13 05:43:52 +01:00
|
|
|
defaultConfig {
|
|
|
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
2021-12-21 13:35:25 +01:00
|
|
|
applicationId "gecko.axiomteam.fr"
|
2022-02-18 00:20:21 +01:00
|
|
|
minSdkVersion 19
|
2023-03-01 17:32:06 +01:00
|
|
|
targetSdkVersion 33
|
2020-12-13 05:43:52 +01:00
|
|
|
versionCode flutterVersionCode.toInteger()
|
|
|
|
versionName flutterVersionName
|
2021-02-18 04:42:57 +01:00
|
|
|
multiDexEnabled true
|
2020-12-13 05:43:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
signingConfigs {
|
|
|
|
release {
|
2021-01-28 17:50:40 +01:00
|
|
|
keyAlias keystoreProperties['keyAlias']
|
|
|
|
keyPassword keystoreProperties['keyPassword']
|
|
|
|
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
|
|
|
storePassword keystoreProperties['storePassword']
|
2020-12-13 05:43:52 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
// TODO: Add your own signing config for the release build.
|
|
|
|
// Signing with the debug keys for now, so `flutter run --release` works.
|
2022-08-06 02:46:53 +02:00
|
|
|
signingConfig signingConfigs.release //poka: comment this to build unsigned release, or set to signingConfigs.debug to sign with debug keys
|
2021-11-15 02:28:15 +01:00
|
|
|
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
2020-12-13 05:43:52 +01:00
|
|
|
}
|
2022-05-30 20:30:06 +02:00
|
|
|
debug {
|
|
|
|
signingConfig signingConfigs.debug
|
|
|
|
debuggable true
|
|
|
|
}
|
2020-12-13 05:43:52 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
flutter {
|
|
|
|
source '../..'
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
2023-03-01 17:32:06 +01:00
|
|
|
implementation 'androidx.work:work-runtime-ktx:2.7.0'
|
2020-12-13 05:43:52 +01:00
|
|
|
}
|