diff --git a/apps/android_camera/README.md b/apps/android_camera/README.md index f659e905f281..e7b8336fe716 100644 --- a/apps/android_camera/README.md +++ b/apps/android_camera/README.md @@ -66,14 +66,17 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.4.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.3' implementation 'com.google.android.material:material:1.5.0' - implementation 'org.apache.tvm:tvm4j-core:0.0.1-SNAPSHOT' + implementation files('../../../jvm/core/target/tvm4j-core-0.0.1-SNAPSHOT.jar') testImplementation 'junit:junit:4.13.2' implementation "androidx.concurrent:concurrent-futures:1.0.0" implementation "androidx.camera:camera-core:1.0.0-beta01" implementation "androidx.camera:camera-camera2:1.0.0-beta01" + // If you want to use the CameraX View class implementation "androidx.camera:camera-view:1.0.0-alpha08" + // If you want to use the CameraX Extensions library implementation "androidx.camera:camera-extensions:1.0.0-alpha08" + // If you want to use the CameraX Lifecycle library implementation "androidx.camera:camera-lifecycle:1.0.0-beta01" } ``` diff --git a/apps/android_camera/app/build.gradle b/apps/android_camera/app/build.gradle index c7767559e4df..8b42d3844840 100644 --- a/apps/android_camera/app/build.gradle +++ b/apps/android_camera/app/build.gradle @@ -53,11 +53,11 @@ tasks.withType(JavaCompile) { } android { - compileSdkVersion 31 + compileSdkVersion 33 defaultConfig { applicationId "ml.apache.tvm.android.androidcamerademo" minSdkVersion 24 - targetSdkVersion 26 + targetSdkVersion 33 renderscriptTargetApi 18 renderscriptSupportModeEnabled true versionCode 1 @@ -80,10 +80,11 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } - - lintOptions { - disable "Instantiatable" // MainActivity and RPCActivity must extend android.app.Activity + lint { + disable 'Instantiatable' // MainActivity and RPCActivity must extend android.app.Activity } + namespace 'org.apache.tvm.android.androidcamerademo' + } dependencies { diff --git a/apps/android_camera/app/src/main/AndroidManifest.xml b/apps/android_camera/app/src/main/AndroidManifest.xml index e5b6465c5874..6d1bdf2f5ffb 100644 --- a/apps/android_camera/app/src/main/AndroidManifest.xml +++ b/apps/android_camera/app/src/main/AndroidManifest.xml @@ -14,8 +14,7 @@ --> + xmlns:tools="http://schemas.android.com/tools"> diff --git a/apps/android_camera/build.gradle b/apps/android_camera/build.gradle index 1cd5ac9b656f..7f98372768fa 100644 --- a/apps/android_camera/build.gradle +++ b/apps/android_camera/build.gradle @@ -23,9 +23,10 @@ buildscript { maven { url 'https://maven.google.com' } + google() } dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' + classpath 'com.android.tools.build:gradle:7.4.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -40,6 +41,7 @@ allprojects { } mavenLocal() mavenCentral() + google() } } diff --git a/apps/android_deploy/README.md b/apps/android_deploy/README.md index 4cfd9eb9daf2..6317d96ae739 100644 --- a/apps/android_deploy/README.md +++ b/apps/android_deploy/README.md @@ -38,15 +38,15 @@ Before you build the Android application, please refer to [TVM4J Installation Gu ``` dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + implementation fileTree(dir: 'libs', include: ['*.jar']) + androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'com.android.support:appcompat-v7:26.0.1' - compile 'com.android.support.constraint:constraint-layout:1.0.2' - compile 'com.android.support:design:26.0.1' - compile 'org.apache.tvm:tvm4j-core:0.0.1-SNAPSHOT' - testCompile 'junit:junit:4.12' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation 'com.google.android.material:material:1.8.0' + implementation files('../../../jvm/core/target/tvm4j-core-0.0.1-SNAPSHOT.jar') + testImplementation 'junit:junit:4.13.2' } ``` diff --git a/apps/android_deploy/app/build.gradle b/apps/android_deploy/app/build.gradle index 235bdcff5bfa..4b4ec235f653 100644 --- a/apps/android_deploy/app/build.gradle +++ b/apps/android_deploy/app/build.gradle @@ -62,14 +62,14 @@ tasks.withType(JavaCompile) { } android { - compileSdkVersion 31 + compileSdkVersion 33 defaultConfig { applicationId "org.apache.tvm.android.demo" minSdkVersion 24 - targetSdkVersion 26 + targetSdkVersion 33 versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } buildTypes { release { @@ -83,22 +83,23 @@ android { jniLibs.srcDirs = ['src/main/libs'] } } - - lintOptions { - disable "Instantiatable" // MainActivity and RPCActivity must extend android.app.Activity - disable "MissingApplicationIcon" // Should explicitly set android:icon, there is no default - disable "UnsafeNativeCodeLocation" // Shared libraries should not be placed in the res or assets directories. + lint { + disable 'Instantiatable' // MainActivity and RPCActivity must extend android.app.Activity + disable 'MissingApplicationIcon' // Should explicitly set android:icon, there is no default + disable 'UnsafeNativeCodeLocation' // Shared libraries should not be placed in the res or assets directories. } + namespace 'org.apache.tvm.android.demo' + } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - androidTestImplementation('com.android.support.test.espresso:espresso-core:3.4.0', { + androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { exclude group: 'com.android.support', module: 'support-annotations' }) - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'com.android.support.constraint:constraint-layout:2.1.3' - implementation 'com.android.support:design:28.0.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation 'com.google.android.material:material:1.8.0' implementation files('../../../jvm/core/target/tvm4j-core-0.0.1-SNAPSHOT.jar') testImplementation 'junit:junit:4.13.2' } diff --git a/apps/android_deploy/app/download-models.gradle b/apps/android_deploy/app/download-models.gradle index dc1abf81aa35..a4e865505c31 100644 --- a/apps/android_deploy/app/download-models.gradle +++ b/apps/android_deploy/app/download-models.gradle @@ -77,4 +77,22 @@ tasks.whenTaskAdded { task -> if (task.name == 'assembleRelease') { task.dependsOn 'extractModels' } + if (task.name == 'mergeDebugAssets') { + task.dependsOn 'extractModels' + } + if (task.name == 'mergeReleaseAssets') { + task.dependsOn 'extractModels' + } + if (task.name == 'lintVitalAnalyzeRelease') { + task.dependsOn 'extractModels' + } + if (task.name == 'lintVitalReportRelease') { + task.dependsOn 'extractModels' + } + if (task.name == 'lintAnalyzeDebug') { + task.dependsOn 'extractModels' + } + if (task.name == 'lintReportDebug') { + task.dependsOn 'extractModels' + } } diff --git a/apps/android_deploy/app/src/main/AndroidManifest.xml b/apps/android_deploy/app/src/main/AndroidManifest.xml index ce1b1fac4552..17a872ff315f 100644 --- a/apps/android_deploy/app/src/main/AndroidManifest.xml +++ b/apps/android_deploy/app/src/main/AndroidManifest.xml @@ -19,8 +19,7 @@ specific language governing permissions and limitations under the License. --> - + diff --git a/apps/android_deploy/build.gradle b/apps/android_deploy/build.gradle index 35d20c9b3692..b6d686b4e4c1 100644 --- a/apps/android_deploy/build.gradle +++ b/apps/android_deploy/build.gradle @@ -23,9 +23,10 @@ buildscript { maven { url 'https://maven.google.com' } + google() } dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' + classpath 'com.android.tools.build:gradle:7.4.1' classpath 'org.apache.httpcomponents:httpclient:4.5.13' // NOTE: Do not place your application dependencies here; they belong @@ -41,6 +42,7 @@ allprojects { } mavenLocal() mavenCentral() + google() } } diff --git a/apps/android_rpc/README.md b/apps/android_rpc/README.md index d0a11b6121dc..44b6f774697e 100644 --- a/apps/android_rpc/README.md +++ b/apps/android_rpc/README.md @@ -33,13 +33,13 @@ Before you build the Android application, please refer to [TVM4J Installation Gu ``` dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - androidTestImplementation('com.android.support.test.espresso:espresso-core:3.4.0', { + androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { exclude group: 'com.android.support', module: 'support-annotations' }) - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'com.android.support.constraint:constraint-layout:2.1.3' - implementation 'com.android.support:design:28.0.0' - implementation 'org.apache.tvm:tvm4j-core:0.0.1-SNAPSHOT' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation 'com.google.android.material:material:1.8.0' + implementation files('../../../jvm/core/target/tvm4j-core-0.0.1-SNAPSHOT.jar') testImplementation 'junit:junit:4.13.2' } ``` diff --git a/apps/android_rpc/app/build.gradle b/apps/android_rpc/app/build.gradle index 14d4a7bb9a61..4d4c835e031a 100644 --- a/apps/android_rpc/app/build.gradle +++ b/apps/android_rpc/app/build.gradle @@ -59,14 +59,14 @@ tasks.withType(JavaCompile) { // } android { - compileSdkVersion 31 + compileSdkVersion 33 defaultConfig { applicationId "org.apache.tvm.tvmrpc" minSdkVersion 24 - targetSdkVersion 26 + targetSdkVersion 33 versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } buildTypes { release { @@ -81,21 +81,23 @@ android { } } - lintOptions { - disable "Instantiatable" // MainActivity and RPCActivity must extend android.app.Activity - disable "MissingClass" // .RPCWatchdogService was not found in the project or the libraries - disable "IconDipSize" // The image ic_launcher.png varies significantly in its density-independent size + lint { + disable 'Instantiatable' // MainActivity and RPCActivity must extend android.app.Activity + disable 'MissingClass' // .RPCWatchdogService was not found in the project or the libraries + disable 'IconDipSize' // The image ic_launcher.png varies significantly in its density-independent size } + namespace 'org.apache.tvm.tvmrpc' + } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - androidTestImplementation('com.android.support.test.espresso:espresso-core:3.4.0', { + androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { exclude group: 'com.android.support', module: 'support-annotations' }) - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'com.android.support.constraint:constraint-layout:2.1.3' - implementation 'com.android.support:design:28.0.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation 'com.google.android.material:material:1.8.0' implementation files('../../../jvm/core/target/tvm4j-core-0.0.1-SNAPSHOT.jar') testImplementation 'junit:junit:4.13.2' } diff --git a/apps/android_rpc/app/src/main/AndroidManifest.xml b/apps/android_rpc/app/src/main/AndroidManifest.xml index 217dbb859a76..2cba4af8867f 100644 --- a/apps/android_rpc/app/src/main/AndroidManifest.xml +++ b/apps/android_rpc/app/src/main/AndroidManifest.xml @@ -19,8 +19,7 @@ specific language governing permissions and limitations under the License. --> - + diff --git a/apps/android_rpc/build.gradle b/apps/android_rpc/build.gradle index 1cd5ac9b656f..7f98372768fa 100644 --- a/apps/android_rpc/build.gradle +++ b/apps/android_rpc/build.gradle @@ -23,9 +23,10 @@ buildscript { maven { url 'https://maven.google.com' } + google() } dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' + classpath 'com.android.tools.build:gradle:7.4.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -40,6 +41,7 @@ allprojects { } mavenLocal() mavenCentral() + google() } }