-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
98 lines (85 loc) · 3.29 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
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 31
defaultConfig {
applicationId "org.tensorflow.lite.examples.imagesegmentation"
minSdkVersion 21
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// If you find lint problem like:
// * What went wrong:
// A problem was found with the configuration of task ':app:lint'.
// > No value has been specified for property 'lintClassPath'.
//
// Probably you haven't set ANDROID_HOME. To fix:
// export ANDROID_HOME=$HOME/Android/Sdk # Your Android SDK path.
lintOptions {
abortOnError false
}
flavorDimensions "tfliteInference"
productFlavors {
// The TFLite inference is built using the TFLite Java interpreter.\
create("interpreter"){
dimension "tfliteInference"
}
// Default: The TFLite inference is built using the TFLite Task library (high-level API).
create("taskApi"){
getIsDefault().set(true)
dimension "tfliteInference"
}
}
buildFeatures {
dataBinding true
}
}
// App assets folder:
project.ext.ASSET_DIR = projectDir.toString() + '/src/main/assets'
// Download TF Lite model.
apply from: 'download.gradle'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
interpreterImplementation project(":lib_interpreter")
taskApiImplementation project(":lib_task_api")
implementation project(":lib_utils")
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.0'
implementation 'com.github.bumptech.glide:glide:4.12.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.guava:guava:28.2-android'
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.5.31'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0'
// CameraX dependencies
def camerax_version = "1.1.0-alpha10"
// CameraX core library using camera2 implementation
implementation "androidx.camera:camera-camera2:$camerax_version"
// CameraX Lifecycle Library
implementation "androidx.camera:camera-lifecycle:$camerax_version"
// CameraX View class
implementation "androidx.camera:camera-view:1.0.0-alpha30"
// OpenCV
implementation 'com.quickbirdstudios:opencv:4.5.3.0'
}