3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-25 07:40:08 +01:00

Update build scripts

Dieser Commit ist enthalten in:
KennyTV 2021-02-23 11:29:18 +01:00
Ursprung 3fc2a3e395
Commit 99e2297d67
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
6 geänderte Dateien mit 36 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -50,6 +50,7 @@ subprojects {
maven("https://repo.spongepowered.org/maven")
maven("https://repo.viaversion.com")
maven("https://repo.maven.apache.org/maven2/")
mavenLocal()
}
indra {
@ -62,6 +63,15 @@ subprojects {
}
mitLicense()
}
publishing.repositories.maven {
name = "Via"
url = uri("https://repo.viaversion.com/")
credentials(PasswordCredentials::class)
authentication {
create<BasicAuthentication>("basic")
}
}
}
tasks {

Datei anzeigen

@ -6,6 +6,8 @@ object Versions {
const val netty = "4.0.20.Final"
const val gson = "2.8.6"
const val jetbrainsAnnotations = "19.0.0"
const val log4j = "2.8.1"
const val fabricLoader = "0.4.8+build.154"
// Platforms
const val spigot = "1.16.5-R0.1-SNAPSHOT"

Datei anzeigen

@ -1,6 +1,7 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
import org.gradle.api.Project
import org.gradle.jvm.tasks.Jar
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.invoke
import org.gradle.kotlin.dsl.withType
@ -18,6 +19,11 @@ fun Project.configureShadowJar() {
getByName("build") {
dependsOn(withType<ShadowJar>())
}
withType<Jar> {
if (name == "jar") {
archiveClassifier.set("unshaded")
}
}
}
}

Datei anzeigen

@ -1,5 +1,5 @@
dependencies {
implementation(project(":viabackwards-common"))
compileOnly("net.fabricmc", "fabric-loader", "0.4.8+build.154")
compileOnly("org.apache.logging.log4j", "log4j-api", "2.8.1")
compileOnly("net.fabricmc", "fabric-loader", Versions.fabricLoader)
compileOnly("org.apache.logging.log4j", "log4j-api", Versions.log4j)
}

Datei anzeigen

@ -6,7 +6,10 @@ setupViaSubproject("bungee")
setupViaSubproject("velocity")
setupViaSubproject("sponge")
setupViaSubproject("fabric")
setupViaSubproject("universal")
setupSubproject("viabackwards") {
projectDir = file("universal")
}
fun setupViaSubproject(name: String) {
setupSubproject("viabackwards-$name") {

Datei anzeigen

@ -1,6 +1,10 @@
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
apply<ShadowPlugin>()
tasks {
val universalJar = register<Jar>("universalJar") {
artifacts.add("archives", this)
withType<ShadowJar> {
archiveClassifier.set("")
archiveFileName.set("ViaBackwards-${project.version}.jar")
destinationDirectory.set(rootProject.projectDir.resolve("build/libs"))
@ -19,6 +23,11 @@ tasks {
}
}
build {
dependsOn(universalJar)
dependsOn(withType<ShadowJar>())
}
withType<Jar> {
if (name == "jar") {
archiveClassifier.set("unshaded")
}
}
}