2024-02-11 17:51:48 +01:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
|
|
|
id 'xyz.wagyourtail.unimined' version '1.1.1-SNAPSHOT'
|
|
|
|
id "maven-publish"
|
|
|
|
}
|
|
|
|
|
|
|
|
group project.maven_group
|
|
|
|
version project.version
|
|
|
|
|
|
|
|
base {
|
|
|
|
archivesName = project.archives_base_name
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
name = "wagyourtail releases"
|
|
|
|
url = "https://maven.wagyourtail.xyz/releases"
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
name = "sponge"
|
|
|
|
url = "https://repo.spongepowered.org/repository/maven-public/"
|
|
|
|
}
|
|
|
|
maven { url 'https://jitpack.io' }
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
unimined.minecraft {
|
|
|
|
version project.minecraft_version
|
|
|
|
|
|
|
|
mappings {
|
|
|
|
if (Boolean.parseBoolean(project.use_yarn)) {
|
|
|
|
legacyYarn(project.yarn_build)
|
|
|
|
} else {
|
|
|
|
if (Boolean.parseBoolean(project.use_mcp_from_forge)) {
|
|
|
|
forgeBuiltinMCP(project.forge_version)
|
|
|
|
} else {
|
|
|
|
searge()
|
|
|
|
mcp(project.mcp_channel, project.mcp_version + "-" + project.minecraft_version)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
minecraftRemapper.config {
|
|
|
|
if (!Boolean.parseBoolean(project.use_yarn)) {
|
|
|
|
ignoreFieldDesc(true)
|
|
|
|
}
|
|
|
|
|
|
|
|
ignoreConflicts(true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
processResources {
|
|
|
|
inputs.property "version", project.version
|
|
|
|
}
|
|
|
|
|
2024-02-11 18:21:04 +01:00
|
|
|
configurations {
|
|
|
|
embed
|
|
|
|
implementation.extendsFrom(embed)
|
|
|
|
}
|
|
|
|
|
2024-02-11 17:51:48 +01:00
|
|
|
dependencies {
|
2024-02-11 18:21:04 +01:00
|
|
|
embed("com.github.heni123321:LegacyLauncher:ac106bbe00") {
|
2024-02-11 17:51:48 +01:00
|
|
|
transitive = false
|
|
|
|
}
|
2024-02-11 18:21:04 +01:00
|
|
|
embed("org.spongepowered:mixin:0.7.11-SNAPSHOT") {
|
|
|
|
exclude module: 'launchwrapper'
|
|
|
|
exclude module: 'guava'
|
|
|
|
exclude module: 'gson'
|
|
|
|
exclude module: 'commons-io'
|
|
|
|
}
|
|
|
|
implementation fileTree(dir: 'lib', include: ['*.jar'])
|
2024-02-11 17:51:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
|
|
|
|
withSourcesJar()
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
from("LICENSE") {
|
|
|
|
rename { "${it}_${base.archivesName.get()}" }
|
|
|
|
}
|
2024-02-11 18:21:04 +01:00
|
|
|
from {
|
|
|
|
configurations.embed.collect {
|
|
|
|
it.isDirectory() ? it : zipTree(it)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
manifest.attributes(
|
|
|
|
"MixinConfigs": 'mixins.SilentClient.json',
|
|
|
|
"TweakClass": "net.silentclient.client.mixin.SilentClientTweaker",
|
|
|
|
"TweakOrder": 0,
|
|
|
|
"Manifest-Version": 1.0
|
|
|
|
)
|
|
|
|
configurations.embed.each { dep ->
|
|
|
|
from(project.zipTree(dep)) {
|
|
|
|
exclude 'META-INF', 'META-INF/**'
|
|
|
|
}
|
|
|
|
}
|
2024-02-11 17:51:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
|
|
// Ensure that the encoding is set to UTF-8, no matter what the system default is
|
|
|
|
// this fixes some edge cases with special characters not displaying correctly
|
|
|
|
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
|
|
|
|
it.options.encoding = "UTF-8"
|
|
|
|
|
|
|
|
if (JavaVersion.current().isJava9Compatible()) {
|
|
|
|
it.options.release = 8
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Configure the maven publication
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
from components.java
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Select the repositories you want to publish to
|
|
|
|
repositories {
|
|
|
|
// Uncomment to publish to the local maven
|
|
|
|
// mavenLocal()
|
|
|
|
}
|
|
|
|
}
|