-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
54 lines (43 loc) · 1.02 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
plugins {
kotlin("jvm") version "2.0.0"
`maven-publish`
}
val minestomVersion: String by extra { "4305006e6b" }
repositories {
mavenCentral()
}
allprojects {
apply(plugin = "kotlin")
kotlin {
jvmToolchain(21)
}
tasks.register<BuildAndPublishTask>("buildAndPublish") {
group = "build"
description = "Build and publish to Maven Local"
dependsOn("build", "publishToMavenLocal")
}
}
subprojects {
apply(plugin = "java")
apply(plugin = "maven-publish")
publishing {
afterEvaluate {
publications {
create<MavenPublication>("maven") {
groupId = "gg.airbrush"
artifactId = project.name
version = "${project.version}"
from(components["java"])
}
}
}
}
java {
withSourcesJar()
withJavadocJar()
}
}
abstract class BuildAndPublishTask : DefaultTask() {
@TaskAction
fun action() {}
}