This repository was archived by the owner on Jan 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy pathbuild.gradle
More file actions
65 lines (58 loc) · 2.29 KB
/
build.gradle
File metadata and controls
65 lines (58 loc) · 2.29 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
apply plugin: 'com.android.application'
android {
compileSdkVersion 33
namespace "co.huggingface.android_transformers.bertqa"
defaultConfig {
applicationId "co.huggingface.android_transformers.bert"
minSdkVersion 26
targetSdkVersion 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
aaptOptions {
noCompress "tflite"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
// 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
}
}
// Download TF Lite model.
apply from: 'download.gradle'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.google.guava:guava:28.1-android'
// implementation 'org.tensorflow:tensorflow-lite:2.0.0'
// implementation 'org.tensorflow:tensorflow-lite-select-tf-ops:0.0.0-nightly'
implementation files('libs/tensorflow-lite-with-select-tf-ops-0.0.0-nightly.aar')
testImplementation 'junit:junit:4.12'
testImplementation 'androidx.test:core:1.2.0'
testImplementation 'com.google.truth:truth:1.0'
testImplementation 'org.robolectric:robolectric:4.3.1'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}