2023-01-11 13:31:20 -05:00
|
|
|
plugins {
|
2024-03-01 10:38:03 -05:00
|
|
|
alias(libs.plugins.androidApplication) apply false
|
|
|
|
alias(libs.plugins.jetbrainsKotlinAndroid) apply false
|
|
|
|
alias(libs.plugins.androidLibrary) apply false
|
|
|
|
alias(libs.plugins.jetbrainsKotlinJvm) apply false
|
|
|
|
alias(libs.plugins.androidBenchmark) apply false
|
2024-07-09 10:42:50 -04:00
|
|
|
alias(libs.plugins.diffplugSpotless)
|
2024-03-01 10:38:03 -05:00
|
|
|
alias(libs.plugins.googleServices) apply false
|
2024-07-03 11:00:45 -04:00
|
|
|
alias(libs.plugins.jetbrainsComposeCompiler) apply false
|
2023-03-07 19:09:26 +01:00
|
|
|
}
|
|
|
|
|
2024-07-09 10:42:50 -04:00
|
|
|
allprojects {
|
2024-01-06 10:44:05 -05:00
|
|
|
apply plugin: 'com.diffplug.spotless'
|
|
|
|
|
2024-07-09 10:42:50 -04:00
|
|
|
if (project === rootProject) {
|
|
|
|
spotless {
|
|
|
|
predeclareDeps()
|
2024-01-06 10:44:05 -05:00
|
|
|
}
|
2024-07-09 10:42:50 -04:00
|
|
|
spotlessPredeclare {
|
|
|
|
kotlin {
|
|
|
|
ktlint("1.3.1")
|
|
|
|
}
|
2024-01-06 10:44:05 -05:00
|
|
|
}
|
2024-07-09 10:42:50 -04:00
|
|
|
} else {
|
|
|
|
spotless {
|
|
|
|
kotlin {
|
|
|
|
target '**/*.kt'
|
|
|
|
targetExclude("$layout.buildDirectory/**/*.kt")
|
|
|
|
|
|
|
|
ktlint("1.3.1")
|
|
|
|
licenseHeaderFile rootProject.file('spotless/copyright.kt'), "package|import|class|object|sealed|open|interface|abstract "
|
|
|
|
}
|
2024-01-06 10:44:05 -05:00
|
|
|
|
2024-07-09 10:42:50 -04:00
|
|
|
groovyGradle {
|
|
|
|
target '*.gradle'
|
2024-01-06 10:44:05 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-07-09 10:42:50 -04:00
|
|
|
subprojects {
|
|
|
|
afterEvaluate {
|
|
|
|
tasks.named("preBuild") {
|
|
|
|
dependsOn("spotlessApply")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-01-06 10:44:05 -05:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
2024-06-24 14:13:55 -04:00
|
|
|
tasks.getByPath(':amethyst:preBuild').dependsOn installGitHook
|