2023-01-04 20:58:09 +01:00
|
|
|
plugins {
|
|
|
|
id "java"
|
|
|
|
id "maven-publish"
|
2023-01-04 21:54:49 +01:00
|
|
|
id "net.kyori.blossom" version "1.3.1"
|
2023-01-04 20:58:09 +01:00
|
|
|
}
|
|
|
|
|
2023-01-12 18:48:45 +01:00
|
|
|
sourceSets {
|
|
|
|
java17compat
|
|
|
|
}
|
|
|
|
|
2023-01-11 20:02:03 +01:00
|
|
|
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
2023-01-12 18:48:45 +01:00
|
|
|
[compileJava, compileTestJava, compileJava17compatJava].each {
|
|
|
|
it.options.encoding = "UTF-8"
|
|
|
|
it.sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
it.targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
javadoc.options.encoding = "UTF-8"
|
2023-01-04 20:58:09 +01:00
|
|
|
|
|
|
|
group = project.maven_group
|
|
|
|
archivesBaseName = project.maven_name
|
|
|
|
version = project.maven_version
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
include
|
|
|
|
|
|
|
|
implementation.extendsFrom include
|
|
|
|
api.extendsFrom include
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
maven {
|
|
|
|
name = "Jitpack"
|
|
|
|
url = "https://jitpack.io"
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
name = "Lenni0451"
|
|
|
|
url "https://maven.lenni0451.net/releases"
|
|
|
|
}
|
2023-04-02 21:25:27 +02:00
|
|
|
maven {
|
|
|
|
name = "Lenni0451 Snapshots"
|
|
|
|
url "https://maven.lenni0451.net/snapshots"
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
name = "OpenCollab Releases"
|
|
|
|
url = "https://repo.opencollab.dev/maven-releases/"
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
name = "OpenCollab Snapshots"
|
|
|
|
url = "https://repo.opencollab.dev/maven-snapshots/"
|
|
|
|
}
|
2023-01-04 20:58:09 +01:00
|
|
|
maven {
|
|
|
|
name = "ViaVersion"
|
|
|
|
url "https://repo.viaversion.com"
|
|
|
|
}
|
2023-01-11 20:02:03 +01:00
|
|
|
ivy { // This workaround is needed as gradle does not allow to include Java 17 dependencies in a Java 8 project
|
|
|
|
name = "Mojang"
|
|
|
|
url "https://libraries.minecraft.net"
|
|
|
|
patternLayout {
|
|
|
|
artifact MAVEN_ARTIFACT_PATTERN
|
|
|
|
}
|
|
|
|
metadataSources {
|
|
|
|
it.artifact()
|
|
|
|
}
|
|
|
|
content {
|
|
|
|
includeGroup "com/mojang"
|
|
|
|
}
|
|
|
|
}
|
2023-01-04 20:58:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2023-01-12 18:48:45 +01:00
|
|
|
compileOnly sourceSets.java17compat.output
|
|
|
|
|
2023-06-07 21:43:02 +02:00
|
|
|
include "com.viaversion:viaversion:4.7.0"
|
|
|
|
include("com.viaversion:viabackwards-common:4.7.0") {
|
2023-01-04 20:58:09 +01:00
|
|
|
exclude group: "com.viaversion", module: "viaversion"
|
|
|
|
exclude group: "io.netty", module: "netty-all"
|
|
|
|
exclude group: "com.google.guava", module: "guava"
|
|
|
|
}
|
2023-03-19 00:26:40 +01:00
|
|
|
include "com.viaversion:viarewind-core:2.0.4-SNAPSHOT"
|
2023-06-07 21:43:02 +02:00
|
|
|
include "net.raphimc:ViaLegacy:2.2.17"
|
|
|
|
include "net.raphimc:ViaAprilFools:2.0.7"
|
2023-06-08 14:07:59 +02:00
|
|
|
include("net.raphimc:ViaBedrock:0.0.2-SNAPSHOT") {
|
2023-04-02 21:25:27 +02:00
|
|
|
exclude group: "io.netty", module: "netty-codec-http"
|
|
|
|
exclude group: "io.jsonwebtoken", module: "jjwt-impl"
|
|
|
|
exclude group: "io.jsonwebtoken", module: "jjwt-gson"
|
|
|
|
}
|
2023-06-08 20:19:11 +02:00
|
|
|
include("net.raphimc:ViaLoader:2.2.6-SNAPSHOT") {
|
2023-01-04 20:58:09 +01:00
|
|
|
exclude group: "org.slf4j", module: "slf4j-api"
|
2023-04-22 20:31:12 +02:00
|
|
|
exclude group: "org.yaml", module: "snakeyaml"
|
2023-01-04 20:58:09 +01:00
|
|
|
}
|
2023-04-22 20:31:12 +02:00
|
|
|
include "org.yaml:snakeyaml:1.33" // Geyser does not run with 2.0
|
2023-01-04 20:58:09 +01:00
|
|
|
|
2023-01-09 05:26:55 +01:00
|
|
|
include "com.google.code.gson:gson:2.10.1"
|
2023-04-19 07:08:04 +02:00
|
|
|
include "com.formdev:flatlaf:3.1.1"
|
2023-06-09 07:19:42 +02:00
|
|
|
include "com.google.guava:guava:32.0.1-jre"
|
2023-01-11 20:02:03 +01:00
|
|
|
include "org.apache.commons:commons-lang3:3.12.0"
|
2023-06-08 07:18:49 +02:00
|
|
|
include "commons-io:commons-io:2.13.0"
|
2023-01-04 20:58:09 +01:00
|
|
|
include "net.sf.jopt-simple:jopt-simple:5.0.4"
|
2023-02-24 06:05:30 +01:00
|
|
|
include "org.apache.logging.log4j:log4j-core:2.20.0"
|
2023-02-24 08:39:34 +01:00
|
|
|
include "org.apache.logging.log4j:log4j-slf4j-impl:2.20.0"
|
2023-01-11 20:02:03 +01:00
|
|
|
include "com/mojang:authlib:3.16.29"
|
2023-05-17 18:08:31 +02:00
|
|
|
include "net.lenni0451.classtransform:mixinstranslator:1.9.1"
|
|
|
|
include "net.lenni0451.classtransform:mixinsdummy:1.9.1"
|
|
|
|
include "net.lenni0451.classtransform:additionalclassprovider:1.9.1"
|
2023-05-30 22:46:59 +02:00
|
|
|
include "net.lenni0451:Reflect:1.2.0"
|
2023-01-04 20:58:09 +01:00
|
|
|
include "net.lenni0451:LambdaEvents:2.0.3"
|
2023-06-07 21:43:02 +02:00
|
|
|
include "net.raphimc.netminecraft:all:2.3.4"
|
2023-05-31 22:12:27 +02:00
|
|
|
include("net.raphimc:MinecraftAuth:2.1.4-SNAPSHOT") {
|
2023-01-05 22:42:15 +01:00
|
|
|
exclude group: "com.google.code.gson", module: "gson"
|
|
|
|
exclude group: "org.slf4j", module: "slf4j-api"
|
|
|
|
}
|
2023-05-17 18:08:31 +02:00
|
|
|
include("net.raphimc.javadowngrader:core:1.0.0-SNAPSHOT") {
|
|
|
|
exclude group: "org.slf4j", module: "slf4j-api"
|
|
|
|
exclude group: "org.ow2.asm", module: "asm-commons"
|
|
|
|
}
|
2023-04-02 21:25:27 +02:00
|
|
|
include("org.cloudburstmc.netty:netty-transport-raknet:1.0.0.CR1-SNAPSHOT") {
|
|
|
|
exclude group: "io.netty", module: "netty-common"
|
|
|
|
exclude group: "io.netty", module: "netty-buffer"
|
|
|
|
exclude group: "io.netty", module: "netty-codec"
|
|
|
|
exclude group: "io.netty", module: "netty-transport"
|
|
|
|
}
|
2023-01-04 20:58:09 +01:00
|
|
|
}
|
|
|
|
|
2023-01-04 21:54:49 +01:00
|
|
|
blossom {
|
|
|
|
replaceToken("\${version}", project.version, "src/main/java/net/raphimc/viaproxy/ViaProxy.java")
|
|
|
|
}
|
|
|
|
|
2023-02-23 20:35:02 +01:00
|
|
|
java {
|
|
|
|
withSourcesJar()
|
|
|
|
}
|
|
|
|
|
2023-01-04 20:58:09 +01:00
|
|
|
jar {
|
|
|
|
dependsOn configurations.include
|
|
|
|
from {
|
|
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
|
|
configurations.include.collect {
|
|
|
|
zipTree(it)
|
|
|
|
}
|
|
|
|
} {
|
|
|
|
exclude "META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA"
|
|
|
|
}
|
|
|
|
|
|
|
|
manifest {
|
|
|
|
attributes(
|
|
|
|
"Main-Class": "net.raphimc.viaproxy.ViaProxy",
|
2023-01-19 18:57:38 +01:00
|
|
|
"Multi-Release": "true",
|
|
|
|
"Launcher-Agent-Class": "net.raphimc.viaproxy.ViaProxy"
|
2023-01-04 20:58:09 +01:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
from("LICENSE") {
|
|
|
|
rename { "${it}_${project.archivesBaseName}" }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
repositories {
|
|
|
|
maven {
|
2023-05-28 18:02:09 +02:00
|
|
|
name = "Via"
|
2023-05-28 18:00:36 +02:00
|
|
|
url = "https://repo.viaversion.com/"
|
2023-01-04 20:58:09 +01:00
|
|
|
credentials(PasswordCredentials)
|
|
|
|
authentication {
|
|
|
|
basic(BasicAuthentication)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
publications {
|
|
|
|
maven(MavenPublication) {
|
|
|
|
groupId = project.maven_group
|
|
|
|
artifactId = project.maven_name
|
|
|
|
version = project.maven_version
|
|
|
|
|
|
|
|
from components.java
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|