summaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts33
1 files changed, 18 insertions, 15 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index 29f3043..694b647 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,6 +1,3 @@
-plugins {
- `java-library`
-}
allprojects {
group = "moe.nea"
version = "1.0-SNAPSHOT"
@@ -8,19 +5,25 @@ allprojects {
repositories {
mavenCentral()
}
-}
-dependencies {
- api("org.jspecify:jspecify:1.0.0")
-}
-allprojects {
- afterEvaluate {
- if (project.plugins.hasPlugin(JavaBasePlugin::class.java))
- dependencies {
- testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.1")
- testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.1")
- }
- }
+
tasks.withType(Test::class) {
useJUnitPlatform()
}
+}
+subprojects {
+ apply(plugin = "org.gradle.java-library")
+ apply(plugin = "org.gradle.maven-publish")
+ dependencies {
+ "api"("org.jspecify:jspecify:1.0.0")
+ "testImplementation"("org.junit.jupiter:junit-jupiter-api:5.8.1")
+ "testRuntimeOnly"("org.junit.jupiter:junit-jupiter-engine:5.8.1")
+ }
+
+ configure<PublishingExtension> {
+ publications {
+ create<MavenPublication>("maven") {
+ from(components[("java")])
+ }
+ }
+ }
} \ No newline at end of file