first commit

This commit is contained in:
Soph :3 2026-02-07 19:52:16 +02:00
commit 42b928f6e1
234 changed files with 27908 additions and 0 deletions

View file

@ -0,0 +1,7 @@
plugins {
id "groovy-gradle-plugin"
}
repositories {
gradlePluginPortal()
}

View file

@ -0,0 +1,15 @@
plugins {
id "application"
id "base.include-in-jar-configuration"
id "base.exclude-run-folder"
}
jar {
manifest {
attributes(
"Main-Class": application.mainClass,
"Multi-Release": "true",
"Enable-Native-Access": "ALL-UNNAMED"
)
}
}

View file

@ -0,0 +1,34 @@
base {
java.toolchain.languageVersion = JavaLanguageVersion.of(project.java_version)
group = project.maven_group
archivesName = project.name
version = project.maven_version
}
repositories {
mavenCentral()
}
jar {
if (layout.projectDirectory.file("LICENSE").asFile.exists()) {
def projectName = project.name
from(layout.projectDirectory.file("LICENSE")) {
rename { "${it}_${projectName}" }
}
} else if (rootProject.layout.projectDirectory.file("LICENSE").asFile.exists()) {
def projectName = rootProject.name
from(rootProject.layout.projectDirectory.file("LICENSE")) {
rename { "${it}_${projectName}" }
}
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
}
tasks.withType(Javadoc).configureEach {
it.options.encoding = "UTF-8"
it.options.addStringOption("Xdoclint:none", "-quiet")
}

View file

@ -0,0 +1,11 @@
plugins {
id "idea"
}
idea {
module {
["run"].each {
excludeDirs << layout.projectDirectory.file("$it").asFile
}
}
}

View file

@ -0,0 +1,16 @@
plugins {
id "net.raphimc.class-token-replacer"
}
sourceSets.configureEach {
it.classTokenReplacer {
property("\${version}", project.version)
property("\${commit_hash}", latestCommitHash().get())
}
}
Provider<String> latestCommitHash() {
return providers.exec {
commandLine = ["git", "rev-parse", "--short", "HEAD"]
}.standardOutput.getAsText().map(String::trim)
}

View file

@ -0,0 +1,17 @@
configurations {
includeInJar
implementation.extendsFrom(includeInJar)
}
jar {
dependsOn(configurations.includeInJar)
from {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
configurations.includeInJar.collect {
zipTree(it)
}
} {
exclude("META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA")
}
}

View file

@ -0,0 +1,30 @@
plugins {
id "maven-publish"
id "signing"
}
java {
withSourcesJar()
withJavadocJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
from(components.java)
groupId = project.maven_group
artifactId = project.maven_name
version = project.maven_version
}
}
}
signing {
setRequired(false)
sign(publishing.publications.mavenJava)
}
tasks.withType(PublishToMavenRepository).configureEach {
it.dependsOn(tasks.withType(Sign))
}

View file

@ -0,0 +1,13 @@
publishing {
repositories {
maven {
name = "Via"
url = "https://repo.viaversion.com/"
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}
}

View file

@ -0,0 +1,32 @@
plugins {
id "base.publishing-conventions"
id "via.viaversion-maven-publishing"
}
publishing {
publications {
mavenJava {
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"
}
}
}
}
}