-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
58 lines (53 loc) · 1.9 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
buildscript {
extra.apply {
set("compileSdk", 34)
set("minSdkVersion", 26)
set("targetSdk", 34)
set("versionCode", 1)
set("versionName", "1.0")
}
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath(libs.android.gradle)
classpath(libs.kotlin.gradle.plugin)
classpath(libs.hilt.android.gradle)
classpath(libs.androidx.navigation)
classpath(libs.gms.google.services)
classpath(libs.firebase.crashlytics.gradle)
}
}
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.application) apply (false)
alias(libs.plugins.kotlin) apply (false)
alias(libs.plugins.kotlin.jvm) apply (false)
alias(libs.plugins.library) apply (false)
alias(libs.plugins.ktlint) apply (false)
alias(libs.plugins.detekt) apply (true)
}
subprojects {
apply (plugin = "io.gitlab.arturbosch.detekt")
detekt {
config.setFrom(files("$rootDir/detekt-config.yml"))
parallel = true
}
// run use ./gradlew assembleRelease -PcomposeCompilerReports=true --rerun-tasks
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
if (project.findProperty("composeCompilerReports") == "true") {
val metricsOutputDir = "${rootProject.file(".").absolutePath}/compose-report/compose-metrics"
val reportOutputDir = "${rootProject.file(".").absolutePath}/compose-report/compose-reports"
freeCompilerArgs = freeCompilerArgs + listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$reportOutputDir",
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=$metricsOutputDir"
)
}
}
}
}