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