summaryrefslogtreecommitdiff
path: root/tflite/build.gradle
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-04-24 16:42:18 +0200
committererdgeist <erdgeist@erdgeist.org>2026-04-24 16:42:18 +0200
commitb4695e613f0bca451485f95572f23d464b56a95e (patch)
treef893b2035458b47a9b8bbdb3a78205511d2ce3c5 /tflite/build.gradle
Initial importmain
Diffstat (limited to 'tflite/build.gradle')
-rw-r--r--tflite/build.gradle75
1 files changed, 75 insertions, 0 deletions
diff --git a/tflite/build.gradle b/tflite/build.gradle
new file mode 100644
index 0000000..8e9fcf4
--- /dev/null
+++ b/tflite/build.gradle
@@ -0,0 +1,75 @@
1/*
2 * Copyright 2020 Google LLC
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17apply plugin: "com.android.application"
18apply plugin: "kotlin-android"
19
20android {
21 compileSdkVersion 31
22 ndkVersion "21.3.6528147"
23
24 defaultConfig {
25 applicationId 'com.android.example.camerax.tflite'
26 minSdkVersion 21
27 targetSdkVersion 30
28 versionCode 1
29 versionName "0.0.1"
30 }
31
32 compileOptions {
33 sourceCompatibility rootProject.ext.java_version
34 targetCompatibility rootProject.ext.java_version
35 }
36
37 kotlinOptions {
38 jvmTarget = rootProject.ext.java_version
39 }
40
41
42 buildFeatures {
43 viewBinding true
44 }
45 androidResources {
46 noCompress 'lite'
47 }
48 namespace 'com.android.example.camerax.tflite'
49}
50
51dependencies {
52 implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
53
54 // App compat and UI things
55 implementation 'androidx.appcompat:appcompat:1.3.1'
56 implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
57 implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
58
59 // CameraX
60 def camerax_version = "1.1.0-beta01"
61 implementation "androidx.camera:camera-core:${camerax_version}"
62 implementation "androidx.camera:camera-camera2:${camerax_version}"
63 implementation "androidx.camera:camera-lifecycle:${camerax_version}"
64 implementation "androidx.camera:camera-view:${camerax_version}"
65 implementation "androidx.camera:camera-video:${camerax_version}"
66
67
68 // Tensorflow lite dependencies
69 implementation 'org.tensorflow:tensorflow-lite:2.9.0'
70 implementation 'org.tensorflow:tensorflow-lite-gpu:2.9.0'
71 implementation 'org.tensorflow:tensorflow-lite-support:0.4.2'
72
73 testImplementation 'org.robolectric:robolectric:4.4'
74 testImplementation 'junit:junit:4.13.2'
75}