139 lines
3.6 KiB
Groovy
139 lines
3.6 KiB
Groovy
|
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"
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
apply plugin: 'kotlin'
|
||
|
apply plugin: "net.minecraftforge.gradle.forge"
|
||
|
apply plugin: "com.github.johnrengelman.shadow"
|
||
|
apply plugin: "org.spongepowered.mixin"
|
||
|
|
||
|
|
||
|
version = "1.0.25"
|
||
|
|
||
|
|
||
|
group = "me.night0721.lilase"
|
||
|
archivesBaseName = "Lilase"
|
||
|
|
||
|
compileJava.options.encoding = "UTF-8"
|
||
|
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = "1.8"
|
||
|
|
||
|
sourceSets {
|
||
|
main {
|
||
|
output.resourcesDir = java.outputDir
|
||
|
}
|
||
|
}
|
||
|
|
||
|
minecraft {
|
||
|
version = "1.8.9-11.15.1.2318-1.8.9"
|
||
|
runDir = "run"
|
||
|
mappings = "stable_22"
|
||
|
makeObfSourceJar = false
|
||
|
|
||
|
clientRunArgs += "--mixin mixins.lilase.json"
|
||
|
clientRunArgs += "--tweakClass cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker"
|
||
|
}
|
||
|
|
||
|
|
||
|
configurations {
|
||
|
include
|
||
|
implementation.extendsFrom(include)
|
||
|
}
|
||
|
|
||
|
repositories {
|
||
|
maven { url = "https://repo.sk1er.club/repository/maven-public" }
|
||
|
maven { url = "https://jitpack.io/" }
|
||
|
maven { url = "https://repo.spongepowered.org/repository/maven-public/" }
|
||
|
maven { url = 'https://repo.polyfrost.cc/releases' }
|
||
|
mavenCentral()
|
||
|
}
|
||
|
|
||
|
dependencies {
|
||
|
implementation('org.spongepowered:mixin:0.7.11-SNAPSHOT')
|
||
|
annotationProcessor('org.spongepowered:mixin:0.7.11-SNAPSHOT')
|
||
|
|
||
|
compileOnly('cc.polyfrost:oneconfig-1.8.9-forge:0.2.0-alpha+')
|
||
|
include('cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta+')
|
||
|
}
|
||
|
|
||
|
mixin {
|
||
|
add sourceSets.main, "mixins.lilase.refmap.json"
|
||
|
defaultObfuscationEnv searge
|
||
|
}
|
||
|
|
||
|
jar {
|
||
|
manifest.attributes(
|
||
|
"FMLCorePluginContainsFMLMod": true,
|
||
|
"FMLCorePlugin": "me.night0721.lilase.mixins.MixinLoader",
|
||
|
"ForceLoadAsMod": true,
|
||
|
"ModSide": "CLIENT",
|
||
|
"TweakClass": "cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker",
|
||
|
"TweakOrder": "0",
|
||
|
"MixinConfigs": "mixins.lilase.json",
|
||
|
)
|
||
|
enabled = false
|
||
|
}
|
||
|
|
||
|
sourceJar {
|
||
|
enabled = false
|
||
|
}
|
||
|
|
||
|
shadowJar {
|
||
|
archiveClassifier.set("")
|
||
|
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"
|
||
|
archiveFileName = "Lilase.jar"
|
||
|
}
|
||
|
|
||
|
reobfJar.dependsOn tasks.shadowJar
|
||
|
|
||
|
reobf {
|
||
|
shadowJar {
|
||
|
classpath = sourceSets.main.compileClasspath
|
||
|
}
|
||
|
}
|
||
|
|
||
|
processResources {
|
||
|
inputs.property "version", project.version
|
||
|
inputs.property "mcversion", project.minecraft.version
|
||
|
|
||
|
filesMatching("mcmod.info") {
|
||
|
expand(
|
||
|
"version": project.version,
|
||
|
"mcversion": project.minecraft.version
|
||
|
)
|
||
|
}
|
||
|
}
|
||
|
sourceSets { main { output.resourcesDir = java.classesDirectory } }
|