3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 16:40:10 +01:00
Dieser Commit ist enthalten in:
Jason 2021-02-24 03:04:31 -08:00 committet von KennyTV
Ursprung e437c656c5
Commit 46a01cb0f0
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
3 geänderte Dateien mit 35 neuen und 32 gelöschten Zeilen

Datei anzeigen

@ -1,11 +1,8 @@
import net.kyori.indra.IndraPlugin import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
import net.kyori.indra.IndraPublishingPlugin
import net.kyori.indra.sonatypeSnapshots
plugins { plugins {
`java-library` `java-library`
`maven-publish` `maven-publish`
id("net.kyori.indra")
} }
group = "us.myles" group = "us.myles"
@ -15,8 +12,6 @@ description = "Allow newer clients to join older server versions."
subprojects { subprojects {
apply<JavaLibraryPlugin>() apply<JavaLibraryPlugin>()
apply<MavenPublishPlugin>() apply<MavenPublishPlugin>()
apply<IndraPlugin>()
apply<IndraPublishingPlugin>()
tasks { tasks {
// Variable replacements // Variable replacements
@ -25,7 +20,11 @@ subprojects {
expand("version" to project.version, "description" to project.description) expand("version" to project.version, "description" to project.description)
} }
} }
withType<Javadoc> {
options.encoding = Charsets.UTF_8.name()
}
withType<JavaCompile> { withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
options.compilerArgs.addAll(listOf("-nowarn", "-Xlint:-unchecked", "-Xlint:-deprecation")) options.compilerArgs.addAll(listOf("-nowarn", "-Xlint:-unchecked", "-Xlint:-deprecation"))
} }
} }
@ -40,9 +39,12 @@ subprojects {
if (platforms.contains(project.name)) { if (platforms.contains(project.name)) {
configureShadowJar() configureShadowJar()
} }
if (project.name == "viaversion") {
apply<ShadowPlugin>()
}
repositories { repositories {
sonatypeSnapshots() maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots") maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots")
maven("https://nexus.velocitypowered.com/repository/velocity-artifacts-snapshots/") maven("https://nexus.velocitypowered.com/repository/velocity-artifacts-snapshots/")
maven("https://repo.spongepowered.org/maven") maven("https://repo.spongepowered.org/maven")
@ -58,18 +60,28 @@ subprojects {
testImplementation("org.junit.jupiter", "junit-jupiter-engine", Versions.jUnit) testImplementation("org.junit.jupiter", "junit-jupiter-engine", Versions.jUnit)
} }
indra { java {
javaVersions { sourceCompatibility = JavaVersion.VERSION_1_8
target.set(8) targetCompatibility = JavaVersion.VERSION_1_8
testWith(8, 11, 15) withSourcesJar()
} withJavadocJar()
github("ViaVersion", "ViaVersion") {
issues = true
}
mitLicense()
} }
publishing.repositories.maven { publishing {
publications {
create<MavenPublication>("mavenJava") {
groupId = rootProject.group as String
artifactId = project.name
version = rootProject.version as String
if (plugins.hasPlugin(ShadowPlugin::class.java)) {
artifact(tasks["shadowJar"])
} else {
from(components["java"])
}
}
}
repositories.maven {
name = "Via" name = "Via"
url = uri("https://repo.viaversion.com/") url = uri("https://repo.viaversion.com/")
credentials(PasswordCredentials::class) credentials(PasswordCredentials::class)
@ -77,6 +89,7 @@ subprojects {
create<BasicAuthentication>("basic") create<BasicAuthentication>("basic")
} }
} }
}
} }
tasks { tasks {

Datei anzeigen

@ -7,7 +7,5 @@ repositories {
} }
dependencies { dependencies {
implementation("net.kyori", "indra-common", "1.3.1")
implementation("net.kyori", "indra-publishing-gradle-plugin", "1.3.1")
implementation("com.github.jengelman.gradle.plugins", "shadow", "6.1.0") implementation("com.github.jengelman.gradle.plugins", "shadow", "6.1.0")
} }

Datei anzeigen

@ -1,8 +1,5 @@
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
apply<ShadowPlugin>()
tasks { tasks {
withType<ShadowJar> { withType<ShadowJar> {
archiveClassifier.set("") archiveClassifier.set("")
@ -25,9 +22,4 @@ tasks {
build { build {
dependsOn(withType<ShadowJar>()) dependsOn(withType<ShadowJar>())
} }
withType<Jar> {
if (name == "jar") {
archiveClassifier.set("unshaded")
}
}
} }