-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
119 lines (97 loc) · 3.78 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
// This file provides basic support for building the TensorFlow demo
// in Android Studio with Gradle.
//
// Note that Bazel is still used by default to compile the native libs,
// and should be installed at the location noted below. This build file
// automates the process of calling out to it and copying the compiled
// libraries back into the appropriate directory.
//
// Alternatively, experimental support for Makefile builds is provided by
// setting buildWithMake below to true. This will allow building the demo
// on Windows machines, but note that full equivalence with the Bazel
// build is not yet guaranteed. See comments below for caveats and tips
// for speeding up the build, such as as enabling ccache.
project.buildDir = 'gradleBuild'
getProject().setBuildDir('gradleBuild')
project.ext.ASSET_DIR = projectDir.toString() + '/assets'
assert file(project.ext.ASSET_DIR + "/tiny-yolo-voc-graph.pb").exists()
assert file(project.ext.ASSET_DIR + "/tiny-yolo-voc-labels.txt").exists()
assert file(project.ext.ASSET_DIR + "/comon_model_labels.txt").exists()
assert file(project.ext.ASSET_DIR + "/comon_output_quant.tflite").exists()
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.0.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
lintOptions {
abortOnError false
}
aaptOptions { noCompress "tflite" }
sourceSets {
main {
// Android demo app sources.
java {
srcDir 'src'
}
manifest.srcFile 'AndroidManifest.xml'
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = [project.ext.ASSET_DIR]
repositories {
jcenter()
}
dependencies {
compile 'org.tensorflow:tensorflow-android:1.6.0'
}
}
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
repositories {
google()
}
dependencies {
//noinspection GradleCompatible
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:viewpager:28.0.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
implementation 'org.apache.commons:commons-math3:3.2'
implementation 'org.jsoup:jsoup:1.11.3'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
// Firebase
implementation 'com.google.firebase:firebase-storage:16.0.3'
implementation 'com.github.bumptech.glide:glide:4.7.1'
implementation 'com.google.code.gson:gson:2.6.2'
implementation 'commons-lang:commons-lang:2.6'
testCompile 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
// tensor lite
implementation 'com.wonderkiln:camerakit:0.13.1'
implementation 'org.tensorflow:tensorflow-lite:+'
}