-
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathbuild.gradle
More file actions
277 lines (226 loc) · 10.5 KB
/
Copy pathbuild.gradle
File metadata and controls
277 lines (226 loc) · 10.5 KB
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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
/*
* Copyright (c) Techbee e.U.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*/
plugins {
id "com.android.application"
id "com.mikepenz.aboutlibraries.plugin"
id "kotlin-android"
id "kotlin-parcelize"
id "kotlinx-serialization"
id "com.google.devtools.ksp"
id "com.huawei.agconnect"
}
def localPropertiesFile = rootProject.file('local.properties')
def localProperties = new Properties()
if(localPropertiesFile.exists()) {
localProperties.load(new FileInputStream(localPropertiesFile))
}
android {
namespace "at.techbee.jtx"
compileSdk 34
defaultConfig {
applicationId "at.techbee.jtx"
buildConfigField "long", "buildTime", System.currentTimeMillis() + "L"
minSdkVersion 21
targetSdkVersion 34
versionCode 207090015
versionName "2.07.09" // keep -release as a suffix also for release, build flavor adds the suffix e.g. .gplay (e.g. 1.00.00-rc0.gplay)
buildConfigField "String", "versionCodename", "\"Love always wins ❤️💪\""
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testOptions {
unitTests.includeAndroidResources = true
unitTests.returnDefaultValues = true
}
ksp {
arg("room.generateKotlin", "true")
arg("room.schemaLocation", "$projectDir/schemas")
}
//don't forget to update locales_config.xml when changing the languages!
def locales = ["en", "de", "cs", "el", "es", "fr", "it", "nl", "ru", "zh", "ca", "ja", "zh-rTW", "hu", "vi", "sv"]
buildConfigField "String[]", "TRANSLATION_ARRAY", "new String[]{\""+locales.join("\",\"")+"\"}"
resourceConfigurations += locales
buildConfigField "String", "CROWDIN_API_KEY", "\"" + (System.getenv("CROWDIN_API_KEY") ?: localProperties["crowdin.apikey"] ) + "\""
buildConfigField "String", "GITHUB_CONTRIBUTORS_API_KEY", "\"" + (System.getenv("GH_CONTRIBUTORS_API_KEY") ?: localProperties["githubcontributors.apikey"] ) + "\""
resValue "string", "google_geo_api_key", System.getenv("GOOGLE_GEO_API_KEY") ?: localProperties["google.geo.apikey"] ?: ""
}
signingConfigs {
jtx {
storeFile file(System.getenv("ANDROID_KEYSTORE") ?: localProperties["keystore.file"] ?: file("/dev/null"))
storePassword System.getenv("ANDROID_KEYSTORE_PASSWORD") ?: localProperties["keystore.password"]
keyAlias System.getenv("ANDROID_KEY_ALIAS") ?: localProperties["keystore.key.alias"]
keyPassword System.getenv("ANDROID_KEY_PASSWORD") ?: localProperties["keystore.key.password"]
}
}
buildTypes {
release {
minifyEnabled = true
shrinkResources = false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.jtx
}
benchmark {
signingConfig signingConfigs.debug
matchingFallbacks = ['release']
debuggable false
}
// uncomment to test minifyEnabled without signing the package
debug {
//minifyEnabled = true
//shrinkResources = true
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
// Enables data binding.
buildFeatures {
buildConfig = true
compose true
}
composeOptions {
kotlinCompilerExtensionVersion "1.5.14"
}
packagingOptions {
resources {
excludes += ['META-INF/DEPENDENCIES', 'META-INF/LICENSE', 'META-INF/*.md']
pickFirsts += ['META-INF/AL2.0', 'META-INF/LGPL2.1']
}
}
flavorDimensions = ['version']
productFlavors {
gplay {
dimension 'version'
versionNameSuffix '.gplay'
}
amazon {
dimension 'version'
versionNameSuffix '.amazon'
}
ose {
dimension 'version'
versionNameSuffix '.ose'
}
generic {
dimension 'version'
versionNameSuffix '.generic'
}
huawei {
dimension 'version'
versionNameSuffix '.huawei'
}
}
compileOptions {
// Flag to enable support for the new language APIs, this is especially necessary to use java.time for versions < O
// https://developer.android.com/studio/write/java8-support#library-desugaring
coreLibraryDesugaringEnabled = true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
lint {
disable 'MissingTranslation', 'ExtraTranslation'
}
}
configurations {
configureEach {
// exclude modules which are in conflict with system libraries
exclude module: "commons-logging"
exclude group: "org.json", module: "json"
// Groovy requires SDK 26+, and it's not required, so exclude it
exclude group: 'org.codehaus.groovy'
}
}
dependencies {
implementation "com.github.bitfireAT:ical4android:6f2601f"
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Android KTX
implementation "androidx.core:core-ktx:$version_core"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3"
// Android Annotations
implementation "androidx.annotation:annotation:1.8.0"
// Room dependencies
implementation "androidx.room:room-runtime:$version_room"
implementation "androidx.room:room-ktx:$version_room" // Kotlin Extensions and Coroutines support for Room
ksp "androidx.room:room-compiler:$version_room"
// Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version_coroutine"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$version_coroutine"
implementation "androidx.preference:preference-ktx:1.2.1"
// Volley for simple network requests
implementation "com.android.volley:volley:1.2.1"
// Google billing
gplayImplementation "com.android.billingclient:billing-ktx:$version_billing"
// Google request for review
gplayImplementation "com.google.android.play:review:$version_review"
gplayImplementation "com.google.android.play:review-ktx:$version_review"
// Amazon billing & maps support
amazonImplementation 'com.amazon.device:amazon-appstore-sdk:3.0.4'
amazonImplementation "com.google.maps.android:maps-compose:5.0.1"
amazonImplementation "com.google.android.gms:play-services-maps:18.2.0"
amazonImplementation "com.google.android.gms:play-services-location:21.2.0"
// Huawei billing
huaweiImplementation "com.huawei.hms:iap:$version_huawei_iap"
huaweiImplementation "com.huawei.hms:appservice:6.10.0.300"
// Google Maps
gplayImplementation "com.google.maps.android:maps-compose:5.0.1"
gplayImplementation "com.google.android.gms:play-services-maps:18.2.0"
gplayImplementation "com.google.android.gms:play-services-location:21.2.0"
//OSM
oseImplementation "org.osmdroid:osmdroid-android:$version_osmdroid"
genericImplementation "org.osmdroid:osmdroid-android:$version_osmdroid"
huaweiImplementation "org.osmdroid:osmdroid-android:$version_osmdroid"
// Workmanager support
implementation "androidx.work:work-runtime-ktx:$version_work"
androidTestImplementation "androidx.work:work-testing:$version_work"
//support for java.time for older Android versions (<O)
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
androidTestImplementation "androidx.test:core-ktx:1.5.0"
androidTestImplementation "androidx.test.ext:junit-ktx:1.1.5"
//androidTestImplementation "androidx.test.espresso:espresso-core:3.5.0-alpha07"
androidTestImplementation "androidx.arch.core:core-testing:2.2.0"
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$version_coroutine"
androidTestImplementation "androidx.test:runner:1.5.2"
androidTestImplementation "androidx.test:rules:1.5.0"
// Testing
testImplementation "junit:junit:4.13.2"
testImplementation "androidx.room:room-testing:$version_room"
testImplementation "androidx.arch.core:core-testing:2.2.0"
testImplementation "androidx.test:core-ktx:1.5.0"
// Required -- JUnit 4 framework
testImplementation "androidx.test.ext:junit-ktx:1.1.5"
//testImplementation "org.mockito:mockito-core:5.3.1"
//About Libraries
implementation "com.mikepenz:aboutlibraries-core:${version_about_libraries}"
implementation "com.mikepenz:aboutlibraries-compose:${version_about_libraries}"
// Compose Color Picker
implementation "com.godaddy.android.colorpicker:compose-color-picker-android:0.7.0"
// appcompat for language selection
implementation "androidx.appcompat:appcompat:$version_appcompat"
// jetpack compose
implementation "androidx.compose.ui:ui:$version_compose"
implementation "androidx.compose.material3:material3:1.2.1"
implementation "androidx.compose.material:material-icons-extended:1.6.7"
implementation "androidx.compose.ui:ui-tooling-preview:$version_compose"
implementation "androidx.compose.ui:ui-text-google-fonts:$version_compose"
//implementation "androidx.activity:activity-compose:1.6.0"
implementation "androidx.compose.runtime:runtime-livedata:$version_compose"
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.8.0"
implementation "androidx.navigation:navigation-compose:2.7.7"
implementation "com.arnyminerz.markdowntext:markdowntext:1.3.2"
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$version_compose"
debugImplementation "androidx.compose.ui:ui-tooling:$version_compose"
debugImplementation "androidx.compose.ui:ui-test-manifest:$version_compose"
// permissions from accompanist
implementation "com.google.accompanist:accompanist-permissions:$version_accompanist"
implementation "androidx.glance:glance-appwidget:1.1.0-rc01"
implementation "androidx.biometric:biometric-ktx:1.2.0-alpha05"
implementation "androidx.profileinstaller:profileinstaller:1.3.1"
//image loading from the web
implementation "io.coil-kt:coil-compose:2.6.0"
implementation "com.kizitonwose.calendar:compose:2.5.1"
implementation "com.googlecode.libphonenumber:libphonenumber:8.13.37"
implementation "sh.calvin.reorderable:reorderable:2.1.1"
}