| // Licensed to the Apache Software Foundation (ASF) under one |
| // or more contributor license agreements. See the NOTICE file |
| // distributed with this work for additional information |
| // regarding copyright ownership. The ASF licenses this file |
| // to you under the Apache License, Version 2.0 (the |
| // "License"); you may not use this file except in compliance |
| // with the License. You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, |
| // software distributed under the License is distributed on an |
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| // KIND, either express or implied. See the License for the |
| // specific language governing permissions and limitations |
| // under the License. |
| |
| apply plugin: 'com.android.application' |
| |
| task buildJni(type: Exec, description: 'Build JNI libs') { |
| commandLine 'sh', 'src/main/jni/build.sh' |
| } |
| |
| tasks.withType(JavaCompile) { |
| //compileTask -> compileTask.dependsOn buildJni |
| } |
| |
| android { |
| compileSdkVersion 29 |
| defaultConfig { |
| applicationId "ml.apache.tvm.android.androidcamerademo" |
| minSdkVersion 24 |
| targetSdkVersion 29 |
| renderscriptTargetApi 18 |
| renderscriptSupportModeEnabled true |
| versionCode 1 |
| versionName "1.0" |
| testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| } |
| buildTypes { |
| release { |
| minifyEnabled false |
| proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| } |
| } |
| sourceSets { |
| main { |
| jni.srcDirs = [] |
| jniLibs.srcDirs = ['src/main/libs'] |
| } |
| } |
| compileOptions { |
| sourceCompatibility JavaVersion.VERSION_1_8 |
| targetCompatibility JavaVersion.VERSION_1_8 |
| } |
| buildToolsVersion = '29.0.3' |
| } |
| |
| dependencies { |
| implementation fileTree(dir: 'libs', include: ['*.jar']) |
| androidTestImplementation('androidx.test.espresso:espresso-core:3.2.0', { |
| exclude group: 'com.android.support', module: 'support-annotations' |
| }) |
| implementation 'androidx.appcompat:appcompat:1.1.0' |
| implementation 'androidx.constraintlayout:constraintlayout:1.1.3' |
| implementation 'com.google.android.material:material:1.1.0' |
| implementation 'org.apache.tvm:tvm4j-core:0.0.1-SNAPSHOT' |
| testImplementation 'junit:junit:4.13' |
| |
| 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" |
| } |