baritone/fabric/build.gradle

92 lines
2.6 KiB
Groovy
Raw Normal View History

2022-04-03 04:36:18 +00:00
/*
* This file is part of Baritone.
*
* Baritone is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Baritone is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
import baritone.gradle.task.CreateDistTask
import baritone.gradle.task.ProguardTask
plugins {
id "com.github.johnrengelman.shadow" version "7.0.0"
}
archivesBaseName = archivesBaseName + "-" + project.name
architectury {
platformSetupLoomIde()
fabric()
}
configurations {
common
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentFabric.extendsFrom common
}
dependencies {
modImplementation "net.fabricmc:fabric-loader:${project.fabric_version}"
2022-04-03 04:36:18 +00:00
2022-04-05 01:38:23 +00:00
// this makes it compile with the forge tweak stuff
implementation 'com.github.ImpactDevelopment:SimpleTweaker:1.2'
implementation('net.minecraft:launchwrapper:1.12') {
exclude module: 'lwjgl'
exclude module: 'asm-debug-all'
}
common(project(path: ":common", configuration: "namedElements")) { transitive false }
2022-04-03 04:36:18 +00:00
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false }
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
shadowJar {
configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
}
remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
classifier null
}
jar {
classifier "dev"
}
components.java {
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
skip()
}
}
task proguard(type: ProguardTask) {
url 'https://github.com/Guardsquare/proguard/releases/download/v7.2.1/proguard-7.2.1.zip'
2022-04-05 01:38:23 +00:00
mixinUrl 'https://maven.fabricmc.net/net/fabricmc/sponge-mixin/0.11.3%2Bmixin.0.8.5/sponge-mixin-0.11.3%2Bmixin.0.8.5.jar'
2022-04-03 04:36:18 +00:00
extract 'proguard-7.2.1/lib/proguard.jar'
compType "FABRIC"
}
task createDist(type: CreateDistTask, dependsOn: proguard)
build.finalizedBy(createDist)