Flywheel/forge/build.gradle.kts
IThundxr 42290b207f
Merge remote-tracking branch 'upstream/1.20/dev' into feat/multi-loader-1.21
# Conflicts:
#	buildSrc/build.gradle.kts
#	buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt
#	forge/build.gradle.kts
#	gradle.properties
#	gradle/wrapper/gradle-wrapper.properties
2024-09-14 08:57:52 -04:00

102 lines
2.4 KiB
Plaintext

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")
}
forge {
mixinConfig("flywheel.backend.mixins.json")
mixinConfig("flywheel.impl.mixins.json")
mixinConfig("flywheel.impl.sodium.mixins.json")
}
runs {
configureEach {
property("forge.logging.markers", "")
property("forge.logging.console.level", "debug")
}
}
}
repositories {
maven("https://maven.neoforged.net/releases/")
}
dependencies {
neoForge("net.neoforged:neoforge:${property("neoforge_version")}")
modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}-neoforge")
modCompileOnly("maven.modrinth:iris:${property("iris_version")}-neoforge")
//modCompileOnly("maven.modrinth:embeddium:${property("embeddium_version")}")
//modCompileOnly("maven.modrinth:oculus:${property("oculus_version")}")
"forApi"(project(path = ":common", configuration = "commonApiOnly"))
"forLib"(project(path = ":common", configuration = "commonLib"))
"forBackend"(project(path = ":common", configuration = "commonBackend"))
"forMain"(project(path = ":common", configuration = "commonImpl"))
}