-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathsettings.gradle.kts
More file actions
101 lines (92 loc) · 3.52 KB
/
settings.gradle.kts
File metadata and controls
101 lines (92 loc) · 3.52 KB
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
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
rootProject.name = "jsvg-root"
pluginManagement {
plugins {
fun String.v() = extra["$this.version"].toString()
fun idv(
id: String,
key: String = id,
) = id(id) version key.v()
idv("com.diffplug.spotless")
idv("com.github.vlsi.crlf", "com.github.vlsi.vlsi-release-plugins")
idv("com.github.vlsi.gradle-extensions", "com.github.vlsi.vlsi-release-plugins")
idv("com.github.vlsi.license-gather", "com.github.vlsi.vlsi-release-plugins")
idv("net.ltgt.errorprone")
idv("me.champeau.jmh")
idv("org.sonarqube")
idv("biz.aQute.bnd.builder", "biz.aQute.bnd.lib")
idv("com.gradleup.nmcp")
}
}
dependencyResolutionManagement {
versionCatalogs {
fun VersionCatalogBuilder.idv(
name: String,
coordinates: String,
versionRef: String = name,
) {
val parts = coordinates.split(':', limit = 2)
library(name, parts[0], parts[1]).version(extra["$versionRef.version"].toString())
}
class VersionBundle(
val bundleName: String,
val builder: VersionCatalogBuilder,
) {
val libs = mutableListOf<String>()
fun idv(
name: String,
coordinates: String,
versionRef: String = bundleName,
) = builder.idv("$bundleName-$name".also { libs.add(it) }, coordinates, versionRef)
}
fun VersionCatalogBuilder.bundle(
name: String,
init: VersionBundle.() -> Unit,
) = VersionBundle(name, this).run {
init()
bundle(name, libs)
}
create("libs") {
idv("javaxAnnotations", "javax.annotation:javax.annotation-api")
idv("nullabilityAnnotations", "org.jetbrains:annotations")
idv("osgiAnnotations", "org.osgi:org.osgi.annotation.bundle")
idv("bndAnnotations", "biz.aQute.bnd:biz.aQute.bndlib", "biz.aQute.bnd.lib")
idv("slf4jApi", "org.slf4j:slf4j-api")
}
create("testLibs") {
bundle("junit") {
idv("api", "org.junit.jupiter:junit-jupiter-api")
idv("engine", "org.junit.jupiter:junit-jupiter-engine")
}
bundle("darklaf") {
idv("core", "com.github.weisj:darklaf-core", "darklaf")
}
bundle("swingExtensions") {
idv("dsl", "com.github.weisj:swing-extensions-dsl")
}
idv("svgSalamander", "com.formdev:svgSalamander")
idv("batik", "org.apache.xmlgraphics:batik-all")
idv("imageCompare", "com.github.weisj:image-comparison")
idv("sizeof", "org.ehcache:sizeof")
}
create("toolLibs") {
bundle("errorprone") {
idv("core", "com.google.errorprone:error_prone_core")
idv("annotations", "com.google.errorprone:error_prone_annotations")
idv("javac", "com.google.errorprone:javac", "errorprone.compiler")
idv("guava", "com.google.guava:guava-beta-checker", "guava")
}
bundle("autoservice") {
idv("annotations", "com.google.auto.service:auto-service-annotations")
idv("processor", "com.google.auto.service:auto-service")
}
}
}
}
include(
"jsvg",
"annotations",
"annotations-processor",
"jsvg-systemlogger",
"jsvg-slf4j",
)