2022-02-03 18:06:44 +02: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'
|
2023-04-21 12:31:44 +02:00
|
|
|
apply plugin: 'kotlin-kapt'
|
2022-02-03 18:06:44 +02:00
|
|
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
|
|
|
|
2022-03-14 05:10:07 +02:00
|
|
|
def keystoreProperties = new Properties()
|
|
|
|
def keystorePropertiesFile = rootProject.file('key.properties')
|
|
|
|
if (keystorePropertiesFile.exists()) {
|
|
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-02-03 18:06:44 +02:00
|
|
|
android {
|
2024-01-27 18:14:32 +02:00
|
|
|
compileSdkVersion 34
|
2022-02-03 18:06:44 +02:00
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = '1.8'
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main.java.srcDirs += 'src/main/kotlin'
|
|
|
|
}
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
2022-03-14 05:10:07 +02:00
|
|
|
applicationId "app.alextran.immich"
|
2023-08-19 00:52:40 +02:00
|
|
|
minSdkVersion 26
|
2022-11-24 23:47:55 +02:00
|
|
|
targetSdkVersion 33
|
2022-02-03 18:06:44 +02:00
|
|
|
versionCode flutterVersionCode.toInteger()
|
|
|
|
versionName flutterVersionName
|
|
|
|
}
|
|
|
|
|
2023-02-02 05:50:07 +02:00
|
|
|
signingConfigs {
|
|
|
|
release {
|
|
|
|
def keyAliasVal = System.getenv("ALIAS")
|
|
|
|
def keyPasswordVal = System.getenv("ANDROID_KEY_PASSWORD")
|
|
|
|
def storePasswordVal = System.getenv("ANDROID_STORE_PASSWORD")
|
|
|
|
|
|
|
|
keyAlias keyAliasVal ? keyAliasVal : keystoreProperties['keyAlias']
|
|
|
|
keyPassword keyPasswordVal ? keyPasswordVal : keystoreProperties['keyPassword']
|
|
|
|
storeFile file("../key.jks") ? file("../key.jks") : file(keystoreProperties['storeFile'])
|
|
|
|
storePassword storePasswordVal ? storePasswordVal : keystoreProperties['storePassword']
|
|
|
|
}
|
|
|
|
}
|
2022-03-14 05:10:07 +02:00
|
|
|
|
2022-02-03 18:06:44 +02:00
|
|
|
buildTypes {
|
2023-06-18 06:10:57 +02:00
|
|
|
debug {
|
|
|
|
applicationIdSuffix '.debug'
|
|
|
|
versionNameSuffix '-DEBUG'
|
|
|
|
}
|
|
|
|
|
2022-02-03 18:06:44 +02:00
|
|
|
release {
|
2023-02-02 05:50:07 +02:00
|
|
|
signingConfig signingConfigs.release
|
2022-02-03 18:06:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
flutter {
|
|
|
|
source '../..'
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2022-08-18 16:41:59 +02:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
2023-06-10 20:13:59 +02:00
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version"
|
2022-08-18 16:41:59 +02:00
|
|
|
implementation "androidx.work:work-runtime-ktx:$work_version"
|
|
|
|
implementation "androidx.concurrent:concurrent-futures:$concurrent_version"
|
|
|
|
implementation "com.google.guava:guava:$guava_version"
|
2023-04-21 12:31:44 +02:00
|
|
|
implementation "com.github.bumptech.glide:glide:$glide_version"
|
|
|
|
kapt "com.github.bumptech.glide:compiler:$glide_version"
|
2022-02-03 18:06:44 +02:00
|
|
|
}
|
2023-09-05 01:08:43 +02:00
|
|
|
|
|
|
|
// This is uncommented in F-Droid build script
|
|
|
|
//f configurations.all {
|
|
|
|
//f exclude group: 'com.google.android.gms'
|
|
|
|
//f }
|