1/*
2 * Copyright (C) 2024 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 implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17import androidx.build.AndroidXConfig
18import androidx.build.ApkCopyHelperKt
19
20plugins {
21    id("AndroidXPlugin")
22    id("AndroidXComposePlugin")
23    id("com.android.application")
24    id("org.jetbrains.kotlin.android")
25}
26
27dependencies {
28    implementation(libs.kotlinStdlib)
29
30    implementation(project(":appcompat:appcompat"))
31    implementation("androidx.activity:activity-compose:1.10.1")
32    implementation(project(":compose:foundation:foundation"))
33    implementation(project(":compose:foundation:foundation-layout"))
34    implementation(project(":compose:material3:material3"))
35    implementation("androidx.compose.material:material-icons-core:1.6.8")
36    implementation(project(":compose:runtime:runtime"))
37    implementation(project(":compose:ui:ui"))
38    implementation(project(":compose:ui:ui-tooling-preview"))
39
40    // Adaptive (CAMAL) dependencies
41    implementation(project(":compose:material3:adaptive:adaptive"))
42    implementation(project(":compose:material3:adaptive:adaptive-layout"))
43    implementation(project(":compose:material3:adaptive:adaptive-navigation"))
44    implementation(project(":compose:material3:material3-adaptive-navigation-suite"))
45
46    // XR Adaptive integration library
47    implementation(project(":xr:compose:material3:material3"))
48    implementation(project(":xr:compose:compose"))
49    implementation(project(":xr:scenecore:scenecore"))
50
51    compileOnly(files(new File(AndroidXConfig.getPrebuiltsRoot(project), "androidx/xr/extensions/com.android.extensions.xr.jar")))
52
53    // TODO(b/374796755): Write unit-tests for this test app
54}
55
56android {
57    compileSdk = 35
58    defaultConfig {
59        minSdk = 34
60    }
61    namespace = "androidx.xr.compose.material3.integration.testapp"
62    buildTypes {
63        release {
64            minifyEnabled = true
65            shrinkResources = true
66            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')
67        }
68    }
69}
70
71androidx {
72    // TODO: b/326456246
73    optOutJSpecify = true
74}
75
76// Making this APK available via Android Build so the QA team can
77// access it in a convenient manner.
78ApkCopyHelperKt.setupAppApkCopy(project, "release")
79