Flywheel/neoforge/build.gradle.kts

124 lines
3 KiB
Text
Raw Normal View History

plugins {
idea
java
`maven-publish`
id("dev.architectury.loom")
id("flywheel.subproject")
id("flywheel.platform")
}
val common = ":common"
val commonProject = project(common)
subproject.init("flywheel-forge", "flywheel_group", "flywheel_version")
val api = sourceSets.create("api")
val lib = sourceSets.create("lib")
val backend = sourceSets.create("backend")
2025-01-18 01:50:29 +01:00
val stubs = sourceSets.create("stubs")
val main = sourceSets.getByName("main")
val testMod = sourceSets.create("testMod")
transitiveSourceSets {
compileClasspath = main.compileClasspath
sourceSet(api) {
rootCompile()
from(commonProject)
}
sourceSet(lib) {
rootCompile()
compileClasspath(api)
from(commonProject)
}
sourceSet(backend) {
rootCompile()
compileClasspath(api, lib)
from(commonProject)
}
sourceSet(stubs) {
rootCompile()
from(commonProject)
}
sourceSet(main) {
compileClasspath(api, lib, backend)
bundleFrom(commonProject)
bundleOutput(api, lib, backend)
}
sourceSet(testMod) {
rootCompile()
}
createCompileConfigurations()
}
platform {
setupLoomMod(api, lib, backend, main)
setupLoomRuns()
setupTestMod(testMod)
}
jarSets {
mainSet.publish("flywheel-forge-${project.property("artifact_minecraft_version")}")
mainSet.outgoing("flywheel")
create("api", api, lib).apply {
addToAssemble()
publish("flywheel-forge-api-${project.property("artifact_minecraft_version")}")
configureJar {
manifest {
attributes("Fabric-Loom-Remap" to "true")
}
}
}
}
defaultPackageInfos {
sources(api, lib, backend, main)
}
loom {
mixin {
useLegacyMixinAp = true
add(main, "flywheel.refmap.json")
add(backend, "backend-flywheel.refmap.json")
}
runs {
configureEach {
property("forge.logging.markers", "")
property("forge.logging.console.level", "debug")
}
}
}
2024-05-05 17:05:33 +02:00
repositories {
maven("https://maven.neoforged.net/releases/")
}
dependencies {
2024-05-05 17:05:33 +02:00
neoForge("net.neoforged:neoforge:${property("neoforge_version")}")
2024-10-11 02:54:25 +02:00
modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}-neoforge")
2024-08-23 01:41:28 +02:00
modCompileOnly("maven.modrinth:iris:${property("iris_version")}-neoforge")
2024-12-08 17:06:48 +01:00
modCompileOnly("maven.modrinth:embeddium:${property("embeddium_version")}")
"forApi"(project(path = common, configuration = "apiClasses"))
"forLib"(project(path = common, configuration = "libClasses"))
"forBackend"(project(path = common, configuration = "backendClasses"))
"forStubs"(project(path = common, configuration = "stubsClasses"))
"forMain"(project(path = common, configuration = "mainClasses"))
"forLib"(project(path = common, configuration = "libResources"))
"forBackend"(project(path = common, configuration = "backendResources"))
"forMain"(project(path = common, configuration = "mainResources"))
}