2023-07-30 18:10:23 -04:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
2023-01-11 13:31:20 -05:00
|
|
|
buildscript {
|
|
|
|
ext {
|
2023-11-09 12:02:28 -05:00
|
|
|
fragment_version = "1.6.2"
|
2024-01-29 16:28:53 -05:00
|
|
|
lifecycle_version = '2.7.0'
|
2024-02-29 09:18:56 -05:00
|
|
|
compose_ui_version = '1.6.2'
|
2024-02-13 11:38:55 -05:00
|
|
|
nav_version = '2.7.7'
|
2023-01-11 13:31:20 -05:00
|
|
|
room_version = "2.4.3"
|
2024-01-29 16:28:53 -05:00
|
|
|
accompanist_version = '0.34.0'
|
2024-02-23 16:59:47 -05:00
|
|
|
coil_version = '2.6.0'
|
2024-02-20 15:52:25 -05:00
|
|
|
vico_version = '1.14.0'
|
2024-01-29 16:28:53 -05:00
|
|
|
media3_version = '1.2.1'
|
2023-09-12 17:53:18 -04:00
|
|
|
core_ktx_version = '1.12.0'
|
2024-02-13 11:38:55 -05:00
|
|
|
material3_version = '1.2.0'
|
2023-01-11 13:31:20 -05:00
|
|
|
}
|
2023-05-10 11:16:47 -04:00
|
|
|
dependencies {
|
2024-02-23 16:59:47 -05:00
|
|
|
classpath 'com.google.gms:google-services:4.4.1'
|
2023-05-10 11:16:47 -04:00
|
|
|
}
|
2023-08-22 11:16:31 -04:00
|
|
|
}
|
|
|
|
|
2023-01-11 13:31:20 -05:00
|
|
|
plugins {
|
2024-03-01 08:03:58 -05:00
|
|
|
id 'com.android.application' version '8.3.0' apply false
|
|
|
|
id 'com.android.library' version '8.3.0' apply false
|
2024-01-31 16:05:00 -05:00
|
|
|
id 'org.jetbrains.kotlin.android' version '1.9.22' apply false
|
|
|
|
id 'org.jetbrains.kotlin.jvm' version '1.9.22' apply false
|
|
|
|
id 'androidx.benchmark' version '1.2.3' apply false
|
|
|
|
id 'com.diffplug.spotless' version '6.25.0' apply false
|
2023-03-07 19:09:26 +01:00
|
|
|
}
|
|
|
|
|
2023-06-06 15:49:52 -04:00
|
|
|
subprojects {
|
2023-07-30 18:10:23 -04:00
|
|
|
tasks.withType(KotlinCompile).configureEach {
|
2023-06-06 15:49:52 -04:00
|
|
|
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"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-01-06 10:44:05 -05:00
|
|
|
|
|
|
|
apply plugin: 'com.diffplug.spotless'
|
|
|
|
spotless {
|
|
|
|
kotlin {
|
|
|
|
target '**/*.kt'
|
|
|
|
targetExclude("$buildDir/**/*.kt")
|
|
|
|
|
|
|
|
ktlint("1.1.0")
|
2024-01-06 11:32:41 -05:00
|
|
|
//ktfmt().googleStyle()
|
2024-01-06 10:44:32 -05:00
|
|
|
licenseHeaderFile rootProject.file('spotless/copyright.kt'), "package|import|class|object|sealed|open|interface|abstract "
|
2024-01-06 10:44:05 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
groovyGradle {
|
|
|
|
target '*.gradle'
|
|
|
|
}
|
|
|
|
|
|
|
|
afterEvaluate {
|
|
|
|
tasks.named("preBuild") {
|
|
|
|
dependsOn("spotlessApply")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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
|