charcoalchen | 8f6c29e | 2019-03-09 15:54:20 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2019 The Android Open Source Project |
| 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 | * http://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 |
| 13 | * implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
| 17 | |
Tiem Song | ee0da74 | 2024-01-03 14:08:46 -0800 | [diff] [blame] | 18 | /** |
| 19 | * This file was created using the `create_project.py` script located in the |
| 20 | * `<AndroidX root>/development/project-creator` directory. |
| 21 | * |
| 22 | * Please use that script when creating a new project, rather than copying an existing project and |
| 23 | * modifying its settings. |
| 24 | */ |
Aurimas Liutikas | b93215e | 2023-06-12 16:07:11 -0700 | [diff] [blame] | 25 | import androidx.build.ApkCopyHelperKt |
| 26 | |
charcoalchen | 8f6c29e | 2019-03-09 15:54:20 +0800 | [diff] [blame] | 27 | plugins { |
| 28 | id("AndroidXPlugin") |
| 29 | id("com.android.application") |
Charcoal Chen | 2dbdff5 | 2021-11-04 14:16:01 +0800 | [diff] [blame] | 30 | id("kotlin-android") |
charcoalchen | 8f6c29e | 2019-03-09 15:54:20 +0800 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | android { |
| 34 | defaultConfig { |
| 35 | applicationId "androidx.camera.integration.extensions" |
charcoalchen | 8f6c29e | 2019-03-09 15:54:20 +0800 | [diff] [blame] | 36 | } |
Charcoal Chen | b0ebb20 | 2021-09-29 14:32:40 +0800 | [diff] [blame] | 37 | |
Charcoal Chen | 3eb7fff | 2021-12-14 09:30:43 +0800 | [diff] [blame] | 38 | buildTypes { |
| 39 | release { |
| 40 | minifyEnabled true |
| 41 | shrinkResources true |
| 42 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 43 | testProguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 44 | } |
Charcoal Chen | b0ebb20 | 2021-09-29 14:32:40 +0800 | [diff] [blame] | 45 | } |
Aurimas Liutikas | dcfa035 | 2022-03-14 16:05:33 -0700 | [diff] [blame] | 46 | namespace "androidx.camera.integration.extensions" |
charcoalchen | 8f6c29e | 2019-03-09 15:54:20 +0800 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | dependencies { |
| 50 | // Internal library |
| 51 | implementation(project(":camera:camera-camera2")) |
Jasmine Chen | ee36321 | 2023-12-13 17:21:04 -0800 | [diff] [blame] | 52 | implementation(project(':camera:camera-camera2-pipe-integration')) |
charcoalchen | 8f6c29e | 2019-03-09 15:54:20 +0800 | [diff] [blame] | 53 | implementation(project(":camera:camera-extensions")) |
Franklin Wu | 4d89be1 | 2019-10-23 15:38:43 -0700 | [diff] [blame] | 54 | implementation(project(":camera:camera-lifecycle")) |
Franklin Wu | b4e94c9 | 2019-11-21 12:19:47 -0800 | [diff] [blame] | 55 | implementation(project(":camera:camera-view")) |
mingdatsai | 7368ba1 | 2023-10-30 20:39:36 +0800 | [diff] [blame] | 56 | implementation(project(":camera:camera-video")) |
charcoalchen | 8f6c29e | 2019-03-09 15:54:20 +0800 | [diff] [blame] | 57 | |
| 58 | // Android Support Library |
Aurimas Liutikas | b3483fd | 2021-06-04 16:56:37 -0700 | [diff] [blame] | 59 | api(libs.constraintLayout) |
Charcoal Chen | 2dbdff5 | 2021-11-04 14:16:01 +0800 | [diff] [blame] | 60 | implementation(libs.kotlinStdlib) |
| 61 | implementation("androidx.appcompat:appcompat:1.2.0") |
| 62 | implementation("androidx.activity:activity-ktx:1.2.0") |
TY Chang | a9a0a0a | 2024-03-27 22:18:42 +0800 | [diff] [blame] | 63 | implementation("androidx.concurrent:concurrent-futures:1.1.0") |
Charcoal Chen | 115fa319 | 2021-12-02 16:37:43 +0800 | [diff] [blame] | 64 | implementation("androidx.concurrent:concurrent-futures-ktx:1.1.0") |
| 65 | implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.3.1") |
TY Chang | a9a0a0a | 2024-03-27 22:18:42 +0800 | [diff] [blame] | 66 | implementation("androidx.test.espresso:espresso-idling-resource:3.1.0") |
charcoalchen | 8f6c29e | 2019-03-09 15:54:20 +0800 | [diff] [blame] | 67 | |
| 68 | // Guava |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 69 | implementation(libs.guavaAndroid) |
TY Chang | a9a0a0a | 2024-03-27 22:18:42 +0800 | [diff] [blame] | 70 | implementation(libs.guavaListenableFuture) |
Charcoal Chen | 115fa319 | 2021-12-02 16:37:43 +0800 | [diff] [blame] | 71 | implementation("androidx.viewpager2:viewpager2:1.0.0") |
WenHung_Teng | f3fa993 | 2019-04-22 18:12:43 +0800 | [diff] [blame] | 72 | |
Alan Viverette | 08421e1 | 2024-01-03 09:58:57 -0500 | [diff] [blame] | 73 | // Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath. |
natnaelbelay | a817dd9 | 2024-01-17 10:30:59 -0500 | [diff] [blame] | 74 | androidTestImplementation("androidx.annotation:annotation-experimental:1.4.0") |
TY Chang | a9a0a0a | 2024-03-27 22:18:42 +0800 | [diff] [blame] | 75 | androidTestImplementation(project(":concurrent:concurrent-futures")) |
| 76 | androidTestImplementation(project(":concurrent:concurrent-futures-ktx")) |
Alan Viverette | 08421e1 | 2024-01-03 09:58:57 -0500 | [diff] [blame] | 77 | |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 78 | androidTestImplementation(libs.testExtJunit) |
| 79 | androidTestImplementation(libs.testCore) |
| 80 | androidTestImplementation(libs.testRunner) |
| 81 | androidTestImplementation(libs.testRules) |
| 82 | androidTestImplementation(libs.testUiautomator) |
Charcoal Chen | 3eb7fff | 2021-12-14 09:30:43 +0800 | [diff] [blame] | 83 | androidTestImplementation(libs.truth) |
WenHung_Teng | b72a4e0 | 2022-08-10 16:48:06 +0800 | [diff] [blame] | 84 | androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0") |
Tahsin Masrur | 068199ff | 2023-06-01 12:20:32 +0800 | [diff] [blame] | 85 | androidTestImplementation(project(":camera:camera-testing")) { |
| 86 | // Ensure camera-testing does not pull in androidx.test dependencies |
| 87 | exclude(group:"androidx.test") |
| 88 | } |
Charcoal Chen | d947d99 | 2022-05-31 15:56:49 +0800 | [diff] [blame] | 89 | androidTestImplementation(project(":internal-testutils-runtime")) |
Franklin Wu | 0d20177 | 2019-08-08 15:23:37 -0700 | [diff] [blame] | 90 | androidTestCompileOnly(project(":camera:camera-extensions-stub")) |
WenHung_Teng | 10b5c0a | 2020-09-25 12:50:17 +0800 | [diff] [blame] | 91 | |
| 92 | // Testing resource dependency for manifest |
Tahsin Masrur | 068199ff | 2023-06-01 12:20:32 +0800 | [diff] [blame] | 93 | debugImplementation(project(":camera:camera-testing")) { |
| 94 | // Ensure camera-testing does not pull in androidx.test dependencies |
| 95 | exclude(group:"androidx.test") |
| 96 | } |
Aurimas Liutikas | fba96cb | 2022-08-23 08:48:34 -0700 | [diff] [blame] | 97 | debugImplementation(libs.testCore) |
charcoalchen | 8f6c29e | 2019-03-09 15:54:20 +0800 | [diff] [blame] | 98 | } |
| 99 | |
Aurimas Liutikas | b93215e | 2023-06-12 16:07:11 -0700 | [diff] [blame] | 100 | // Copy apks to dist/apks as they are used outside of androidx test infrastructure |
| 101 | ApkCopyHelperKt.setupAppApkCopy(project, "debug") |
| 102 | ApkCopyHelperKt.setupTestApkCopy(project) |
| 103 | |
Aurimas Liutikas | b9e270a | 2023-05-26 07:10:40 +0000 | [diff] [blame] | 104 | androidx { |
| 105 | deviceTests { |
| 106 | // These tests only work on devices that ship extensions |
| 107 | // and androidx test infrastructure has no such devices b/284404606 |
| 108 | enabled = false |
| 109 | } |
| 110 | } |