Flywheel/forge/build.gradle.kts

93 lines
2.1 KiB
Plaintext
Raw Normal View History

plugins {
idea
java
`maven-publish`
id("dev.architectury.loom")
id("flywheel.subproject")
id("flywheel.platform")
}
val api = sourceSets.create("api")
val lib = sourceSets.create("lib")
val backend = sourceSets.create("backend")
val main = sourceSets.getByName("main")
transitiveSourceSets {
compileClasspath = main.compileClasspath
sourceSet(api) {
rootCompile()
}
sourceSet(lib) {
rootCompile()
compile(api)
}
sourceSet(backend) {
rootCompile()
compile(api, lib)
}
sourceSet(main) {
compile(api, lib, backend)
}
createCompileConfigurations()
}
platform {
commonProject = project(":common")
sources(api, lib, backend, main)
compileWithCommonSourceSets()
setupLoomMod()
setupLoomRuns()
setupFatJar()
}
jarSets {
mainSet.publish(platform.modArtifactId)
create("api", api, lib).apply {
addToAssemble()
publish(platform.apiArtifactId)
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-09-14 15:20:59 +02:00
modCompileOnly(":sodium-neoforge-0.6.0-beta.2+mc1.21.1")
2024-08-23 01:41:28 +02:00
modCompileOnly("maven.modrinth:iris:${property("iris_version")}-neoforge")
"forApi"(project(path = ":common", configuration = "commonApiOnly"))
"forLib"(project(path = ":common", configuration = "commonLib"))
"forBackend"(project(path = ":common", configuration = "commonBackend"))
"forMain"(project(path = ":common", configuration = "commonImpl"))
}