200 lines
5.9 KiB
Groovy
200 lines
5.9 KiB
Groovy
plugins {
|
|
id "idea"
|
|
id "net.neoforged.moddev" version "2.0.74"
|
|
id "dev.ithundxr.silk" version "0.11.15"
|
|
id "me.modmuss50.mod-publish-plugin" version "0.8.3"
|
|
id "maven-publish"
|
|
}
|
|
|
|
apply from: "./gradle/java.gradle"
|
|
apply from: "gradle/property_loader.gradle"
|
|
|
|
group = "com.${mod_author}.${mod_id}"
|
|
version = "${minecraft_version}-${mod_version}"
|
|
archivesBaseName = mod_id
|
|
|
|
idea {
|
|
module {
|
|
downloadJavadoc = true
|
|
downloadSources = true
|
|
}
|
|
}
|
|
|
|
neoForge {
|
|
version = project.neo_version
|
|
|
|
accessTransformers = project.files('src/main/resources/META-INF/accesstransformer.cfg')
|
|
|
|
parchment {
|
|
minecraftVersion = project.parchment_minecraft_version
|
|
mappingsVersion = project.parchment_version
|
|
}
|
|
mods {
|
|
"$mod_id" {
|
|
sourceSet sourceSets.main
|
|
}
|
|
}
|
|
runs {
|
|
// applies to all the run configs below
|
|
configureEach {
|
|
systemProperty 'forge.logging.markers', ''
|
|
systemProperty 'forge.logging.console.level', 'info'
|
|
jvmArguments = ["-XX:+IgnoreUnrecognizedVMOptions", "-XX:+AllowEnhancedClassRedefinition"]
|
|
//jvmArgs("-XX:-OmitStackTraceInFastThrow") // uncomment when you get exceptions with null messages etc
|
|
//jvmArgs '-XX:+UnlockCommercialFeatures' // uncomment for profiling
|
|
|
|
systemProperty 'mixin.debug.export', 'true'
|
|
systemProperty 'mixin.debug.verbose', 'true'
|
|
programArgument '-mixin.config=create.mixins.json'
|
|
//programArgument '-mixin.config=ponder.mixins.json'
|
|
//systemProperty("mixin.env.remapRefMap", "true")
|
|
//systemProperty("mixin.env.refMapRemappingFile", "${projectDir}/build/createSrgToMcp/output.srg")
|
|
|
|
}
|
|
|
|
client {
|
|
client()
|
|
gameDirectory = project.file('run')
|
|
}
|
|
|
|
server {
|
|
server()
|
|
|
|
gameDirectory = project.file('run/server')
|
|
}
|
|
|
|
data {
|
|
data()
|
|
|
|
gameDirectory = project.file('run')
|
|
systemProperty 'forge.logging.markers', 'REGISTRIES,REGISTRYDUMP'
|
|
systemProperty 'forge.logging.console.level', 'debug'
|
|
programArguments.addAll("--mod", mod_id as String, "--all", "--output", file("src/generated/resources/").getAbsolutePath(), "--existing", file("src/main/resources").getAbsolutePath())
|
|
}
|
|
|
|
gameTestServer {
|
|
type = "gameTestServer"
|
|
|
|
gameDirectory = project.file('run/gametest')
|
|
// setForceExit false <- FIXME 1.20
|
|
}
|
|
}
|
|
}
|
|
|
|
sourceSets.main {
|
|
resources {
|
|
srcDir 'src/generated/resources'
|
|
exclude '.cache/'
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven { url = "https://maven.createmod.net" } // Create, Ponder, Flywheel
|
|
maven { url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" } // ForgeConfigAPIPort
|
|
maven { url = "https://mvn.devos.one/snapshots" } // Registrate
|
|
maven { url = "https://maven.blamejared.com" } // JEI, Vazkii's Mods
|
|
|
|
maven {
|
|
// location of the maven for Curios API
|
|
url = "https://maven.theillusivec4.top/"
|
|
}
|
|
maven {
|
|
// location of maven for CC: Tweaked
|
|
name = "squiddev"
|
|
url = "https://squiddev.cc/maven/"
|
|
}
|
|
|
|
maven {
|
|
url = 'https://www.cursemaven.com'
|
|
content {
|
|
includeGroup "curse.maven"
|
|
}
|
|
}
|
|
maven {
|
|
name = "Modrinth"
|
|
url = "https://api.modrinth.com/maven"
|
|
content {
|
|
includeGroup "maven.modrinth"
|
|
}
|
|
}
|
|
maven {
|
|
url "https://jitpack.io"
|
|
content {
|
|
includeGroup "com.github.llamalad7.mixinextras"
|
|
}
|
|
}
|
|
|
|
maven {
|
|
url "https://maven.latvian.dev/releases"
|
|
content {
|
|
includeGroup "dev.latvian.mods"
|
|
includeGroup "dev.latvian.apps"
|
|
}
|
|
}
|
|
maven {
|
|
url "https://maven.architectury.dev/"
|
|
content {
|
|
includeGroup "dev.architectury"
|
|
}
|
|
}
|
|
mavenLocal()
|
|
flatDir {
|
|
dirs 'libs'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.jetbrains:annotations:22.0.0'
|
|
|
|
implementation("com.simibubi.create:create-${minecraft_version}:${create_version}:slim") { transitive = false }
|
|
implementation("net.createmod.ponder:Ponder-NeoForge-${minecraft_version}:${ponder_version}")
|
|
compileOnly("dev.engine-room.flywheel:flywheel-neoforge-api-${minecraft_version}:${flywheel_version}")
|
|
runtimeOnly("dev.engine-room.flywheel:flywheel-neoforge-${minecraft_version}:${flywheel_version}")
|
|
implementation("com.tterrag.registrate:Registrate:${registrate_version}")
|
|
|
|
compileOnly("top.theillusivec4.curios:curios-neoforge:${curios_version}+${curios_minecraft_version}:api")
|
|
runtimeOnly("top.theillusivec4.curios:curios-neoforge:${curios_version}+${curios_minecraft_version}")
|
|
|
|
implementation("curse.maven:jade-324717:${jade_id}")
|
|
|
|
compileOnly("dev.architectury:architectury-neoforge:$architectury_version")
|
|
api("dev.latvian.mods:kubejs-neoforge:$kubejs_version")
|
|
interfaceInjectionData("dev.latvian.mods:kubejs-neoforge:$kubejs_version") // optional
|
|
|
|
//runtimeOnly("dev.architectury:architectury-neoforge:13.0.8")
|
|
//implementation("dev.ftb.mods:ftb-chunks-neoforge:2101.1.1")
|
|
//implementation("dev.ftb.mods:ftb-teams-neoforge:2101.1.0")
|
|
//implementation("dev.ftb.mods:ftb-library-neoforge:2101.1.3")
|
|
|
|
|
|
}
|
|
|
|
processResources {
|
|
def buildProps = project.properties.clone()
|
|
|
|
// Replaces FML's magic file.jarVersion string with the correct version at build time.
|
|
buildProps.put('file', [jarVersion: project.version])
|
|
|
|
filesMatching(['META-INF/neoforge.mods.toml', 'pack.mcmeta']) {
|
|
expand buildProps
|
|
}
|
|
}
|
|
compileJava {
|
|
options.compilerArgs = ['-Xdiags:verbose']
|
|
}
|
|
|
|
jar {
|
|
from('LICENSE') {
|
|
rename { "${it}_${archivesBaseName}" }
|
|
}
|
|
|
|
}
|
|
|
|
publishing {
|
|
// other settings of publication
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
artifact jar
|
|
}
|
|
}
|
|
} |