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 */ <lambda>null16plugins { 17 alias(libs.plugins.android.library) 18 alias(libs.plugins.kotlin.android) 19 20 alias(libs.plugins.kotlin.kapt) 21 alias(libs.plugins.dagger.hilt.android) 22 } 23 <lambda>null24android { 25 namespace = "com.google.jetpackcamera.permissions" 26 compileSdk = libs.versions.compileSdk.get().toInt() 27 compileSdkPreview = libs.versions.compileSdkPreview.get() 28 29 defaultConfig { 30 minSdk = libs.versions.minSdk.get().toInt() 31 32 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 33 consumerProguardFiles("consumer-rules.pro") 34 } 35 36 compileOptions { 37 sourceCompatibility = JavaVersion.VERSION_17 38 targetCompatibility = JavaVersion.VERSION_17 39 } 40 41 kotlin { 42 jvmToolchain(17) 43 } 44 buildFeatures { 45 buildConfig = true 46 compose = true 47 } 48 composeOptions { 49 kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get() 50 } 51 } 52 <lambda>null53dependencies { 54 // Compose 55 val composeBom = platform(libs.compose.bom) 56 implementation(composeBom) 57 androidTestImplementation(composeBom) 58 59 // Compose - Material Design 3 60 implementation(libs.compose.material3) 61 implementation(libs.compose.material.icons.extended) 62 63 // Compose - Android Studio Preview support 64 implementation(libs.compose.ui.tooling.preview) 65 debugImplementation(libs.compose.ui.tooling) 66 67 // Compose - Integration with ViewModels with Navigation and Hilt 68 implementation(libs.hilt.navigation.compose) 69 70 71 // Compose - Testing 72 androidTestImplementation(libs.compose.junit) 73 74 // Accompanist - Permissions 75 implementation(libs.accompanist.permissions) 76 77 // Hilt 78 implementation(libs.dagger.hilt.android) 79 kapt(libs.dagger.hilt.compiler) 80 81 82 implementation(libs.androidx.core.ktx) 83 implementation(libs.androidx.appcompat) 84 implementation(libs.android.material) 85 testImplementation(libs.junit) 86 androidTestImplementation(libs.androidx.junit) 87 androidTestImplementation(libs.androidx.espresso.core) 88 } 89 // Allow references to generated code 90 kapt { 91 correctErrorTypes = true 92 }