[go: nahoru, domu]

blob: 5de107f7f0a0a7ac529022ddce2480c07f46784e [file] [log] [blame]
charcoalchen8f6c29e2019-03-09 15:54:20 +08001/*
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 Songee0da742024-01-03 14:08:46 -080018/**
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 Liutikasb93215e2023-06-12 16:07:11 -070025import androidx.build.ApkCopyHelperKt
26
charcoalchen8f6c29e2019-03-09 15:54:20 +080027plugins {
28 id("AndroidXPlugin")
29 id("com.android.application")
Charcoal Chen2dbdff52021-11-04 14:16:01 +080030 id("kotlin-android")
charcoalchen8f6c29e2019-03-09 15:54:20 +080031}
32
33android {
34 defaultConfig {
35 applicationId "androidx.camera.integration.extensions"
charcoalchen8f6c29e2019-03-09 15:54:20 +080036 }
Charcoal Chenb0ebb202021-09-29 14:32:40 +080037
Charcoal Chen3eb7fff2021-12-14 09:30:43 +080038 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 Chenb0ebb202021-09-29 14:32:40 +080045 }
Aurimas Liutikasdcfa0352022-03-14 16:05:33 -070046 namespace "androidx.camera.integration.extensions"
charcoalchen8f6c29e2019-03-09 15:54:20 +080047}
48
49dependencies {
50 // Internal library
51 implementation(project(":camera:camera-camera2"))
Jasmine Chenee363212023-12-13 17:21:04 -080052 implementation(project(':camera:camera-camera2-pipe-integration'))
charcoalchen8f6c29e2019-03-09 15:54:20 +080053 implementation(project(":camera:camera-extensions"))
Franklin Wu4d89be12019-10-23 15:38:43 -070054 implementation(project(":camera:camera-lifecycle"))
Franklin Wub4e94c92019-11-21 12:19:47 -080055 implementation(project(":camera:camera-view"))
mingdatsai7368ba12023-10-30 20:39:36 +080056 implementation(project(":camera:camera-video"))
charcoalchen8f6c29e2019-03-09 15:54:20 +080057
58 // Android Support Library
Aurimas Liutikasb3483fd2021-06-04 16:56:37 -070059 api(libs.constraintLayout)
Charcoal Chen2dbdff52021-11-04 14:16:01 +080060 implementation(libs.kotlinStdlib)
61 implementation("androidx.appcompat:appcompat:1.2.0")
62 implementation("androidx.activity:activity-ktx:1.2.0")
TY Changa9a0a0a2024-03-27 22:18:42 +080063 implementation("androidx.concurrent:concurrent-futures:1.1.0")
Charcoal Chen115fa3192021-12-02 16:37:43 +080064 implementation("androidx.concurrent:concurrent-futures-ktx:1.1.0")
65 implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.3.1")
TY Changa9a0a0a2024-03-27 22:18:42 +080066 implementation("androidx.test.espresso:espresso-idling-resource:3.1.0")
charcoalchen8f6c29e2019-03-09 15:54:20 +080067
68 // Guava
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070069 implementation(libs.guavaAndroid)
TY Changa9a0a0a2024-03-27 22:18:42 +080070 implementation(libs.guavaListenableFuture)
Charcoal Chen115fa3192021-12-02 16:37:43 +080071 implementation("androidx.viewpager2:viewpager2:1.0.0")
WenHung_Tengf3fa9932019-04-22 18:12:43 +080072
Alan Viverette08421e12024-01-03 09:58:57 -050073 // Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath.
natnaelbelaya817dd92024-01-17 10:30:59 -050074 androidTestImplementation("androidx.annotation:annotation-experimental:1.4.0")
TY Changa9a0a0a2024-03-27 22:18:42 +080075 androidTestImplementation(project(":concurrent:concurrent-futures"))
76 androidTestImplementation(project(":concurrent:concurrent-futures-ktx"))
Alan Viverette08421e12024-01-03 09:58:57 -050077
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070078 androidTestImplementation(libs.testExtJunit)
79 androidTestImplementation(libs.testCore)
80 androidTestImplementation(libs.testRunner)
81 androidTestImplementation(libs.testRules)
82 androidTestImplementation(libs.testUiautomator)
Charcoal Chen3eb7fff2021-12-14 09:30:43 +080083 androidTestImplementation(libs.truth)
WenHung_Tengb72a4e02022-08-10 16:48:06 +080084 androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0")
Tahsin Masrur068199ff2023-06-01 12:20:32 +080085 androidTestImplementation(project(":camera:camera-testing")) {
86 // Ensure camera-testing does not pull in androidx.test dependencies
87 exclude(group:"androidx.test")
88 }
Charcoal Chend947d992022-05-31 15:56:49 +080089 androidTestImplementation(project(":internal-testutils-runtime"))
Franklin Wu0d201772019-08-08 15:23:37 -070090 androidTestCompileOnly(project(":camera:camera-extensions-stub"))
WenHung_Teng10b5c0a2020-09-25 12:50:17 +080091
92 // Testing resource dependency for manifest
Tahsin Masrur068199ff2023-06-01 12:20:32 +080093 debugImplementation(project(":camera:camera-testing")) {
94 // Ensure camera-testing does not pull in androidx.test dependencies
95 exclude(group:"androidx.test")
96 }
Aurimas Liutikasfba96cb2022-08-23 08:48:34 -070097 debugImplementation(libs.testCore)
charcoalchen8f6c29e2019-03-09 15:54:20 +080098}
99
Aurimas Liutikasb93215e2023-06-12 16:07:11 -0700100// Copy apks to dist/apks as they are used outside of androidx test infrastructure
101ApkCopyHelperKt.setupAppApkCopy(project, "debug")
102ApkCopyHelperKt.setupTestApkCopy(project)
103
Aurimas Liutikasb9e270a2023-05-26 07:10:40 +0000104androidx {
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}