2023-01-04 14:58:09 -05:00
|
|
|
plugins {
|
|
|
|
id "java"
|
|
|
|
id "maven-publish"
|
2023-01-04 15:54:49 -05:00
|
|
|
id "net.kyori.blossom" version "1.3.1"
|
2023-01-04 14:58:09 -05:00
|
|
|
}
|
|
|
|
|
2023-01-12 12:48:45 -05:00
|
|
|
sourceSets {
|
|
|
|
java17compat
|
|
|
|
}
|
|
|
|
|
2023-01-11 14:02:03 -05:00
|
|
|
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
2023-01-12 12:48:45 -05: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 14:58:09 -05: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"
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
name = "ViaVersion"
|
|
|
|
url "https://repo.viaversion.com"
|
|
|
|
}
|
2023-01-11 14:02:03 -05: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 14:58:09 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2023-01-12 12:48:45 -05:00
|
|
|
compileOnly sourceSets.java17compat.output
|
|
|
|
|
2023-02-22 13:16:49 -05:00
|
|
|
include "com.viaversion:viaversion:4.6.0-1.19.4-pre1-SNAPSHOT"
|
|
|
|
include("com.viaversion:viabackwards-common:4.6.0-1.19.4-pre1-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"
|
|
|
|
}
|
|
|
|
include "com.viaversion:viarewind-core:2.0.3-SNAPSHOT"
|
2023-02-21 15:55:37 -05:00
|
|
|
include "net.raphimc:ViaLegacy:2.2.7"
|
2023-02-17 19:32:57 -05:00
|
|
|
include "net.raphimc:ViaAprilFools:2.0.4"
|
2023-02-20 09:38:52 -05:00
|
|
|
include("net.raphimc:ViaProtocolHack:2.1.4") {
|
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-01-04 14:58:09 -05:00
|
|
|
include "com.formdev:flatlaf:3.0"
|
|
|
|
include "com.google.guava:guava:31.1-jre"
|
2023-01-11 14:02:03 -05:00
|
|
|
include "org.apache.commons:commons-lang3:3.12.0"
|
|
|
|
include "commons-io:commons-io:2.11.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-01-11 14:02:03 -05:00
|
|
|
include "com/mojang:authlib:3.16.29"
|
2023-01-19 23:13:51 -05:00
|
|
|
include "net.lenni0451.classtransform:mixinstranslator:1.8.3"
|
2023-01-20 11:45:23 -05:00
|
|
|
include "net.lenni0451.classtransform:mixinsdummy:1.8.3"
|
2023-01-19 23:13:58 -05:00
|
|
|
include "net.lenni0451.classtransform:additionalclassprovider:1.8.3"
|
2023-01-04 14:58:09 -05:00
|
|
|
include "net.lenni0451:Reflect:1.0.2"
|
|
|
|
include "net.lenni0451:LambdaEvents:2.0.3"
|
2023-01-29 16:23:14 -05:00
|
|
|
include "net.raphimc.netminecraft:all:2.3.1"
|
2023-01-05 16:42:15 -05:00
|
|
|
include("net.raphimc:MinecraftAuth:2.0.1") {
|
|
|
|
exclude group: "com.google.code.gson", module: "gson"
|
|
|
|
exclude group: "org.slf4j", module: "slf4j-api"
|
|
|
|
}
|
2023-02-05 23:35:00 -05:00
|
|
|
include("net.lenni0451.mcstructs:all:2.2.0") {
|
2023-01-14 14:28:41 -05:00
|
|
|
exclude group: "com.google.code.gson", module: "gson"
|
|
|
|
}
|
2023-01-30 12:31:44 -05:00
|
|
|
include "com.vdurmont:semver4j:3.1.0"
|
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-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(
|
|
|
|
"Main-Class": "net.raphimc.viaproxy.ViaProxy",
|
2023-01-19 12:57:38 -05:00
|
|
|
"Multi-Release": "true",
|
|
|
|
"Launcher-Agent-Class": "net.raphimc.viaproxy.ViaProxy"
|
2023-01-04 14:58:09 -05:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|