60 lines
1.7 KiB
Groovy
Executable File
60 lines
1.7 KiB
Groovy
Executable File
apply plugin: 'com.android.application'
|
|
|
|
project.ext.ASSET_DIR = projectDir.toString() + '/src/main/assets'
|
|
|
|
assert file(project.ext.ASSET_DIR + "/graph.lite").exists()
|
|
assert file(project.ext.ASSET_DIR + "/labels.txt").exists()
|
|
|
|
android {
|
|
compileSdkVersion 26
|
|
defaultConfig {
|
|
applicationId "android.example.com.tflitecamerademo"
|
|
minSdkVersion 21
|
|
targetSdkVersion 26
|
|
versionCode 1
|
|
versionName "1.0"
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
}
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
aaptOptions {
|
|
noCompress "tflite"
|
|
noCompress "lite"
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
url 'https://google.bintray.com/tensorflow'
|
|
}
|
|
google()
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
|
|
exclude group: 'com.android.support', module: 'support-annotations'
|
|
})
|
|
implementation 'com.android.support:appcompat-v7:25.2.0'
|
|
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
|
|
implementation 'com.android.support:design:25.2.0'
|
|
implementation 'com.android.support:support-annotations:25.3.1'
|
|
implementation 'com.android.support:support-v13:25.2.0'
|
|
|
|
implementation 'org.tensorflow:tensorflow-lite:+'
|
|
|
|
testImplementation 'junit:junit:4.12'
|
|
}
|