| /* |
| * Copyright 2020 The Android Open Source Project |
| * |
| * Licensed 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. |
| */ |
| plugins { |
| id("AndroidXPlugin") |
| id("AndroidXComposePlugin") |
| id("com.android.application") |
| id("kotlin-android") |
| } |
| |
| android { |
| compileSdk = 35 |
| |
| defaultConfig { |
| applicationId = "androidx.camera.integration.uiwidgets" |
| versionCode 1 |
| versionName "1.0" |
| } |
| |
| sourceSets { |
| main.manifest.srcFile "src/main/AndroidManifest.xml" |
| main.java.srcDirs = ["src/main/java"] |
| main.java.excludes = ["**/build/**"] |
| main.java.includes = ["**/*.java"] |
| main.res.srcDirs = ["src/main/res"] |
| } |
| |
| buildTypes { |
| release { |
| minifyEnabled = true |
| shrinkResources = true |
| } |
| } |
| |
| buildFeatures { |
| viewBinding = true |
| } |
| namespace = "androidx.camera.integration.uiwidgets" |
| } |
| |
| dependencies { |
| // Internal library |
| implementation(libs.kotlinStdlib) |
| implementation(project(":camera:camera-core")) |
| implementation(project(":camera:camera-camera2")) |
| implementation(project(":camera:camera-camera2-pipe-integration")) |
| implementation(project(":camera:camera-lifecycle")) |
| implementation(project(":camera:camera-view")) |
| implementation(project(":camera:camera-video")) |
| implementation(project(":camera:camera-mlkit-vision")) |
| implementation("com.google.mlkit:barcode-scanning:17.0.2") |
| |
| // Android Support Library |
| implementation("androidx.appcompat:appcompat:1.2.0") |
| implementation("androidx.activity:activity-ktx:1.2.0") |
| implementation("androidx.viewpager2:viewpager2:1.1.0") |
| implementation("androidx.concurrent:concurrent-futures-ktx:1.1.0") |
| implementation(project(":window:window")) |
| implementation(project(":window:window-java")) |
| implementation(libs.constraintLayout) |
| implementation(libs.material) { |
| exclude group: "androidx.viewpager2", module: "viewpager2" |
| } |
| |
| // Guava |
| implementation(libs.guavaAndroid) |
| |
| // Compose |
| implementation("androidx.activity:activity-compose:1.7.2") |
| implementation("androidx.compose.material:material:1.7.2") |
| implementation("androidx.compose.animation:animation:1.7.2") |
| implementation("androidx.compose.runtime:runtime:1.7.2") |
| implementation("androidx.compose.ui:ui-tooling:1.7.2") |
| implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.4.1") |
| implementation("androidx.navigation:navigation-compose:2.4.2") |
| implementation("androidx.compose.material:material-icons-extended:1.4.0") |
| |
| // Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath. |
| androidTestImplementation("androidx.annotation:annotation-experimental:1.4.1") |
| androidTestImplementation(project(":concurrent:concurrent-futures")) |
| androidTestImplementation(project(":concurrent:concurrent-futures-ktx")) |
| |
| // Testing framework |
| androidTestImplementation(libs.testExtJunit) |
| androidTestImplementation(libs.testCore) |
| androidTestImplementation(libs.testRunner) |
| androidTestImplementation(libs.testRules) |
| androidTestImplementation(libs.testUiautomator) |
| androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0") |
| androidTestImplementation(project(":camera:camera-testing")) { |
| // Ensure camera-testing does not pull in androidx.test dependencies |
| exclude(group:"androidx.test") |
| } |
| androidTestImplementation(project(":internal-testutils-runtime")) |
| androidTestImplementation(libs.truth) |
| debugImplementation(libs.testCore) |
| debugImplementation("androidx.fragment:fragment-testing:1.2.5") |
| // Testing resource dependency for manifest |
| debugImplementation(project(":camera:camera-testing")) { |
| // Ensure camera-testing does not pull in androidx.test dependencies |
| exclude(group:"androidx.test") |
| } |
| |
| // Testing for Compose |
| // Test rules and transitive dependencies: |
| androidTestImplementation("androidx.compose.ui:ui:1.7.2") |
| androidTestImplementation("androidx.compose.ui:ui-geometry:1.7.2") |
| androidTestImplementation("androidx.compose.ui:ui-util:1.7.2") |
| androidTestImplementation("androidx.compose.ui:ui-graphics:1.7.2") |
| androidTestImplementation("androidx.compose.ui:ui-unit:1.7.2") |
| androidTestImplementation("androidx.compose.ui:ui-text:1.7.2") |
| androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.7.2") |
| androidTestImplementation("androidx.collection:collection:1.4.2") |
| // Needed for createComposeRule, but not createAndroidComposeRule: |
| debugImplementation("androidx.compose.ui:ui-test-manifest:1.6.0") |
| } |