Align Android gradle build files
Use Gradle 3.1.4 and modernize the TFLite example gradle files. PiperOrigin-RevId: 228547238
This commit is contained in:
parent
2c76c0a07f
commit
864fe25ff7
@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 26
|
||||
buildToolsVersion '26.0.2'
|
||||
buildToolsVersion '27.0.3'
|
||||
defaultConfig {
|
||||
applicationId "org.tensorflow.lite.demo"
|
||||
minSdkVersion 15
|
||||
@ -45,6 +45,6 @@ project.ext.TMP_DIR = project.buildDir.toString() + '/downloads'
|
||||
apply from: "download-models.gradle"
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
compile 'org.tensorflow:tensorflow-lite:0.0.0-nightly'
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'org.tensorflow:tensorflow-lite:0.0.0-nightly'
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.0.1'
|
||||
classpath 'com.android.tools.build:gradle:3.1.4'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
@ -94,7 +94,7 @@ following lines to your Gradle build file:
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'org.tensorflow:tensorflow-android:+'
|
||||
implementation 'org.tensorflow:tensorflow-android:+'
|
||||
}
|
||||
|
||||
This automatically downloads the latest stable version of TensorFlow as an AAR
|
||||
|
@ -130,7 +130,7 @@ allprojects {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'org.tensorflow:tensorflow-lite-with-select-tf-ops:0.1.100'
|
||||
implementation 'org.tensorflow:tensorflow-lite-with-select-tf-ops:0.1.100'
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 26
|
||||
buildToolsVersion "26.0.1"
|
||||
buildToolsVersion "27.0.3"
|
||||
defaultConfig {
|
||||
applicationId "android.example.com.tflitecamerademo"
|
||||
// Required by Camera2 API.
|
||||
@ -10,11 +10,6 @@ android {
|
||||
targetSdkVersion 26
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
// Remove this block.
|
||||
jackOptions {
|
||||
enabled true
|
||||
}
|
||||
}
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
@ -40,6 +35,7 @@ repositories {
|
||||
url 'https://google.bintray.com/tensorflow'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
// Uncomment if you want to use a local repo.
|
||||
@ -48,20 +44,18 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
compile 'com.android.support:appcompat-v7:25.2.0'
|
||||
compile 'com.android.support.constraint:constraint-layout:1.0.2'
|
||||
compile 'com.android.support:design:25.2.0'
|
||||
compile 'com.android.support:support-annotations:25.3.1'
|
||||
compile 'com.android.support:support-v13:25.2.0'
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'com.android.support:appcompat-v7:25.2.0'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
|
||||
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'
|
||||
|
||||
// Build off of nightly TensorFlow Lite
|
||||
compile 'org.tensorflow:tensorflow-lite:0.0.0-nightly'
|
||||
implementation 'org.tensorflow:tensorflow-lite:0.0.0-nightly'
|
||||
// Use local TensorFlow library
|
||||
// compile 'org.tensorflow:tensorflow-lite-local:0.0.0'
|
||||
// implementation 'org.tensorflow:tensorflow-lite-local:0.0.0'
|
||||
}
|
||||
|
||||
def targetFolder = "src/main/assets"
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.3.1'
|
||||
classpath 'com.android.tools.build:gradle:3.1.4'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
@ -14,6 +15,7 @@ buildscript {
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
|
||||
|
@ -2,18 +2,13 @@ apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 26
|
||||
buildToolsVersion "26.0.1"
|
||||
buildToolsVersion "27.0.3"
|
||||
defaultConfig {
|
||||
applicationId "android.example.com.ovicbenchmarker"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 26
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
// Remove this block.
|
||||
jackOptions {
|
||||
enabled true
|
||||
}
|
||||
}
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
@ -41,12 +36,12 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
compile 'com.android.support:appcompat-v7:25.2.0'
|
||||
compile 'com.android.support.constraint:constraint-layout:1.0.2'
|
||||
compile 'com.android.support:design:25.2.0'
|
||||
compile 'com.android.support:support-annotations:25.3.1'
|
||||
compile 'com.android.support:support-v13:25.2.0'
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'com.android.support:appcompat-v7:25.2.0'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
|
||||
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'
|
||||
|
||||
compile 'org.tensorflow:tensorflow-lite:+'
|
||||
implementation 'org.tensorflow:tensorflow-lite:+'
|
||||
}
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.3.1'
|
||||
classpath 'com.android.tools.build:gradle:3.1.4'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
@ -14,6 +15,7 @@ buildscript {
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
|
||||
|
Loading…
Reference in New Issue
Block a user