mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-05 19:08:23 +00:00
43 lines
1.7 KiB
Groovy
43 lines
1.7 KiB
Groovy
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
plugins {
|
|
alias(libs.plugins.androidApplication) apply false
|
|
alias(libs.plugins.androidLibrary) apply false
|
|
alias(libs.plugins.jetbrainsKotlinAndroid) apply false
|
|
alias(libs.plugins.serialization) apply false
|
|
alias(libs.plugins.google.gms) version(libs.versions.gms) apply false
|
|
alias(libs.plugins.kotlin.ksp) version(libs.versions.ksp) apply false
|
|
alias(libs.plugins.gradle.ktlint) version(libs.versions.ktlint) 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"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|