Simple-Commons/samples/build.gradle.kts

81 lines
2.5 KiB
Text
Raw Normal View History

2023-07-24 13:37:03 +00:00
plugins {
alias(libs.plugins.android)
alias(libs.plugins.kotlinAndroid)
}
android {
compileSdk = libs.versions.app.build.compileSDKVersion.get().toInt()
defaultConfig {
applicationId = libs.versions.app.version.appId.get()
minSdk = libs.versions.app.build.minimumSDK.get().toInt()
targetSdk = libs.versions.app.build.targetSDK.get().toInt()
versionName = libs.versions.app.version.versionName.get()
versionCode = libs.versions.app.version.versionCode.get().toInt()
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
2023-07-26 15:13:01 +00:00
compileOptions {
val currentJavaVersionFromLibs = JavaVersion.valueOf(libs.versions.app.build.javaVersion.get().toString())
sourceCompatibility = currentJavaVersionFromLibs
targetCompatibility = currentJavaVersionFromLibs
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = project.libs.versions.app.build.kotlinJVMTarget.get()
kotlinOptions.freeCompilerArgs = listOf(
"-opt-in=kotlin.RequiresOptIn",
"-Xcontext-receivers"
)
}
2023-07-24 14:59:01 +00:00
buildFeatures {
buildConfig = true
viewBinding = true
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = project.libs.versions.app.build.kotlinJVMTarget.get()
kotlinOptions.freeCompilerArgs = listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api",
"-opt-in=androidx.compose.material.ExperimentalMaterialApi",
"-opt-in=androidx.compose.foundation.ExperimentalFoundationApi",
"-Xcontext-receivers"
)
2023-07-24 14:59:01 +00:00
}
2023-07-24 13:37:03 +00:00
sourceSets {
getByName("main").java.srcDirs("src/main/kotlin")
}
namespace = "com.simplemobiletools.commons.samples"
lint {
disable.add("Instantiatable")
}
2023-07-24 13:37:03 +00:00
}
dependencies {
implementation(projects.commons)
implementation(libs.material)
implementation(libs.androidx.swiperefreshlayout)
implementation(libs.bundles.lifecycle)
implementation(libs.bundles.compose)
debugImplementation(libs.bundles.compose.preview)
2023-07-24 13:37:03 +00:00
}