build.gradle.kts
1.69 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
plugins {
alias(libs.plugins.kotlin.jvm)
`java-library`
`maven-publish`
}
description = "vibe_erp Public Plug-in API v1 — the only stable contract a plug-in is allowed to depend on."
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
withSourcesJar()
withJavadocJar()
}
kotlin {
jvmToolchain(21)
}
// api-v1 has the strictest dependency hygiene in the entire project.
// Adding ANY dependency here is effectively adding it to every plug-in
// in the ecosystem, forever, until the next major version bump. Be paranoid.
dependencies {
api(libs.kotlin.stdlib)
api(libs.jakarta.validation.api)
testImplementation(libs.junit.jupiter)
testImplementation(libs.assertk)
}
tasks.test {
useJUnitPlatform()
}
// We override the inherited project version (0.1.0-SNAPSHOT) with the
// independently-versioned API line, because plug-in authors track this.
version = providers.gradleProperty("vibeerp.api.version").get()
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
groupId = "org.vibeerp"
artifactId = "api-v1"
version = project.version.toString()
pom {
name.set("vibe_erp Public Plug-in API v1")
description.set("Stable, semver-governed plug-in API for the vibe_erp framework.")
url.set("https://github.com/vibeerp/vibe-erp")
licenses {
license {
name.set("Apache License 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
}
}
}
}