mirror of
https://github.com/immich-app/immich.git
synced 2024-12-13 11:54:52 +02:00
b36de7d7d4
* chore(mobile): upgrade gradle * update photo_manager * migrate from kapt to ksp pumps kotlin and other dependency version to fix build issues * increase java heap size --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
107 lines
3.2 KiB
Groovy
107 lines
3.2 KiB
Groovy
plugins {
|
|
id "com.android.application"
|
|
id "kotlin-android"
|
|
id "dev.flutter.flutter-gradle-plugin"
|
|
id 'com.google.devtools.ksp'
|
|
}
|
|
|
|
def localProperties = new Properties()
|
|
def localPropertiesFile = rootProject.file('local.properties')
|
|
if (localPropertiesFile.exists()) {
|
|
localPropertiesFile.withInputStream { localProperties.load(it) }
|
|
}
|
|
|
|
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
|
if (flutterVersionCode == null) {
|
|
flutterVersionCode = '1'
|
|
}
|
|
|
|
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()) {
|
|
keystorePropertiesFile.withInputStream { keystoreProperties.load(it) }
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 34
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
coreLibraryDesugaringEnabled true
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = '17'
|
|
}
|
|
|
|
sourceSets {
|
|
main.java.srcDirs += 'src/main/kotlin'
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "app.alextran.immich"
|
|
minSdkVersion 26
|
|
targetSdkVersion 34
|
|
versionCode flutterVersionCode.toInteger()
|
|
versionName flutterVersionName
|
|
}
|
|
|
|
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']
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
applicationIdSuffix '.debug'
|
|
versionNameSuffix '-DEBUG'
|
|
}
|
|
|
|
release {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
namespace 'app.alextran.immich'
|
|
}
|
|
|
|
flutter {
|
|
source '../..'
|
|
}
|
|
|
|
dependencies {
|
|
def kotlin_version = '2.0.20'
|
|
def kotlin_coroutines_version = '1.9.0'
|
|
def work_version = '2.9.1'
|
|
def concurrent_version = '1.2.0'
|
|
def guava_version = '33.3.1-android'
|
|
def glide_version = '4.16.0'
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version"
|
|
implementation "androidx.work:work-runtime-ktx:$work_version"
|
|
implementation "androidx.concurrent:concurrent-futures:$concurrent_version"
|
|
implementation "com.google.guava:guava:$guava_version"
|
|
implementation "com.github.bumptech.glide:glide:$glide_version"
|
|
ksp "com.github.bumptech.glide:ksp:$glide_version"
|
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.2'
|
|
}
|
|
|
|
// This is uncommented in F-Droid build script
|
|
//f configurations.all {
|
|
//f exclude group: 'com.google.android.gms'
|
|
//f }
|