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