Skip to content

Commit

Permalink
Network 和 Nukkit 可单独构建
Browse files Browse the repository at this point in the history
  • Loading branch information
Colerar committed Feb 18, 2025
1 parent c76f87d commit 2931ea7
Show file tree
Hide file tree
Showing 13 changed files with 67 additions and 307 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,6 @@ nbdist/
.nb-gradle/
nbactions.xml

.gradle

# End of https://www.gitignore.io/api/java,maven,eclipse,netbeans,intellij+all
9 changes: 9 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
allprojects {
plugins.apply("java-library")
val javaLanguageVersion = JavaLanguageVersion.of(21)
the<JavaPluginExtension>().apply {
toolchain {
languageVersion = javaLanguageVersion
}
}
}
6 changes: 5 additions & 1 deletion common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
plugins {
id("ecbuild.java-conventions")
`java-library`
}

dependencies {
api(libs.netty.buffer)
api(libs.netty.epoll)
api(libs.netty.kqueue)
annotationProcessor(libs.lombok)
compileOnly(libs.lombok)
compileOnly(libs.spotbugs.annotations)
compileOnly(libs.javax.annotations)
}

group = "com.nukkitx.network"
Expand Down
36 changes: 0 additions & 36 deletions common/pom.xml

This file was deleted.

13 changes: 13 additions & 0 deletions libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[versions]
netty = "4.1.107.Final"

[libraries]
expiringmap = { module = "net.jodah:expiringmap", version = "0.5.11" }
javax-annotations = { module = "javax.annotation:javax.annotation-api", version = "1.3.2" }
lombok = { module = "org.projectlombok:lombok", version = "1.18.30" }
netty-all = { module = "io.netty:netty-all", version.ref = "netty" }
netty-buffer = { module = "io.netty:netty-buffer", version.ref = "netty" }
netty-epoll = { module = "io.netty:netty-transport-native-epoll", version.ref = "netty" }
netty-handler = { module = "io.netty:netty-handler", version.ref = "netty" }
netty-kqueue = { module = "io.netty:netty-transport-native-kqueue", version.ref = "netty" }
spotbugs-annotations = { module = "com.github.spotbugs:spotbugs-annotations", version = "4.9.1" }
177 changes: 0 additions & 177 deletions pom.xml

This file was deleted.

6 changes: 5 additions & 1 deletion query/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
plugins {
id("ecbuild.java-conventions")
`java-library`
}

dependencies {
api(project(":common"))
compileOnly(libs.netty.handler)
annotationProcessor(libs.lombok)
compileOnly(libs.lombok)
compileOnly(libs.spotbugs.annotations)
compileOnly(libs.javax.annotations)
}

group = "com.nukkitx.network"
Expand Down
28 changes: 0 additions & 28 deletions query/pom.xml

This file was deleted.

6 changes: 5 additions & 1 deletion raknet/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
plugins {
id("ecbuild.java-conventions")
`java-library`
}

dependencies {
api(project(":common"))
api(libs.netty.handler)
api(libs.expiringmap)
annotationProcessor(libs.lombok)
compileOnly(libs.lombok)
compileOnly(libs.spotbugs.annotations)
compileOnly(libs.javax.annotations)
}

group = "com.nukkitx.network"
Expand Down
34 changes: 0 additions & 34 deletions raknet/pom.xml

This file was deleted.

6 changes: 5 additions & 1 deletion rcon/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
plugins {
id("ecbuild.java-conventions")
`java-library`
}

dependencies {
api(project(":common"))
compileOnly(libs.netty.handler)
annotationProcessor(libs.lombok)
compileOnly(libs.lombok)
compileOnly(libs.spotbugs.annotations)
compileOnly(libs.javax.annotations)
}

group = "com.nukkitx.network"
Expand Down
Loading

0 comments on commit 2931ea7

Please sign in to comment.