You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nowinandroid/app/build.gradle

103 lines
3.2 KiB

/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import com.google.samples.apps.nowinandroid.buildsrc.Versions
import com.google.samples.apps.nowinandroid.buildsrc.Libs
plugins {
id 'com.android.application'
id 'kotlin-android'
}
android {
compileSdk Versions.compileSdk
defaultConfig {
applicationId "com.google.samples.apps.nowinandroid"
minSdk Versions.minSdk
targetSdk Versions.targetSdk
versionCode Versions.versionCodeBase
versionName Versions.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
useIR = true
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion Libs.AndroidX.Compose.version
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
implementation Libs.Coroutines.android
implementation Libs.AndroidX.Activity.activityCompose
implementation Libs.AndroidX.coreKtx
implementation Libs.AndroidX.appcompat
implementation Libs.AndroidX.Lifecycle.viewModelCompose
implementation Libs.AndroidX.Navigation.fragment
implementation Libs.AndroidX.Navigation.uiKtx
implementation Libs.material3
implementation Libs.AndroidX.Compose.layout
// TODO (M3): Remove this dependency when all components are available
implementation Libs.AndroidX.Compose.material
implementation Libs.AndroidX.Compose.Material3.material3
implementation Libs.AndroidX.Compose.tooling
implementation Libs.AndroidX.Compose.uiUtil
implementation Libs.AndroidX.Compose.runtime
implementation Libs.AndroidX.Compose.runtimeLivedata
debugImplementation Libs.AndroidX.Compose.uiTestManifest
androidTestImplementation Libs.junit
androidTestImplementation Libs.AndroidX.Test.core
androidTestImplementation Libs.AndroidX.Test.espressoCore
androidTestImplementation Libs.AndroidX.Test.rules
androidTestImplementation Libs.AndroidX.Test.Ext.junit
androidTestImplementation Libs.AndroidX.Compose.uiTest
// androidx.test is forcing JUnit, 4.12. This forces it to use 4.13
configurations.configureEach {
resolutionStrategy {
force Libs.junit
}
}
}