Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APP] Update android_rpc build tools version #14052

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/android_camera/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
```
Expand Down
11 changes: 6 additions & 5 deletions apps/android_camera/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions apps/android_camera/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.apache.tvm.android.androidcamerademo">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
Expand Down
4 changes: 3 additions & 1 deletion apps/android_camera/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,6 +41,7 @@ allprojects {
}
mavenLocal()
mavenCentral()
google()
}
}

Expand Down
14 changes: 7 additions & 7 deletions apps/android_deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
```

Expand Down
25 changes: 13 additions & 12 deletions apps/android_deploy/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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'
}
18 changes: 18 additions & 0 deletions apps/android_deploy/app/download-models.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
3 changes: 1 addition & 2 deletions apps/android_deploy/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ specific language governing permissions and limitations
under the License.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.apache.tvm.android.demo" >
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
Expand Down
4 changes: 3 additions & 1 deletion apps/android_deploy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -41,6 +42,7 @@ allprojects {
}
mavenLocal()
mavenCentral()
google()
}
}

Expand Down
10 changes: 5 additions & 5 deletions apps/android_rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
```
Expand Down
24 changes: 13 additions & 11 deletions apps/android_rpc/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ tasks.withType(JavaCompile) {
// }

android {
compileSdkVersion 31
compileSdkVersion 33
defaultConfig {
applicationId "org.apache.tvm.tvmrpc"
minSdkVersion 24
targetSdkVersion 26
targetSdkVersion 33
Icemist marked this conversation as resolved.
Show resolved Hide resolved
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
Expand All @@ -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'
}
3 changes: 1 addition & 2 deletions apps/android_rpc/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ specific language governing permissions and limitations
under the License.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.apache.tvm.tvmrpc" >
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />

Expand Down
4 changes: 3 additions & 1 deletion apps/android_rpc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,6 +41,7 @@ allprojects {
}
mavenLocal()
mavenCentral()
google()
}
}

Expand Down