Files
Amber/build.gradle
T
2024-04-12 08:21:10 -03:00

51 lines
1.8 KiB
Groovy

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
ext {
lifecycle_version = '2.7.0'
compose_ui_version = '1.6.5'
nav_version = "2.7.7"
core_ktx_version = '1.12.0'
room_version = "2.6.1"
}
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.3.2' apply false
id 'com.android.library' version '8.3.2' apply false
id 'org.jetbrains.kotlin.android' version '1.9.23' apply false
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.23' apply false
id 'com.google.gms.google-services' version '4.4.1' apply false
id 'com.google.devtools.ksp' version '1.9.23-1.0.20' apply false
}
tasks.register('installGitHook', Copy) {
from new File(rootProject.rootDir, 'git-hooks/pre-commit')
from new File(rootProject.rootDir, 'git-hooks/pre-push')
into { new File(rootProject.rootDir, '.git/hooks') }
fileMode 0777
}
tasks.getByPath(':app:preBuild').dependsOn installGitHook
subprojects {
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
if (project.findProperty("composeCompilerReports") == "true") {
freeCompilerArgs += [
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
project.buildDir.absolutePath + "/compose_compiler"
]
}
if (project.findProperty("composeCompilerMetrics") == "true") {
freeCompilerArgs += [
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
project.buildDir.absolutePath + "/compose_compiler"
]
}
}
}
}