-
Notifications
You must be signed in to change notification settings - Fork 22
/
build.gradle
268 lines (224 loc) · 9.44 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
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
import org.ajoberstar.grgit.Grgit
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-parcelize'
id 'kotlin-kapt'
id 'org.ajoberstar.grgit' version '4.1.0'
id 'com.google.dagger.hilt.android'
}
group 'mil.nga.giat.mage'
version '7.2.3'
ext {
sourceRefspec = Grgit.open(currentDir: project.rootDir).head().id
//Test resources
buildToolsVersion = "28.0.3"
androidxLibVersion = "1.0.0"
extTruthVersion = '1.2.0'
coreVersion = "1.5.0"
extJUnitVersion = "1.1.5"
runnerVersion = "1.5.2"
espressoVersion = "3.5.1"
}
kapt {
correctErrorTypes true
}
def serverURL = hasProperty('SERVER_URL') ? SERVER_URL : ''
def googleMapsApiReleaseKey = hasProperty('RELEASE_MAPS_API_KEY') ? RELEASE_MAPS_API_KEY : ''
def googleMapsApiDebugKey = hasProperty('DEBUG_MAPS_API_KEY') ? DEBUG_MAPS_API_KEY : ''
android {
compileSdk 34
namespace 'mil.nga.giat.mage'
dataBinding {
enabled = true
}
sourceSets {
androidTest.setRoot('tests')
androidTest.java.srcDirs = ['tests/src']
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlin {
jvmToolchain(11)
}
kotlin {
jvmToolchain(17)
}
kotlinOptions {
jvmTarget = "17"
freeCompilerArgs = ["-Xcontext-receivers"]
}
buildFeatures {
compose true
viewBinding true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.3"
}
packagingOptions {
resources {
excludes += [
'META-INF/INDEX.LIST',
'META-INF/LICENSE.md',
'META-INF/LICENSE-notice.md'
]
}
}
defaultConfig {
applicationId "mil.nga.giat.mage"
versionName project.version
versionCode VERSION_CODE as int
minSdkVersion 27
targetSdkVersion 33
multiDexEnabled true
resValue "string", "serverURLDefaultValue", serverURL
resValue "string", "recentMapXYZDefaultValue", "263.0,40.0,3"
resValue "bool", "isWearBuildDefaultValue", "false"
resValue "string", "source_refspec", project.sourceRefspec
resValue "string", "applicationId", applicationId
manifestPlaceholders source_refspec: project.sourceRefspec
buildConfigField "String", "SOURCE_REFSPEC", $/"${project.sourceRefspec}"/$
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas".toString())
}
}
signingConfigs {
release {
if (project.hasProperty('KEYSTORE')) {
storeFile file(KEYSTORE)
storePassword KEYSTORE_PASSWORD
keyAlias KEY_ALIAS
keyPassword KEY_PASSWORD
}
}
}
buildTypes {
release {
minifyEnabled true
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
resValue "string", "GOOGLE_MAPS_ANDROID_API_KEY", googleMapsApiReleaseKey
}
debug {
minifyEnabled false
applicationIdSuffix ".debug"
versionNameSuffix "-debug"
resValue "string", "GOOGLE_MAPS_ANDROID_API_KEY", googleMapsApiDebugKey
resValue "string", "applicationId", defaultConfig.applicationId + applicationIdSuffix
}
}
packagingOptions {
resources {
excludes += ['META-INF/LICENSE', 'META-INF/LICENSE.txt', 'META-INF/NOTICE', 'META-INF/NOTICE.txt', 'META-INF/INDEX.LIST']
}
}
testOptions {
unitTests {
includeAndroidResources = true
animationsDisabled = true
}
}
useLibrary 'android.test.runner'
useLibrary 'android.test.base'
useLibrary 'android.test.mock'
}
dependencies {
ext {
lifecycle_version= '2.7.0'
room_version = '2.6.1'
}
implementation "androidx.core:core-ktx:1.12.0"
implementation "androidx.fragment:fragment-ktx:1.6.2"
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
implementation 'androidx.mediarouter:mediarouter:1.7.0'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation "com.google.android.gms:play-services-maps:18.2.0"
implementation 'com.google.maps.android:maps-ktx:3.4.0'
implementation 'androidx.browser:browser:1.8.0'
implementation "com.google.dagger:hilt-android:2.51"
implementation 'androidx.hilt:hilt-navigation-compose:1.2.0'
kapt "com.google.dagger:hilt-compiler:2.51"
implementation 'androidx.hilt:hilt-work:1.2.0'
kapt 'androidx.hilt:hilt-compiler:1.2.0'
annotationProcessor 'androidx.hilt:hilt-compiler:1.2.0'
implementation 'com.google.android.material:material:1.11.0'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation 'androidx.compose.ui:ui:1.6.4'
implementation 'androidx.compose.ui:ui-tooling:1.6.4'
implementation 'androidx.compose.foundation:foundation:1.6.4'
implementation 'androidx.compose.runtime:runtime-livedata:1.6.4'
implementation 'androidx.compose.runtime:runtime-rxjava2:1.6.4'
implementation "androidx.compose.material3:material3:1.2.1"
implementation 'androidx.compose.material:material:1.6.4'
implementation 'androidx.compose.material:material-icons-core:1.6.4'
implementation 'androidx.compose.material:material-icons-extended:1.6.4'
implementation 'androidx.activity:activity-compose:1.8.2'
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
implementation "com.google.accompanist:accompanist-swiperefresh:0.19.0"
implementation('androidx.paging:paging-runtime-ktx:3.2.1')
implementation("androidx.paging:paging-compose:3.2.1")
implementation ('androidx.work:work-runtime-ktx:2.9.0')
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.retrofit2:converter-jackson:2.9.0'
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.11.0'
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-paging:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"
implementation 'com.j256.ormlite:ormlite-android:6.1'
implementation 'com.google.maps.android:maps-compose:2.11.4'
implementation 'com.google.maps.android:maps-compose-utils:2.11.4'
implementation 'com.google.maps.android:maps-compose-widgets:2.11.4'
implementation 'com.google.maps.android:android-maps-utils:3.5.3'
implementation 'mil.nga.geopackage.map:geopackage-android-map:6.7.4'
implementation 'mil.nga.mgrs:mgrs-android:2.2.3'
implementation 'mil.nga.gars:gars-android:1.2.3'
implementation 'org.ocpsoft.prettytime:prettytime:3.2.5.Final'
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-geojson:4.6.0'
implementation 'com.github.bumptech.glide:glide:4.13.2'
implementation 'com.github.bumptech.glide:okhttp3-integration:4.13.2'
implementation "com.google.accompanist:accompanist-glide:0.15.0"
kapt 'com.github.bumptech.glide:compiler:4.13.2'
implementation 'com.nulab-inc:zxcvbn:1.2.3'
implementation 'androidx.exifinterface:exifinterface:1.3.7'
implementation "com.google.android.exoplayer:exoplayer:2.19.1"
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.google.guava:guava:31.0-android'
implementation 'org.apache.commons:commons-lang3:3.3.2'
implementation files ('libs/sanselanandroid.jar')
// Testing-only dependencies
androidTestImplementation "androidx.test:core:$coreVersion"
androidTestImplementation "androidx.test:core-ktx:$coreVersion"
androidTestImplementation "androidx.test.ext:junit:$extJUnitVersion"
androidTestImplementation "androidx.test.ext:junit-ktx:$extJUnitVersion"
androidTestImplementation "androidx.test:runner:$runnerVersion"
androidTestImplementation "androidx.test:rules:1.5.0"
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
androidTestImplementation "androidx.test.espresso:espresso-contrib:$espressoVersion"
androidTestImplementation "io.mockk:mockk-android:1.13.8"
}
tasks.register('androidArtifactVersion') {
group = 'android'
description = 'Print the context ID, version code, and version name this build will produce in AndroidManifest.xml'
doLast {
appExt = project.extensions.android
println "applicationId: ${appExt.defaultConfig.applicationId}"
println "versionCode: ${appExt.defaultConfig.versionCode}"
println "versionName: ${appExt.defaultConfig.versionName}"
}
}