mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-11-27 09:55:51 -05:00
175 lines
5.2 KiB
Groovy
175 lines
5.2 KiB
Groovy
plugins {
|
|
id "java"
|
|
id "maven-publish"
|
|
id "net.kyori.blossom" version "1.3.1"
|
|
}
|
|
|
|
sourceSets {
|
|
java17compat
|
|
}
|
|
|
|
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
|
[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"
|
|
|
|
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"
|
|
}
|
|
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/"
|
|
}
|
|
maven {
|
|
name = "ViaVersion"
|
|
url "https://repo.viaversion.com"
|
|
}
|
|
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"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly sourceSets.java17compat.output
|
|
|
|
include "com.viaversion:viaversion:4.7.0-1.20-pre1-SNAPSHOT"
|
|
include("com.viaversion:viabackwards-common:4.7.0-1.20-pre1-SNAPSHOT") {
|
|
exclude group: "com.viaversion", module: "viaversion"
|
|
exclude group: "io.netty", module: "netty-all"
|
|
exclude group: "com.google.guava", module: "guava"
|
|
}
|
|
include "com.viaversion:viarewind-core:2.0.4-SNAPSHOT"
|
|
include "net.raphimc:ViaLegacy:2.2.16"
|
|
include "net.raphimc:ViaAprilFools:2.0.6"
|
|
include("net.raphimc:ViaBedrock:0.0.1-SNAPSHOT") {
|
|
exclude group: "io.netty", module: "netty-codec-http"
|
|
exclude group: "com.vdurmont", module: "semver4j"
|
|
exclude group: "io.jsonwebtoken", module: "jjwt-impl"
|
|
exclude group: "io.jsonwebtoken", module: "jjwt-gson"
|
|
}
|
|
include("net.raphimc:ViaProtocolHack:2.2.4") {
|
|
exclude group: "org.slf4j", module: "slf4j-api"
|
|
exclude group: "org.yaml", module: "snakeyaml"
|
|
}
|
|
include "org.yaml:snakeyaml:1.33" // Geyser does not run with 2.0
|
|
|
|
include "com.google.code.gson:gson:2.10.1"
|
|
include "com.formdev:flatlaf:3.1.1"
|
|
include "com.google.guava:guava:31.1-jre"
|
|
include "org.apache.commons:commons-lang3:3.12.0"
|
|
include "commons-io:commons-io:2.11.0"
|
|
include "net.sf.jopt-simple:jopt-simple:5.0.4"
|
|
include "org.apache.logging.log4j:log4j-core:2.20.0"
|
|
include "org.apache.logging.log4j:log4j-slf4j-impl:2.20.0"
|
|
include "com/mojang:authlib:3.16.29"
|
|
include "net.lenni0451.classtransform:mixinstranslator:1.9.0-SNAPSHOT"
|
|
include "net.lenni0451.classtransform:mixinsdummy:1.9.0-SNAPSHOT"
|
|
include "net.lenni0451.classtransform:additionalclassprovider:1.9.0-SNAPSHOT"
|
|
include "net.lenni0451:Reflect:1.1.0"
|
|
include "net.lenni0451:LambdaEvents:2.0.3"
|
|
include "net.raphimc.netminecraft:all:2.3.3"
|
|
include("net.raphimc:MinecraftAuth:2.1.1") {
|
|
exclude group: "com.google.code.gson", module: "gson"
|
|
exclude group: "org.slf4j", module: "slf4j-api"
|
|
}
|
|
include "com.vdurmont:semver4j:3.1.0"
|
|
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"
|
|
}
|
|
}
|
|
|
|
blossom {
|
|
replaceToken("\${version}", project.version, "src/main/java/net/raphimc/viaproxy/ViaProxy.java")
|
|
}
|
|
|
|
java {
|
|
withSourcesJar()
|
|
}
|
|
|
|
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",
|
|
"Multi-Release": "true",
|
|
"Launcher-Agent-Class": "net.raphimc.viaproxy.ViaProxy"
|
|
)
|
|
}
|
|
|
|
from("LICENSE") {
|
|
rename { "${it}_${project.archivesBaseName}" }
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
name = "reposilite"
|
|
url = "https://maven.lenni0451.net/releases"
|
|
credentials(PasswordCredentials)
|
|
authentication {
|
|
basic(BasicAuthentication)
|
|
}
|
|
}
|
|
}
|
|
publications {
|
|
maven(MavenPublication) {
|
|
groupId = project.maven_group
|
|
artifactId = project.maven_name
|
|
version = project.maven_version
|
|
|
|
from components.java
|
|
}
|
|
}
|
|
}
|