|
1 | 1 | plugins { |
2 | | - id "com.android.application" |
3 | | - id "kotlin-android" |
4 | | - id "dev.flutter.flutter-gradle-plugin" |
5 | | - id 'com.google.devtools.ksp' |
| 2 | + id "com.android.application" |
| 3 | + id "kotlin-android" |
| 4 | + id "dev.flutter.flutter-gradle-plugin" |
| 5 | + id 'com.google.devtools.ksp' |
6 | 6 | } |
7 | 7 |
|
8 | 8 | def localProperties = new Properties() |
9 | 9 | def localPropertiesFile = rootProject.file('local.properties') |
10 | 10 | if (localPropertiesFile.exists()) { |
11 | | - localPropertiesFile.withInputStream { localProperties.load(it) } |
| 11 | + localPropertiesFile.withInputStream { localProperties.load(it) } |
12 | 12 | } |
13 | 13 |
|
14 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') |
15 | 15 | if (flutterVersionCode == null) { |
16 | | - flutterVersionCode = '1' |
| 16 | + flutterVersionCode = '1' |
17 | 17 | } |
18 | 18 |
|
19 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') |
20 | 20 | if (flutterVersionName == null) { |
21 | | - flutterVersionName = '1.0' |
| 21 | + flutterVersionName = '1.0' |
22 | 22 | } |
23 | 23 |
|
24 | 24 | def keystoreProperties = new Properties() |
25 | 25 | def keystorePropertiesFile = rootProject.file('key.properties') |
26 | 26 | if (keystorePropertiesFile.exists()) { |
27 | | - keystorePropertiesFile.withInputStream { keystoreProperties.load(it) } |
| 27 | + keystorePropertiesFile.withInputStream { keystoreProperties.load(it) } |
28 | 28 | } |
29 | 29 |
|
30 | 30 | android { |
31 | | - compileSdkVersion 35 |
32 | | - |
33 | | - compileOptions { |
34 | | - sourceCompatibility JavaVersion.VERSION_17 |
35 | | - targetCompatibility JavaVersion.VERSION_17 |
36 | | - coreLibraryDesugaringEnabled true |
37 | | - } |
38 | | - |
39 | | - kotlinOptions { |
40 | | - jvmTarget = '17' |
41 | | - } |
42 | | - |
43 | | - sourceSets { |
44 | | - main.java.srcDirs += 'src/main/kotlin' |
| 31 | + compileSdkVersion 35 |
| 32 | + |
| 33 | + compileOptions { |
| 34 | + sourceCompatibility JavaVersion.VERSION_17 |
| 35 | + targetCompatibility JavaVersion.VERSION_17 |
| 36 | + coreLibraryDesugaringEnabled true |
| 37 | + } |
| 38 | + |
| 39 | + kotlinOptions { |
| 40 | + jvmTarget = '17' |
| 41 | + } |
| 42 | + |
| 43 | + sourceSets { |
| 44 | + main.java.srcDirs += 'src/main/kotlin' |
| 45 | + } |
| 46 | + |
| 47 | + defaultConfig { |
| 48 | + applicationId "app.alextran.immich" |
| 49 | + minSdkVersion 26 |
| 50 | + targetSdkVersion 35 |
| 51 | + versionCode flutterVersionCode.toInteger() |
| 52 | + versionName flutterVersionName |
| 53 | + } |
| 54 | + |
| 55 | + signingConfigs { |
| 56 | + release { |
| 57 | + def keyAliasVal = System.getenv("ALIAS") |
| 58 | + def keyPasswordVal = System.getenv("ANDROID_KEY_PASSWORD") |
| 59 | + def storePasswordVal = System.getenv("ANDROID_STORE_PASSWORD") |
| 60 | + |
| 61 | + keyAlias keyAliasVal ? keyAliasVal : keystoreProperties['keyAlias'] |
| 62 | + keyPassword keyPasswordVal ? keyPasswordVal : keystoreProperties['keyPassword'] |
| 63 | + storeFile file("../key.jks") ? file("../key.jks") : file(keystoreProperties['storeFile']) |
| 64 | + storePassword storePasswordVal ? storePasswordVal : keystoreProperties['storePassword'] |
45 | 65 | } |
| 66 | + } |
46 | 67 |
|
47 | | - defaultConfig { |
48 | | - applicationId "app.alextran.immich" |
49 | | - minSdkVersion 26 |
50 | | - targetSdkVersion 35 |
51 | | - versionCode flutterVersionCode.toInteger() |
52 | | - versionName flutterVersionName |
| 68 | + buildTypes { |
| 69 | + debug { |
| 70 | + applicationIdSuffix '.debug' |
| 71 | + versionNameSuffix '-DEBUG' |
53 | 72 | } |
54 | 73 |
|
55 | | - signingConfigs { |
56 | | - release { |
57 | | - def keyAliasVal = System.getenv("ALIAS") |
58 | | - def keyPasswordVal = System.getenv("ANDROID_KEY_PASSWORD") |
59 | | - def storePasswordVal = System.getenv("ANDROID_STORE_PASSWORD") |
60 | | - |
61 | | - keyAlias keyAliasVal ? keyAliasVal : keystoreProperties['keyAlias'] |
62 | | - keyPassword keyPasswordVal ? keyPasswordVal : keystoreProperties['keyPassword'] |
63 | | - storeFile file("../key.jks") ? file("../key.jks") : file(keystoreProperties['storeFile']) |
64 | | - storePassword storePasswordVal ? storePasswordVal : keystoreProperties['storePassword'] |
65 | | - } |
66 | | - } |
67 | | - |
68 | | - buildTypes { |
69 | | - debug { |
70 | | - applicationIdSuffix '.debug' |
71 | | - versionNameSuffix '-DEBUG' |
72 | | - } |
73 | | - |
74 | | - release { |
75 | | - signingConfig signingConfigs.release |
76 | | - } |
| 74 | + release { |
| 75 | + signingConfig signingConfigs.release |
77 | 76 | } |
78 | | - namespace 'app.alextran.immich' |
| 77 | + } |
| 78 | + namespace 'app.alextran.immich' |
79 | 79 | } |
80 | 80 |
|
81 | 81 | flutter { |
82 | | - source '../..' |
| 82 | + source '../..' |
83 | 83 | } |
84 | 84 |
|
85 | 85 | dependencies { |
86 | | - def kotlin_version = '2.0.20' |
87 | | - def kotlin_coroutines_version = '1.9.0' |
88 | | - def work_version = '2.9.1' |
89 | | - def concurrent_version = '1.2.0' |
90 | | - def guava_version = '33.3.1-android' |
91 | | - def glide_version = '4.16.0' |
92 | | - |
93 | | - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" |
94 | | - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version" |
95 | | - implementation "androidx.work:work-runtime-ktx:$work_version" |
96 | | - implementation "androidx.concurrent:concurrent-futures:$concurrent_version" |
97 | | - implementation "com.google.guava:guava:$guava_version" |
98 | | - implementation "com.github.bumptech.glide:glide:$glide_version" |
99 | | - ksp "com.github.bumptech.glide:ksp:$glide_version" |
100 | | - coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.2' |
| 86 | + def kotlin_version = '2.0.20' |
| 87 | + def kotlin_coroutines_version = '1.9.0' |
| 88 | + def work_version = '2.9.1' |
| 89 | + def concurrent_version = '1.2.0' |
| 90 | + def guava_version = '33.3.1-android' |
| 91 | + def glide_version = '4.16.0' |
| 92 | + def serialization_version = '1.8.1' |
| 93 | + |
| 94 | + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" |
| 95 | + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version" |
| 96 | + implementation "androidx.work:work-runtime-ktx:$work_version" |
| 97 | + implementation "androidx.concurrent:concurrent-futures:$concurrent_version" |
| 98 | + implementation "com.google.guava:guava:$guava_version" |
| 99 | + implementation "com.github.bumptech.glide:glide:$glide_version" |
| 100 | + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$serialization_version" |
| 101 | + |
| 102 | + ksp "com.github.bumptech.glide:ksp:$glide_version" |
| 103 | + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.2' |
101 | 104 | } |
102 | 105 |
|
103 | 106 | // This is uncommented in F-Droid build script |
|
0 commit comments