mirror of
https://github.com/GeyserMC/Floodgate.git
synced 2025-12-28 11:09:13 +00:00
Apply additional Gradle changes from Konica
This commit is contained in:
28
build.gradle
28
build.gradle
@@ -2,7 +2,7 @@ import net.fabricmc.loom.task.RemapJarTask
|
||||
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
||||
id 'fabric-loom' version '0.12-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.0-SNAPSHOT'
|
||||
id 'java'
|
||||
id 'maven-publish'
|
||||
}
|
||||
@@ -94,16 +94,21 @@ tasks.withType(JavaCompile) {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
// if it is present.
|
||||
// If you remove this task, sources will not be generated.
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = "sources"
|
||||
from sourceSets.main.allSource
|
||||
java {
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
// if it is present.
|
||||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
configurations = [project.configurations.shadow]
|
||||
relocate("org.bstats", "org.geysermc.floodgate.shadow.org.bstats")
|
||||
|
||||
exclude {
|
||||
FileTreeElement e ->
|
||||
e.name.startsWith("com.google") && !e.name.startsWith("com.google.inject") // Guava and Gson
|
||||
}
|
||||
}
|
||||
|
||||
task remappedShadowJar(type: RemapJarTask) {
|
||||
@@ -124,19 +129,12 @@ artifacts {
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
// add all the jars that should be included when publishing to maven
|
||||
artifact(remapJar) {
|
||||
builtBy remapJar
|
||||
}
|
||||
artifact(sourcesJar) {
|
||||
builtBy remapSourcesJar
|
||||
}
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
|
||||
// select the repositories you want to publish to
|
||||
repositories {
|
||||
// uncomment to publish to the local maven
|
||||
mavenLocal()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user