-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
221 lines (187 loc) · 8.01 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
plugins {
alias libs.plugins.android.application
alias libs.plugins.kotlin.android
alias libs.plugins.kotlin.plugin.compose
alias libs.plugins.ksp.devtools
alias libs.plugins.androidx.room
id 'kotlin-parcelize'
}
android {
namespace 'com.pydio.android.cells'
compileSdk 34
// Gather overrides in a distinct folder for easier maintenance
sourceSets {
main {
java.srcDirs = ['src/main/java']
res.srcDirs = ['src/main/res', 'src/main/res-overrides']
}
test {
java.srcDirs = ['src/test/java']
res.srcDirs = ['src/test/resources']
}
androidTest {
java.srcDirs = ['src/androidTest/java']
res.srcDirs = ['src/androidTest/resources']
}
}
defaultConfig {
// Main legacy App ID
applicationId "com.pydio.android.Client"
// Test ID to be able to have the next app along with the production one on a single device
// applicationId "com.pydio.android.cells.next"
versionCode ownVersions['cells-app.code'] as int
versionName ownVersions['cells-app.name']
minSdkVersion ownVersions['android.sdk.min'] as int
targetSdkVersion ownVersions['android.sdk.target'] as int
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
signingConfigs {
release {
storeFile file(configs['keystore.path'])
storePassword configs['keystore.pwd']
keyAlias configs['signkey.alias']
keyPassword configs['signkey.pwd']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
resValue "string", "app_version",
"${defaultConfig.versionName}"
minifyEnabled true
// If you haven't already built your app using minifyEnabled for code shrinking,
// then try that before enabling shrinkResources, because you might need to edit your proguard-rules.pro file
// to keep classes or methods that are created or invoked dynamically before you start removing resources.
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// See https://developer.android.com/build/shrink-code#android_gradle_plugin_version_41_or_later
// And you must have this installed in Android Studio https://developer.android.com/studio/projects/install-ndk
// to also generate and upload the file that enables understanding stack traces seen in production
// The generated mapping.txt file can than be uploaded on the store following this:
// https://support.google.com/googleplay/android-developer/answer/9848633#upload_file&zippy=%2Cupload-files-using-play-console
ndk {
debugSymbolLevel 'FULL'
}
}
debug {
versionNameSuffix = '-dev'
resValue "string", "app_version",
"${defaultConfig.versionName}${versionNameSuffix}"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
compose true
buildConfig true
}
room {
schemaDirectory "$projectDir/schemas"
}
lint {
abortOnError false
}
// We do not want that the linter makes builds fail. It is quite extremist by default.
}
dependencies {
if (useLocalSdkJava) {
api project(":sdk-java")
println "##################################"
println "[DEBUG] Using local java SDK"
} else {
println "[WARNING] **Not** using local SDK "
api "com.pydio.cells:cells-sdk-java:${ownVersions['java.sdk']}"
println "[DEBUG] Retrieve java sdk from maven repo"
}
// Dependencies and versions are defined in the toml catalog in <root>/gradle folder
// Ensure you include the KSP API if not already added
implementation libs.symbol.processing.api
ksp libs.room.compiler
implementation libs.room.ktx // Optional: For Kotlin Coroutines support
/* Kotlin and extensions */
implementation libs.kotlin.stdlib
implementation libs.kotlinx.coroutines.core
implementation libs.kotlinx.coroutines.android
/* Koin */
// Dependency injection with Koin https://insert-koin.io/
implementation platform(libs.koin.bom)
implementation libs.koin.core
implementation libs.koin.android
implementation libs.koin.androidx.workmanager
implementation libs.koin.androidx.navigation
implementation libs.koin.androidx.compose
// Compose libraries
// Latest version can be found here: https://developer.android.com/jetpack/compose/bom
implementation platform(libs.compose.bom)
/* Androidx */
implementation libs.androidx.core
implementation libs.androidx.appcompat
implementation libs.androidx.core.ktx
implementation libs.androidx.runtime
implementation libs.androidx.ui
implementation libs.androidx.ui.util
implementation libs.androidx.ui.tooling
implementation libs.androidx.foundation
implementation libs.androidx.foundation.layout
implementation libs.androidx.material3
implementation libs.androidx.material3.windowsizeclass
// We use material 3, so remove remaining code that depend on this and remove the dep.
implementation libs.androidx.material
// This library is also provided as an API dependency by androidx.compose.material:material.
// We specify it explicitly so that we won't break when we finally remove material lib from
// the explicit dependency tree
implementation libs.androidx.material.icons.core
// this separate library, the full set of Material icons. Due to the very large size of this lib,
// Make sure to use R8/Proguard to strip unused icons when including this as a direct dependency.
// See https://developer.android.com/reference/kotlin/androidx/compose/material/icons/package-summary
implementation libs.androidx.material.icons.extended
// Extended UI features: prefs and splash screen
implementation libs.androidx.preference
implementation libs.androidx.core.splashscreen
// Material UI => we still need this to build custom palette based on remote server custom primary color
implementation libs.material
// ViewModel
implementation libs.androidx.lifecycle.viewmodel.ktx
// Navigation UI
implementation libs.androidx.navigation.ui.ktx
// Include extensions the permits integration of Compose with extra TP libraries
implementation libs.androidx.navigation.compose
implementation libs.insert.koin.koin.androidx.compose
// Enable custom data loader for glide library (display images)
implementation libs.glide
annotationProcessor libs.glide.compiler
ksp libs.glide.ksp
// implementation libs.glide.ktx
implementation libs.glide.compose
// Work for background jobs
implementation libs.androidx.work.runtime.ktx
// File transfer
implementation libs.aws.android.sdk.s3
// A few extra libraries
implementation libs.commons.codec
implementation libs.google.gson
implementation libs.zxing // Generate QRCodes
// Tmp addition
implementation libs.palette.ktx
// To enable legacy preferences migration
implementation libs.datastore.preferences
// Tests
testImplementation libs.junit
testImplementation libs.koin.test
testImplementation libs.koin.test.junit4
testImplementation libs.kotlinx.coroutines.test
implementation libs.androidx.junit.ktx
// Unfortunately, we cannot inherit from "simple" test dependencies.
androidTestImplementation libs.koin.test
androidTestImplementation libs.koin.test.junit4
androidTestImplementation libs.kotlinx.coroutines.test
androidTestImplementation libs.androidx.junit
androidTestImplementation libs.espresso.core
testImplementation libs.junit
testImplementation libs.androidx.test.core
}