-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
124 lines (110 loc) · 4.05 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/*
* Copyright (c) Milan Jurkulák 2024.
* Contact:
* e: mimoccc@gmail.com
* e: mj@mjdev.org
* w: https://mjdev.org
*/
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.gradle.ksp) apply false
alias(libs.plugins.gradle.ktlint) apply false
alias(libs.plugins.gradle.versions) apply true
alias(libs.plugins.gradle.catalogs.update) apply true
alias(libs.plugins.compose.screenshot) apply false
}
buildscript {
repositories {
google()
mavenCentral()
maven("https://storage.googleapis.com/r8-releases/raw")
maven("https://mvn.dailymotion.com/repository/releases/")
}
dependencies {
classpath(libs.gradle)
classpath(libs.gradle.api)
classpath(libs.gradle.kotlin.plugin)
classpath(libs.gradle.tools.r8)
classpath(libs.gradle.detekt.plugin)
classpath(libs.gradle.objectbox.plugin)
classpath(libs.gradle.paparazzi.plugin)
classpath(libs.gradle.kotlinter)
classpath(libs.gradle.dokka.plugin)
// classpath(libs.gradle.markdown.plugin)
// classpath(libs.gradle.ospackage.plugin)
}
configurations.classpath {
resolutionStrategy.activateDependencyLocking()
}
}
versionCatalogUpdate {
sortByKey = true
pin {
// versions = ["my-version-name", "other-version"]
// libraries = [libs.my.library.reference, libs.my.other.library.reference]
// plugins = [libs.plugins.my.plugin, libs.plugins.my.other.plugin]
// groups = ["com.somegroup", "com.someothergroup"]
}
keep {
// versions = ["my-version-name", "other-version"]
// libraries = [libs.my.library.reference, libs.my.other.library.reference]
// plugins = [libs.plugins.my.plugin, libs.plugins.my.other.plugin]
// groups = ["com.somegroup", "com.someothergroup"]
keepUnusedVersions = false
keepUnusedLibraries = false
keepUnusedPlugins = false
}
}
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}
subprojects {
pluginManager.withPlugin("java") {
configure<JavaPluginExtension> {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
tasks.withType<JavaCompile>().configureEach {
options.release.set(8)
}
}
pluginManager.withPlugin("org.jetbrains.kotlin.jvm") {
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
// jvmTarget.set(17)
progressiveMode.set(true)
}
}
}
if (JavaVersion.current() >= JavaVersion.VERSION_16) {
tasks.withType<Test>().configureEach {
jvmArgs(
"--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
"--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
"--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
"--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
"--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED",
"--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED",
"--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
"--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED",
"--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
"--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
)
}
}
// pluginManager.withPlugin("com.vanniktech.maven.publish") {
// apply(plugin = "org.jetbrains.dokka")
//
// tasks.withType<DokkaTask>().configureEach {
// outputDirectory.set(rootDir.resolve("../docs/0.x"))
// dokkaSourceSets.configureEach {
// skipDeprecated.set(true)
// }
// }
// configure<MavenPublishBaseExtension> {
// publishToMavenCentral(automaticRelease = true)
// signAllPublications()
// }
// }
}