|
7 | 7 | */ |
8 | 8 |
|
9 | 9 | plugins { |
10 | | - id("com.android.application") |
11 | | - id("org.jetbrains.kotlin.android") |
| 10 | + alias(libs.plugins.android.application) |
| 11 | + alias(libs.plugins.kotlin.android) |
| 12 | + alias(libs.plugins.kotlin.compose) |
12 | 13 | } |
13 | 14 |
|
14 | 15 | val qnnVersion: String? = project.findProperty("qnnVersion") as? String |
15 | 16 | val useLocalAar: Boolean? = (project.findProperty("useLocalAar") as? String)?.toBoolean() |
16 | 17 |
|
17 | 18 | android { |
18 | | - namespace = "com.example.executorchyolodemo" |
19 | | - compileSdk = 34 |
| 19 | + namespace = "com.example.executorchyolodemo" |
| 20 | + compileSdk = 35 |
20 | 21 |
|
21 | | - defaultConfig { |
22 | | - applicationId = "com.example.executorchyolodemo" |
23 | | - minSdk = 28 |
24 | | - targetSdk = 33 |
25 | | - versionCode = 1 |
26 | | - versionName = "1.0" |
| 22 | + defaultConfig { |
| 23 | + applicationId = "com.example.executorchyolodemo" |
| 24 | + minSdk = 28 |
| 25 | + targetSdk = 35 |
| 26 | + versionCode = 1 |
| 27 | + versionName = "1.0" |
27 | 28 |
|
28 | | - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" |
29 | | - vectorDrawables { useSupportLibrary = true } |
30 | | - externalNativeBuild { cmake { cppFlags += "" } } |
31 | | - } |
| 29 | + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" |
| 30 | + vectorDrawables { useSupportLibrary = true } |
| 31 | + externalNativeBuild { cmake { cppFlags += "" } } |
| 32 | + } |
32 | 33 |
|
33 | | - buildTypes { |
34 | | - release { |
35 | | - isMinifyEnabled = false |
36 | | - proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") |
| 34 | + buildTypes { |
| 35 | + release { |
| 36 | + isMinifyEnabled = false |
| 37 | + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") |
| 38 | + } |
| 39 | + } |
| 40 | + compileOptions { |
| 41 | + sourceCompatibility = JavaVersion.VERSION_11 |
| 42 | + targetCompatibility = JavaVersion.VERSION_11 |
| 43 | + } |
| 44 | + kotlinOptions { |
| 45 | + jvmTarget = "11" |
37 | 46 | } |
38 | | - } |
39 | | - compileOptions { |
40 | | - sourceCompatibility = JavaVersion.VERSION_1_8 |
41 | | - targetCompatibility = JavaVersion.VERSION_1_8 |
42 | | - } |
43 | | - kotlinOptions { jvmTarget = "1.8" } |
44 | | - buildFeatures { compose = true } |
45 | | - composeOptions { kotlinCompilerExtensionVersion = "1.5.14" } |
46 | | - packaging { resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" } } |
| 47 | + buildFeatures { |
| 48 | + compose = true |
| 49 | + } |
| 50 | + packaging { resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" } } |
47 | 51 | } |
48 | 52 |
|
49 | 53 | dependencies { |
50 | | - implementation("androidx.core:core-ktx:1.9.0") |
51 | | - implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1") |
52 | | - implementation("androidx.activity:activity-compose:1.7.0") |
53 | | - implementation(platform("androidx.compose:compose-bom:2023.03.00")) |
54 | | - implementation("androidx.compose.ui:ui") |
55 | | - implementation("androidx.compose.ui:ui-graphics") |
56 | | - implementation("androidx.compose.ui:ui-tooling-preview") |
57 | | - implementation("androidx.compose.material3:material3") |
58 | | - implementation("androidx.appcompat:appcompat:1.6.1") |
59 | | - implementation("androidx.camera:camera-core:1.3.0-rc02") |
60 | | - implementation("androidx.constraintlayout:constraintlayout:2.2.0-alpha12") |
61 | | - implementation("com.facebook.fbjni:fbjni:0.5.1") |
62 | | - implementation("com.google.code.gson:gson:2.8.6") |
63 | | - if (useLocalAar == true) { |
64 | | - implementation(files("libs/executorch.aar")) |
65 | | - } else { |
66 | | - implementation("org.pytorch:executorch-android:1.1.0") |
67 | | - } |
68 | | - |
69 | | - implementation("com.google.android.material:material:1.12.0") |
70 | | - implementation("androidx.activity:activity:1.9.0") |
71 | | - implementation("org.json:json:20250107") |
72 | | - testImplementation("junit:junit:4.13.2") |
73 | | - androidTestImplementation("androidx.test.ext:junit:1.1.5") |
74 | | - androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") |
75 | | - androidTestImplementation(platform("androidx.compose:compose-bom:2023.03.00")) |
76 | | - androidTestImplementation("androidx.compose.ui:ui-test-junit4") |
77 | | - debugImplementation("androidx.compose.ui:ui-tooling") |
78 | | - debugImplementation("androidx.compose.ui:ui-test-manifest") |
| 54 | + implementation(libs.androidx.core.ktx) |
| 55 | + implementation(libs.androidx.lifecycle.runtime.ktx) |
| 56 | + implementation(libs.androidx.activity.compose) |
| 57 | + implementation(platform(libs.androidx.compose.bom)) |
| 58 | + implementation(libs.androidx.ui) |
| 59 | + implementation(libs.androidx.ui.graphics) |
| 60 | + implementation(libs.androidx.ui.tooling.preview) |
| 61 | + implementation(libs.androidx.material3) |
| 62 | + implementation(libs.androidx.appcompat) |
| 63 | + implementation(libs.material) |
| 64 | + implementation("androidx.constraintlayout:constraintlayout:2.2.0") |
| 65 | + implementation("com.facebook.fbjni:fbjni:0.5.1") |
| 66 | + implementation("com.google.code.gson:gson:2.10.1") |
| 67 | + if (useLocalAar == true) { |
| 68 | + implementation(files("libs/executorch.aar")) |
| 69 | + } else { |
| 70 | + implementation("org.pytorch:executorch-android:1.1.0") |
| 71 | + } |
| 72 | + implementation("androidx.activity:activity:1.9.0") |
| 73 | + implementation("org.json:json:20250107") |
| 74 | + testImplementation(libs.junit) |
| 75 | + androidTestImplementation(libs.androidx.junit) |
| 76 | + androidTestImplementation(libs.androidx.espresso.core) |
| 77 | + androidTestImplementation(platform(libs.androidx.compose.bom)) |
| 78 | + androidTestImplementation(libs.androidx.ui.test.junit4) |
| 79 | + debugImplementation(libs.androidx.ui.tooling) |
| 80 | + debugImplementation(libs.androidx.ui.test.manifest) |
79 | 81 |
|
80 | | - implementation ("androidx.camera:camera-camera2:1.3.0") |
81 | | - implementation ("androidx.camera:camera-lifecycle:1.3.0") |
82 | | - implementation ("androidx.camera:camera-view:1.3.0") |
83 | | - implementation ("com.google.code.gson:gson:2.10.1") |
| 82 | + implementation(libs.androidx.camera.core) |
| 83 | + implementation(libs.androidx.camera.camera2) |
| 84 | + implementation(libs.androidx.camera.lifecycle) |
| 85 | + implementation(libs.androidx.camera.view) |
84 | 86 | } |
0 commit comments