2023-09-04 13:36:24 -04:00
|
|
|
import net.raphimc.javadowngrader.gradle.task.DowngradeJarTask
|
|
|
|
|
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
name = "Lenni0451 Releases"
|
|
|
|
url "https://maven.lenni0451.net/releases"
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
name = "Lenni0451 Snapshots"
|
|
|
|
url "https://maven.lenni0451.net/snapshots"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
classpath "net.raphimc.javadowngrader:gradle-plugin:1.0.0"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-04 14:58:09 -05:00
|
|
|
plugins {
|
|
|
|
id "java"
|
2023-06-30 18:57:19 -04:00
|
|
|
id "application"
|
2023-01-04 14:58:09 -05:00
|
|
|
id "maven-publish"
|
2023-09-04 13:36:24 -04:00
|
|
|
id "net.kyori.blossom" version "1.3.1"
|
2023-01-04 14:58:09 -05:00
|
|
|
}
|
|
|
|
|
2023-09-04 13:36:24 -04:00
|
|
|
base {
|
|
|
|
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
|
|
|
compileJava.options.encoding = compileTestJava.options.encoding = javadoc.options.encoding = "UTF-8"
|
2023-01-12 12:48:45 -05:00
|
|
|
|
2023-09-04 13:36:24 -04:00
|
|
|
group = project.maven_group ?: rootProject.maven_group
|
|
|
|
archivesName = project.maven_name ?: rootProject.maven_name
|
|
|
|
version = project.maven_version ?: rootProject.maven_version
|
2023-01-12 12:48:45 -05:00
|
|
|
}
|
2023-01-04 14:58:09 -05:00
|
|
|
|
|
|
|
configurations {
|
|
|
|
include
|
|
|
|
|
|
|
|
implementation.extendsFrom include
|
|
|
|
api.extendsFrom include
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
maven {
|
|
|
|
name = "Jitpack"
|
|
|
|
url = "https://jitpack.io"
|
|
|
|
}
|
|
|
|
maven {
|
2023-09-04 13:36:24 -04:00
|
|
|
name = "Lenni0451 Releases"
|
2023-01-04 14:58:09 -05:00
|
|
|
url "https://maven.lenni0451.net/releases"
|
|
|
|
}
|
2023-04-02 15:25:27 -04: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 14:58:09 -05:00
|
|
|
maven {
|
|
|
|
name = "ViaVersion"
|
|
|
|
url "https://repo.viaversion.com"
|
|
|
|
}
|
2023-07-16 10:55:14 -04:00
|
|
|
maven {
|
|
|
|
name = "Minecraft Libraries"
|
|
|
|
url "https://libraries.minecraft.net"
|
|
|
|
}
|
2023-01-04 14:58:09 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2023-08-30 13:34:54 -04:00
|
|
|
include "com.viaversion:viaversion:4.8.0-23w35a-SNAPSHOT"
|
|
|
|
include("com.viaversion:viabackwards-common:4.8.0-23w35a-SNAPSHOT") {
|
2023-01-04 14:58:09 -05:00
|
|
|
exclude group: "com.viaversion", module: "viaversion"
|
|
|
|
exclude group: "io.netty", module: "netty-all"
|
|
|
|
exclude group: "com.google.guava", module: "guava"
|
|
|
|
}
|
2023-08-15 15:22:18 -04:00
|
|
|
include "com.viaversion:viarewind-core:3.0.0-SNAPSHOT"
|
|
|
|
include "net.raphimc:ViaLegacy:2.2.19-SNAPSHOT"
|
|
|
|
include "net.raphimc:ViaAprilFools:2.0.9-SNAPSHOT"
|
2023-06-08 08:07:59 -04:00
|
|
|
include("net.raphimc:ViaBedrock:0.0.2-SNAPSHOT") {
|
2023-04-02 15:25:27 -04:00
|
|
|
exclude group: "io.netty", module: "netty-codec-http"
|
|
|
|
exclude group: "io.jsonwebtoken", module: "jjwt-impl"
|
|
|
|
exclude group: "io.jsonwebtoken", module: "jjwt-gson"
|
|
|
|
}
|
2023-08-15 15:22:18 -04:00
|
|
|
include("net.raphimc:ViaLoader:2.2.9-SNAPSHOT") {
|
2023-01-04 14:58:09 -05:00
|
|
|
exclude group: "org.slf4j", module: "slf4j-api"
|
|
|
|
}
|
|
|
|
|
2023-01-08 23:26:55 -05:00
|
|
|
include "com.google.code.gson:gson:2.10.1"
|
2023-08-11 00:55:23 -04:00
|
|
|
include "com.formdev:flatlaf:3.2"
|
2023-08-01 00:47:13 -04:00
|
|
|
include "com.google.guava:guava:32.1.2-jre"
|
2023-07-28 00:16:36 -04:00
|
|
|
include "org.apache.commons:commons-lang3:3.13.0"
|
2023-06-08 01:18:49 -04:00
|
|
|
include "commons-io:commons-io:2.13.0"
|
2023-01-04 14:58:09 -05:00
|
|
|
include "net.sf.jopt-simple:jopt-simple:5.0.4"
|
2023-02-24 00:05:30 -05:00
|
|
|
include "org.apache.logging.log4j:log4j-core:2.20.0"
|
2023-02-24 02:39:34 -05:00
|
|
|
include "org.apache.logging.log4j:log4j-slf4j-impl:2.20.0"
|
2023-09-04 13:36:24 -04:00
|
|
|
include("com.mojang:authlib:3.16.29") {
|
|
|
|
exclude group: "org.slf4j", module: "slf4j-api"
|
|
|
|
}
|
|
|
|
include "net.lenni0451.classtransform:mixinstranslator:1.11.0-SNAPSHOT"
|
|
|
|
include "net.lenni0451.classtransform:mixinsdummy:1.11.0-SNAPSHOT"
|
|
|
|
include "net.lenni0451.classtransform:additionalclassprovider:1.11.0-SNAPSHOT"
|
2023-08-17 00:13:37 -04:00
|
|
|
include "net.lenni0451:Reflect:1.2.4"
|
2023-08-07 00:16:15 -04:00
|
|
|
include "net.lenni0451:LambdaEvents:2.2.0"
|
2023-08-15 15:22:18 -04:00
|
|
|
include "net.raphimc.netminecraft:all:2.3.6-SNAPSHOT"
|
2023-08-23 15:27:52 -04:00
|
|
|
include("net.raphimc:MinecraftAuth:2.1.6-SNAPSHOT") {
|
2023-01-05 16:42:15 -05:00
|
|
|
exclude group: "com.google.code.gson", module: "gson"
|
|
|
|
exclude group: "org.slf4j", module: "slf4j-api"
|
|
|
|
}
|
2023-09-04 13:36:24 -04:00
|
|
|
include("net.raphimc.javadowngrader:impl-classtransform:1.0.0") {
|
2023-05-17 12:08:31 -04:00
|
|
|
exclude group: "org.ow2.asm", module: "asm-commons"
|
2023-09-04 13:36:24 -04:00
|
|
|
exclude group: "net.lenni0451.classtransform", module: "core"
|
2023-05-17 12:08:31 -04:00
|
|
|
}
|
2023-04-02 15:25:27 -04: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-06-14 10:04:28 -04:00
|
|
|
include "gs.mclo:api:3.0.1"
|
2023-01-04 14:58:09 -05:00
|
|
|
}
|
|
|
|
|
2023-01-04 15:54:49 -05:00
|
|
|
blossom {
|
|
|
|
replaceToken("\${version}", project.version, "src/main/java/net/raphimc/viaproxy/ViaProxy.java")
|
|
|
|
}
|
|
|
|
|
2023-02-23 14:35:02 -05:00
|
|
|
java {
|
|
|
|
withSourcesJar()
|
|
|
|
}
|
|
|
|
|
2023-06-30 18:57:19 -04:00
|
|
|
application {
|
|
|
|
mainClass = "net.raphimc.viaproxy.ViaProxy"
|
|
|
|
}
|
|
|
|
|
2023-01-04 14:58:09 -05: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(
|
2023-06-30 18:57:19 -04:00
|
|
|
"Main-Class": application.mainClass,
|
2023-01-19 12:57:38 -05:00
|
|
|
"Multi-Release": "true",
|
2023-09-04 13:36:24 -04:00
|
|
|
"Launcher-Agent-Class": application.mainClass
|
2023-01-04 14:58:09 -05:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
from("LICENSE") {
|
2023-09-04 13:36:24 -04:00
|
|
|
rename { "${it}_${project.name ?: rootProject.name}" }
|
2023-01-04 14:58:09 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
repositories {
|
|
|
|
maven {
|
2023-05-28 12:02:09 -04:00
|
|
|
name = "Via"
|
2023-05-28 12:00:36 -04:00
|
|
|
url = "https://repo.viaversion.com/"
|
2023-06-30 17:49:19 -04:00
|
|
|
|
2023-01-04 14:58:09 -05:00
|
|
|
credentials(PasswordCredentials)
|
|
|
|
authentication {
|
|
|
|
basic(BasicAuthentication)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
publications {
|
|
|
|
maven(MavenPublication) {
|
|
|
|
groupId = project.maven_group
|
|
|
|
artifactId = project.maven_name
|
|
|
|
version = project.maven_version
|
|
|
|
|
|
|
|
from components.java
|
2023-06-30 17:49:19 -04:00
|
|
|
|
|
|
|
pom {
|
|
|
|
name = "ViaProxy"
|
|
|
|
description = "Standalone proxy which allows players to join EVERY Minecraft server version (Classic, Alpha, Beta, Release, Bedrock)"
|
|
|
|
url = "https://github.com/ViaVersion/ViaProxy"
|
|
|
|
licenses {
|
|
|
|
license {
|
|
|
|
name = "GPL-3.0 License"
|
|
|
|
url = "https://github.com/ViaVersion/ViaProxy/blob/main/LICENSE"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
developers {
|
|
|
|
developer {
|
|
|
|
id = "RK_01"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
scm {
|
|
|
|
connection = "scm:git:git://github.com/ViaVersion/ViaProxy.git"
|
|
|
|
developerConnection = "scm:git:ssh://github.com/ViaVersion/ViaProxy.git"
|
|
|
|
url = "https://github.com/ViaVersion/ViaProxy.git"
|
|
|
|
}
|
|
|
|
}
|
2023-01-04 14:58:09 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-09-04 13:36:24 -04:00
|
|
|
|
|
|
|
tasks.register("java8Jar", DowngradeJarTask) {
|
|
|
|
input = tasks.jar.archiveFile.get().asFile
|
|
|
|
outputSuffix = "+java8"
|
|
|
|
compileClassPath = sourceSets.main.compileClasspath
|
|
|
|
copyRuntimeClasses = false
|
|
|
|
}.get().dependsOn("build")
|
|
|
|
build.finalizedBy("java8Jar")
|