-
Notifications
You must be signed in to change notification settings - Fork 41
/
build.gradle.kts
77 lines (70 loc) · 2.43 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
apply(plugin = "io.github.gradle-nexus.publish-plugin")
apply(plugin = "org.jetbrains.dokka")
buildscript {
repositories {
google()
mavenCentral()
maven("https://plugins.gradle.org/m2/")
}
}
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.kotlin.compatibility.validator) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.wire) apply false
alias(libs.plugins.nexus) apply false
alias(libs.plugins.google.gms) apply false
alias(libs.plugins.dokka) apply false
alias(libs.plugins.spotless) apply false
alias(libs.plugins.paparazzi) apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.play.publisher) apply false
alias(libs.plugins.baseline.profile) apply false
}
subprojects {
if (name.startsWith("stream-video-android")) {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.freeCompilerArgs += listOf(
"-Xjvm-default=enable",
"-opt-in=io.getstream.video.android.core.internal.InternalStreamVideoApi"
)
}
}
// TODO - re-enable the core module once coordinator is stable
if (name.startsWith("stream-video-android") && !name.startsWith("stream-video-android-core")) {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.freeCompilerArgs += listOf(
"-Xexplicit-api=strict"
)
}
}
}
tasks.register("clean")
.configure {
delete(rootProject.buildDir)
}
apply(from = "${rootDir}/scripts/publish-root.gradle")
//apply(from = teamPropsFile("git-hooks.gradle.kts"))
//
//fun teamPropsFile(propsFile: String): File {
// val teamPropsDir = file("team-props")
// return File(teamPropsDir, propsFile)
//}
afterEvaluate {
println("Running Add Pre Commit Git Hook Script on Build")
exec {
if (System.getProperty("os.name").toLowerCase().contains("win")) {
// Windows-specific command
commandLine("cmd", "/c", "copy", ".\\scripts\\git-hooks\\pre-push", ".\\.git\\hooks")
} else {
// Unix-based systems
commandLine("cp", "./scripts/git-hooks/pre-push", "./.git/hooks")
}
}
println("Added pre-push Git Hook Script.")
}