Skip to content

Commit 8408a3e

Browse files
committed
move shared build logic to buildSrc
1 parent c2ce803 commit 8408a3e

File tree

10 files changed

+50
-44
lines changed

10 files changed

+50
-44
lines changed

api/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
plugins {
2+
id("net.megavex.scoreboardlibrary.base-conventions")
23
id("net.megavex.scoreboardlibrary.publish-conventions")
34
}

build.gradle.kts

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,5 @@
1-
plugins {
2-
`java-library`
3-
}
4-
51
allprojects {
62
version = "2.1.3"
73
group = "net.megavex"
84
description = "Powerful packet-level scoreboard library for Paper/Spigot servers"
9-
10-
repositories {
11-
mavenCentral()
12-
maven("https://oss.sonatype.org/content/groups/public/")
13-
maven("https://repo.papermc.io/repository/maven-public/")
14-
}
15-
}
16-
17-
subprojects {
18-
apply(plugin = "java-library")
19-
20-
dependencies {
21-
compileOnly("org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT")
22-
testImplementation("org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT")
23-
24-
val adventureVersion = "4.16.0"
25-
compileOnly("net.kyori:adventure-api:$adventureVersion")
26-
compileOnly("net.kyori:adventure-text-serializer-legacy:$adventureVersion")
27-
compileOnly("net.kyori:adventure-text-serializer-gson:$adventureVersion")
28-
testImplementation("net.kyori:adventure-api:$adventureVersion")
29-
30-
val jupiterVersion = "5.10.2"
31-
testImplementation("org.junit.jupiter:junit-jupiter-api:$jupiterVersion")
32-
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jupiterVersion")
33-
}
34-
35-
tasks.withType<JavaCompile>().configureEach {
36-
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
37-
targetCompatibility = JavaVersion.VERSION_1_8.toString()
38-
options.encoding = "UTF-8"
39-
options.isIncremental = true
40-
options.compilerArgs = mutableListOf("-Xlint:-deprecation,-unchecked")
41-
}
42-
43-
tasks.test {
44-
useJUnitPlatform()
45-
}
465
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import org.gradle.api.tasks.compile.JavaCompile
2+
import org.gradle.kotlin.dsl.dependencies
3+
import org.gradle.kotlin.dsl.withType
4+
5+
plugins {
6+
`java-library`
7+
}
8+
9+
repositories {
10+
mavenCentral()
11+
maven("https://oss.sonatype.org/content/repositories/snapshots")
12+
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
13+
}
14+
15+
dependencies {
16+
compileOnly("org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT")
17+
testImplementation("org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT")
18+
19+
val adventureVersion = "4.16.0"
20+
compileOnly("net.kyori:adventure-api:$adventureVersion")
21+
compileOnly("net.kyori:adventure-text-serializer-legacy:$adventureVersion")
22+
compileOnly("net.kyori:adventure-text-serializer-gson:$adventureVersion")
23+
testImplementation("net.kyori:adventure-api:$adventureVersion")
24+
25+
val jupiterVersion = "5.10.2"
26+
testImplementation("org.junit.jupiter:junit-jupiter-api:$jupiterVersion")
27+
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jupiterVersion")
28+
}
29+
30+
tasks.withType<JavaCompile>().configureEach {
31+
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
32+
targetCompatibility = JavaVersion.VERSION_1_8.toString()
33+
options.encoding = "UTF-8"
34+
options.isIncremental = true
35+
options.compilerArgs = mutableListOf("-Xlint:-deprecation,-unchecked")
36+
}
37+
38+
tasks.test {
39+
useJUnitPlatform()
40+
}

commons/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
plugins {
2+
id("net.megavex.scoreboardlibrary.base-conventions")
23
id("net.megavex.scoreboardlibrary.publish-conventions")
34
}
45

extra-kotlin/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
22

33
plugins {
4-
kotlin("jvm") version "1.9.23"
4+
id("net.megavex.scoreboardlibrary.base-conventions")
55
id("net.megavex.scoreboardlibrary.publish-conventions")
6+
kotlin("jvm") version "1.9.23"
67
}
78

89
kotlin {

implementation/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
plugins {
2+
id("net.megavex.scoreboardlibrary.base-conventions")
23
id("net.megavex.scoreboardlibrary.publish-conventions")
34
}
45

versions/modern/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
2-
id("io.papermc.paperweight.userdev") version "1.5.11"
32
`maven-publish`
3+
id("net.megavex.scoreboardlibrary.base-conventions")
4+
id("io.papermc.paperweight.userdev") version "1.5.11"
45
}
56

67
dependencies {

versions/packet-adapter-base/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
plugins {
2+
id("net.megavex.scoreboardlibrary.base-conventions")
23
id("net.megavex.scoreboardlibrary.publish-conventions")
34
}
45

versions/packetevents/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
plugins {
2+
id("net.megavex.scoreboardlibrary.base-conventions")
23
id("net.megavex.scoreboardlibrary.publish-conventions")
34
}
45

56
repositories {
6-
maven("https://repo.papermc.io/repository/maven-public/")
77
maven("https://repo.codemc.io/repository/maven-releases/")
88
}
99

versions/v1_8_R3/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
plugins {
2+
id("net.megavex.scoreboardlibrary.base-conventions")
23
id("net.megavex.scoreboardlibrary.publish-conventions")
34
}
45

0 commit comments

Comments
 (0)