-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
254 lines (214 loc) · 9.09 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
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize' // for safeArgs between different fragments
apply plugin: "androidx.navigation.safeargs.kotlin" // id 'androidx.navigation.safeargs'
apply plugin: 'dagger.hilt.android.plugin'
apply plugin: 'maven-publish' // needed for jitpack.io?
apply plugin: 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' // BuildConfig
repositories {
mavenCentral()
google()
maven { url 'https://jitpack.io' } // for publishing
}
def VERSION_NAME="$VERSION_CODE"
android {
compileSdkVersion 31
namespace 'cy.ac.ucy.cs.anyplace.lib'
defaultConfig {
minSdkVersion 29 // AndroidX (android 9)
targetSdkVersion 31
// testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
consumerProguardFiles 'consumer-rules.pro'
versionName "$VERSION_NAME"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
resources {
excludes += ['META-INF/DEPENDENCIES']
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
buildFeatures {
dataBinding true
viewBinding true
compose true
}
androidResources {
noCompress 'tflite'
}
composeOptions{
kotlinCompilerExtensionVersion "$ver_compose"
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
// CORE
//// KOTLIN
implementation "androidx.core:core-ktx:1.7.0"
//// UI/Compatibility
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
//// LIFECYCLE (without ViewModel or LiveData)
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$ver_lifecycle"
implementation "androidx.lifecycle:lifecycle-service:$ver_lifecycle"
//// UI NAVIGATION
implementation "androidx.navigation:navigation-fragment-ktx:$ver_nav"
implementation "androidx.navigation:navigation-ui-ktx:$ver_nav"
//// Coordinator Layout
implementation "androidx.coordinatorlayout:coordinatorlayout:1.2.0"
//// COROUTINES
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$ver_coroutines"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$ver_coroutines"
////// Lifecycle
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.4.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.4.1"
//// DEPENDENCY INJECTION (dagger/hilt)
implementation "com.google.dagger:hilt-android:$ver_hilt"
implementation 'androidx.exifinterface:exifinterface:1.3.2'
kapt "com.google.dagger:hilt-compiler:$ver_hilt"
kapt "com.google.dagger:dagger-android-processor:$ver_hilt"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.annotation:annotation:1.3.0'
// kapt 'org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.2.0'
//// JETPACK COMPOSE ([SmasChatActivity])
implementation 'androidx.compose.ui:ui-graphics:1.1.1'
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.4.1"
implementation 'androidx.activity:activity-compose:1.4.0'
implementation "androidx.compose.runtime:runtime-livedata:$ver_compose"
implementation "androidx.compose.runtime:runtime-rxjava2:$ver_compose"
implementation "androidx.compose.material:material-icons-extended:$ver_compose"
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$ver_compose"
implementation "androidx.compose.ui:ui:$ver_compose"
implementation "androidx.compose.material:material:$ver_compose"
implementation "androidx.compose.material:material-icons-core:$ver_compose"
implementation "androidx.compose.foundation:foundation:$ver_compose"
//// COIL
implementation "io.coil-kt:coil-compose:1.4.0"
//// TouchImageView
implementation 'com.github.MikeOrtiz:TouchImageView:1.4.1'
// GOOGLE SERVICES
//// FusedLocation (coarse/fine grain)
implementation 'com.google.android.gms:play-services-location:20.0.0'
//// GOOGLE MAPS & UTILS
implementation 'com.google.android.gms:play-services-maps:18.1.0'
implementation 'com.google.maps.android:android-maps-utils:2.3.0' // updated from 0.3 !
// Material Components
// was 1.4.0-rc01, 1.6 is still in alpha
implementation 'com.google.android.material:material:1.5.0'
// DATA
//// Data binding
kapt "com.android.databinding:compiler:3.2.0-alpha10"
kapt "androidx.databinding:databinding-common:7.1.2"
//// DataStore (new preferences)
implementation "androidx.datastore:datastore-preferences:1.0.0"
//// ROOM
api "androidx.room:room-runtime:$ver_room"
kapt "androidx.room:room-compiler:$ver_room"
implementation "androidx.room:room-ktx:$ver_room"
androidTestImplementation "androidx.room:room-testing:$ver_room"
// Recyclerview
implementation 'androidx.recyclerview:recyclerview:1.2.1'
// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
// MISC
implementation 'pub.devrel:easypermissions:3.0.0'
/////////////////
// ANYPLACE CORE (java lib)
// implementation 'com.github.dmsl:anyplace-lib-core:4.0.2'
// local include requires pulling the submodules (see README)
implementation project(path: ':lib-core') // local
implementation 'gov.nist.math:jama:1.0.3'
implementation 'com.google.http-client:google-http-client-jackson2:1.39.2'
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'org.apache.httpcomponents:httpmime:4.5.13'
//// COIL
implementation "io.coil-kt:coil-compose:1.4.0"
//// TouchImageView
implementation 'com.github.MikeOrtiz:TouchImageView:1.4.1'
// CHAT
//// JETPACK COMPOSE ([SmasChatActivity])
//// ACCOMPANIST
implementation "com.google.accompanist:accompanist-insets-ui:$ver_accompanist"
implementation "com.google.accompanist:accompanist-insets:$ver_accompanist"
implementation "com.google.accompanist:accompanist-permissions:$ver_accompanist"
//// COMPOSE
implementation 'androidx.compose.material:material:1.1.1'
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.4.1"
implementation 'androidx.activity:activity-compose:1.4.0'
implementation "androidx.compose.runtime:runtime-livedata:$ver_compose"
implementation "androidx.compose.runtime:runtime-rxjava2:$ver_compose"
implementation "androidx.compose.material:material-icons-extended:$ver_compose"
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$ver_compose"
implementation "androidx.compose.ui:ui:$ver_compose"
implementation "androidx.compose.material:material:$ver_compose"
implementation "androidx.compose.material:material-icons-core:$ver_compose"
implementation "androidx.compose.foundation:foundation:$ver_compose"
/////// END-OF-CHAT
// Shimmer
implementation 'com.facebook.shimmer:shimmer:0.5.0'
// Google Sign-In
implementation 'com.google.android.gms:play-services-auth:20.2.0'
// AP-CV (Computer Vision)
//// CameraV2
//// (might be able to upgrade once we get rid of MVVM tflite version completely)
//noinspection GradleDependency
implementation "androidx.camera:camera-camera2:1.0.1"
//noinspection GradleDependency
implementation "androidx.camera:camera-lifecycle:1.0.1"
//noinspection GradleDependency
implementation "androidx.camera:camera-view:1.0.0-alpha28"
//// OCR
implementation 'com.google.android.gms:play-services-mlkit-text-recognition:18.0.0'
//// QR:
// implementation 'com.journeyapps:zxing-android-embedded:4.1.0'
//// Deep-Learning engine
// NOTE: 2.3.0 is incompatible with [hunglc007](https://github.com/hunglc007/tensorflow-yolov4-tflite) code
//// (some models fail)
implementation 'org.tensorflow:tensorflow-lite:2.2.0'
implementation 'org.tensorflow:tensorflow-lite-gpu:2.2.0'
//noinspection GradleDependency
// UNIT TESTING
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
/** JitPack Publishing: **/
// Because the components are created only during the afterEvaluate phase,
// publications must use the afterEvaluate() lifecycle method.
def GROUP = 'com.github.dmsl'
def ARTIFACT_ID="anyplace-lib-android"
afterEvaluate {
publishing {
publications {
release(MavenPublication) { // Creates a Maven publication called "release".
from components.release // Applies the component for the release build variant.
groupId = GROUP
artifactId = ARTIFACT_ID
version = VERSION_CODE
}
debug(MavenPublication) { // Creates a Maven publication called “debug”.
from components.debug // Applies the component for the debug build variant.
groupId = GROUP
artifactId = ARTIFACT_ID
version = VERSION_CODE
}
}
}
}