mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 10:11:33 +01:00
80 lines
2.0 KiB
Groovy
80 lines
2.0 KiB
Groovy
|
plugins {
|
||
|
id "fabric-loom" version "1.4-SNAPSHOT"
|
||
|
id "legacy-looming" version "1.4-SNAPSHOT" // Version must be the same as fabric-loom's
|
||
|
id "maven-publish"
|
||
|
}
|
||
|
|
||
|
base.archivesName = project.archives_base_name
|
||
|
version = project.mod_version
|
||
|
group = project.maven_group
|
||
|
|
||
|
repositories {
|
||
|
maven {
|
||
|
name = "cursed-mappings"
|
||
|
url = "https://raw.githubusercontent.com/BleachDev/cursed-mappings/main/"
|
||
|
}
|
||
|
}
|
||
|
|
||
|
loom {
|
||
|
accessWidenerPath = file("src/main/resources/silentclient.accesswidener")
|
||
|
}
|
||
|
|
||
|
dependencies {
|
||
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||
|
mappings(legacy.yarn(project.minecraft_version, project.yarn_build))
|
||
|
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||
|
modImplementation "net.legacyfabric.legacy-fabric-api:legacy-fabric-api:${project.fabric_version}"
|
||
|
|
||
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||
|
}
|
||
|
|
||
|
processResources {
|
||
|
inputs.property "version", project.version
|
||
|
|
||
|
filesMatching("fabric.mod.json") {
|
||
|
expand "version": project.version
|
||
|
}
|
||
|
}
|
||
|
|
||
|
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
|
||
|
}
|
||
|
}
|
||
|
|
||
|
java {
|
||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||
|
|
||
|
// 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()
|
||
|
}
|
||
|
|
||
|
jar {
|
||
|
from("LICENSE") {
|
||
|
rename { "${it}_${base.archivesName.get()}" }
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// 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()
|
||
|
}
|
||
|
}
|