Lilase/build.gradle

140 lines
4.1 KiB
Groovy
Raw Normal View History

buildscript {
ext.kotlin_version = "1.6.10"
repositories {
jcenter()
maven {
name = "forge"
url = "https://files.minecraftforge.net/maven"
}
maven { url "https://jitpack.io" }
maven { url "https://repo.spongepowered.org/repository/maven-public/" }
}
dependencies {
classpath "com.github.Skytils:ForgeGradle:41dfce0a70"
classpath "com.github.jengelman.gradle.plugins:shadow:6.1.0"
classpath "com.github.debuggingss:MixinGradle:0.6-SNAPSHOT"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
2023-02-10 22:42:46 +01:00
}
apply plugin: "kotlin"
apply plugin: "net.minecraftforge.gradle.forge"
apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "org.spongepowered.mixin"
2023-02-10 22:42:46 +01:00
2023-02-25 04:12:49 +01:00
version = "1.0.21"
2023-02-10 22:42:46 +01:00
group = "me.night0721.lilase"
archivesBaseName = "Lilase"
sourceCompatibility = 1.8
compileJava.options.encoding = "UTF-8"
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = JavaVersion.VERSION_1_8
2023-02-10 22:42:46 +01:00
minecraft {
version = "1.8.9-11.15.1.2318-1.8.9"
runDir = "run"
mappings = "stable_22"
makeObfSourceJar = false
2023-02-10 22:42:46 +01:00
replace "@VERSION@": project.version
clientRunArgs += ["--tweakClass cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker", "--mixin mixins.night0721.json"]
}
configurations {
include
implementation.extendsFrom(include)
2023-02-10 22:42:46 +01:00
}
repositories {
mavenCentral()
maven { url "https://jitpack.io/" }
maven { url "https://repo.spongepowered.org/repository/maven-public/" }
2023-02-10 22:42:46 +01:00
maven { url "https://repo.sk1er.club/repository/maven-public" }
maven { url "https://repo.sk1er.club/repository/maven-releases/" }
maven { url "https://storehouse.okaeri.eu/repository/maven-public/" }
maven { url "https://repo.polyfrost.cc/releases" }
2023-02-10 22:42:46 +01:00
}
dependencies {
compileOnly("gg.essential:essential-1.8.9-forge:2581")
include("gg.essential:loader-launchwrapper:1.1.3")
implementation("org.spongepowered:mixin:0.7.11-SNAPSHOT")
annotationProcessor("org.spongepowered:mixin:0.7.11-SNAPSHOT")
include("org.apache.commons:commons-collections4:4.4")
include("org.json:json:20220924")
compileOnly('cc.polyfrost:oneconfig-1.8.9-forge:0.2.0-alpha+')
include("cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta9")
2023-02-11 04:18:09 +01:00
include(fileTree(dir: "libs", include: "*.jar"))
implementation(fileTree(dir: "libs", include: "*.jar"))
2023-02-10 22:42:46 +01:00
}
mixin {
disableRefMapWarning = true
defaultObfuscationEnv searge
add sourceSets.main, "mixins.night0721.refmap.json"
2023-02-10 22:42:46 +01:00
}
jar {
manifest.attributes("FMLCorePluginContainsFMLMod": true,
2023-02-10 22:42:46 +01:00
"FMLCorePlugin": "me.night0721.lilase.mixins.MixinLoader",
"ForceLoadAsMod": true,
"MixinConfigs": "mixins.night0721.json",
"ModSide": "CLIENT",
"TweakClass": "cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker",
"TweakOrder": "0")
2023-02-10 22:42:46 +01:00
enabled = false
}
sourceJar {
enabled = false
}
2023-02-10 22:42:46 +01:00
shadowJar {
archiveClassifier.set("")
2023-02-10 22:42:46 +01:00
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
configurations = [project.configurations.include]
exclude "LICENSE.md"
exclude "pack.mcmeta"
exclude "dummyThing"
exclude "**/module-info.class"
exclude "*.so"
exclude "*.dylib"
exclude "*.dll"
exclude "*.jnilib"
exclude "ibxm/**"
exclude "com/jcraft/**"
exclude "org/lwjgl/**"
exclude "net/java/**"
exclude "META-INF/proguard/**"
exclude "META-INF/maven/**"
exclude "META-INF/versions/**"
exclude "META-INF/com.android.tools/**"
exclude "fabric.mod.json"
2023-02-10 22:42:46 +01:00
}
tasks.reobfJar.dependsOn tasks.shadowJar
2023-02-10 22:42:46 +01:00
reobf {
shadowJar {
classpath = sourceSets.main.compileClasspath
2023-02-10 22:42:46 +01:00
}
}
processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
2023-02-10 22:42:46 +01:00
from(sourceSets.main.resources.srcDirs) {
include "mcmod.info"
expand "version": project.version, "mcversion": project.minecraft.version
2023-02-10 22:42:46 +01:00
}
from(sourceSets.main.resources.srcDirs) {
exclude "mcmod.info"
2023-02-10 22:42:46 +01:00
}
}
sourceSets {
main { output.resourcesDir = java.outputDir }
}