2025-01-12 13:02:50 -08:00
|
|
|
plugins {
|
|
|
|
idea
|
|
|
|
java
|
|
|
|
`maven-publish`
|
|
|
|
id("dev.architectury.loom")
|
|
|
|
id("flywheel.subproject")
|
|
|
|
id("flywheel.platform")
|
|
|
|
}
|
|
|
|
|
2025-01-12 19:03:32 -08:00
|
|
|
val common = ":common"
|
2025-01-17 20:22:26 -05:00
|
|
|
val platform = ":neoforge"
|
2025-01-12 19:03:32 -08:00
|
|
|
|
2025-01-17 20:22:26 -05:00
|
|
|
subproject.init("vanillin-neoforge", "vanillin_group", "vanillin_version")
|
2025-01-12 13:02:50 -08:00
|
|
|
|
|
|
|
val main = sourceSets.getByName("main")
|
|
|
|
|
|
|
|
platform {
|
|
|
|
setupLoomRuns()
|
|
|
|
}
|
|
|
|
|
2025-01-12 19:03:32 -08:00
|
|
|
transitiveSourceSets {
|
|
|
|
sourceSet(main) {
|
|
|
|
compileClasspath(project(platform), "api", "lib")
|
2025-01-12 13:02:50 -08:00
|
|
|
|
2025-01-12 19:03:32 -08:00
|
|
|
bundleFrom(project(common), "vanillin")
|
|
|
|
}
|
2025-01-12 13:02:50 -08:00
|
|
|
}
|
|
|
|
|
2025-03-01 16:44:57 -08:00
|
|
|
val replaceProperties = listOf(
|
|
|
|
"mod_license",
|
|
|
|
"mod_sources",
|
|
|
|
"mod_issues",
|
|
|
|
"mod_homepage",
|
|
|
|
"flywheel_id",
|
|
|
|
"vanillin_id",
|
|
|
|
"vanillin_name",
|
|
|
|
"vanillin_description",
|
|
|
|
"flywheel_maven_version_range",
|
|
|
|
"minecraft_maven_version_range",
|
2025-03-01 22:04:09 -08:00
|
|
|
"neoforge_version_range",
|
2025-03-01 16:44:57 -08:00
|
|
|
).associateWith { property(it) as String }
|
|
|
|
.plus("vanillin_version" to "${property("vanillin_version")}${if (subproject.buildNumber != null) "-${subproject.buildNumber}" else ""}")
|
|
|
|
|
|
|
|
tasks.withType<ProcessResources>().configureEach {
|
|
|
|
inputs.properties(replaceProperties)
|
|
|
|
|
2025-03-01 22:04:09 -08:00
|
|
|
filesMatching(listOf("pack.mcmeta", "META-INF/neoforge.mods.toml")) {
|
2025-03-01 16:44:57 -08:00
|
|
|
expand(replaceProperties)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-01-12 13:02:50 -08:00
|
|
|
jarSets {
|
2025-01-18 15:00:33 -06:00
|
|
|
mainSet.publishWithRawSources {
|
2025-03-01 22:04:09 -08:00
|
|
|
artifactId = "vanillin-neoforge-${property("artifact_minecraft_version")}"
|
2025-01-18 15:00:33 -06:00
|
|
|
}
|
2025-01-12 13:02:50 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
defaultPackageInfos {
|
|
|
|
sources(main)
|
|
|
|
}
|
|
|
|
|
|
|
|
loom {
|
|
|
|
mixin {
|
|
|
|
useLegacyMixinAp = true
|
|
|
|
add(main, "vanillin.refmap.json")
|
|
|
|
}
|
|
|
|
|
|
|
|
runs {
|
|
|
|
configureEach {
|
|
|
|
property("forge.logging.markers", "")
|
|
|
|
property("forge.logging.console.level", "debug")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-01-17 20:22:26 -05:00
|
|
|
repositories {
|
|
|
|
maven("https://maven.neoforged.net/releases/")
|
|
|
|
}
|
|
|
|
|
2025-01-12 13:02:50 -08:00
|
|
|
dependencies {
|
2025-01-17 20:22:26 -05:00
|
|
|
neoForge("net.neoforged:neoforge:${property("neoforge_version")}")
|
|
|
|
|
|
|
|
modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}-neoforge")
|
|
|
|
modCompileOnly("maven.modrinth:iris:${property("iris_version")}-neoforge")
|
2025-01-12 13:02:50 -08:00
|
|
|
|
|
|
|
modCompileOnly("maven.modrinth:embeddium:${property("embeddium_version")}")
|
|
|
|
|
2025-01-12 19:03:32 -08:00
|
|
|
compileOnly(project(path = common, configuration = "vanillinClasses"))
|
|
|
|
compileOnly(project(path = common, configuration = "vanillinResources"))
|
2025-01-12 14:04:21 -08:00
|
|
|
|
2025-01-20 13:58:51 -06:00
|
|
|
compileOnly(annotationProcessor("io.github.llamalad7:mixinextras-common:0.4.1")!!)
|
|
|
|
|
2025-01-12 14:04:21 -08:00
|
|
|
// JiJ flywheel proper
|
2025-01-12 19:03:32 -08:00
|
|
|
include(project(path = platform, configuration = "flywheelRemap"))
|
|
|
|
runtimeOnly(project(path = platform, configuration = "flywheelDev"))
|
2025-01-12 13:02:50 -08:00
|
|
|
}
|