-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
78 lines (66 loc) · 2.57 KB
/
build.gradle
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
compose_version = '1.7.2'
kotlin_version = '1.9.25'
coroutines_version = '1.5.2'
accompanist_version = '0.22.0-rc'
room_version = '2.5.0-beta01'
// https://github.com/JLLeitschuh/ktlint-gradle/releases
ktlintPluginVersion = "10.2.0"
// https://github.com/detekt/detekt/releases
detektVersion = "1.19.0"
// Source: https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.0-alpha01
lifecycle_version = "2.6.0-alpha01"
}
}
plugins {
id 'com.android.application' version '8.2.2' apply false
id 'com.android.library' version '8.2.2' apply false
id 'org.jetbrains.kotlin.android' version '1.9.25' apply false
id 'com.google.dagger.hilt.android' version '2.48' apply false
id 'org.jlleitschuh.gradle.ktlint' version '10.2.0'
id 'io.gitlab.arturbosch.detekt' version '1.19.0'
id 'com.google.firebase.crashlytics' version '2.9.2'
id 'com.google.firebase.firebase-perf' version '1.4.2' apply false
id 'com.google.gms.google-services' version '4.4.2' apply false
}
subprojects {
apply from: "../buildscripts/ktlint.gradle"
apply from: "../buildscripts/detekt.gradle"
repositories {
google()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
if (project.findProperty("myapp.enableComposeCompilerReports") == "true") {
freeCompilerArgs += [
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
project.buildDir.absolutePath + "/compose_metrics"
]
freeCompilerArgs += [
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
project.buildDir.absolutePath + "/compose_metrics"
]
freeCompilerArgs += [
'-Xadd-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED'
]
}
}
}
}
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
//tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
// kotlinOptions {
// freeCompilerArgs += "-Xcontext-receivers"
// }
//}