2024-05-04 02:35:33 +02:00
|
|
|
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) {
|
|
|
|
implementation(api, lib, backend)
|
|
|
|
}
|
|
|
|
|
|
|
|
createCompileConfigurations()
|
|
|
|
}
|
|
|
|
|
|
|
|
platform {
|
|
|
|
commonProject = project(":common")
|
|
|
|
sources(api, lib, backend, main)
|
|
|
|
compileWithCommonSourceSets()
|
|
|
|
setupLoomMod()
|
|
|
|
setupLoomRuns()
|
|
|
|
setupFatJar()
|
2024-05-05 00:45:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
jarSets {
|
2024-05-05 01:49:32 +02:00
|
|
|
mainSet.publish(platform.modArtifactId)
|
|
|
|
create("api", api, lib).apply {
|
|
|
|
addToAssemble()
|
|
|
|
publish(platform.apiArtifactId)
|
2024-05-12 11:48:25 +02:00
|
|
|
|
|
|
|
configureJar {
|
|
|
|
manifest {
|
|
|
|
attributes("Fabric-Loom-Remap" to "true")
|
|
|
|
}
|
|
|
|
}
|
2024-05-05 01:49:32 +02:00
|
|
|
}
|
2024-05-04 02:35:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
defaultPackageInfos {
|
|
|
|
sources(api, lib, backend, main)
|
|
|
|
}
|
|
|
|
|
2024-09-10 05:55:36 +02:00
|
|
|
loom {
|
|
|
|
mixin {
|
|
|
|
useLegacyMixinAp = true
|
|
|
|
add(main, "flywheel.refmap.json")
|
|
|
|
add(backend, "backend-flywheel.refmap.json")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-04 02:35:33 +02:00
|
|
|
dependencies {
|
|
|
|
modImplementation("net.fabricmc:fabric-loader:${property("fabric_loader_version")}")
|
|
|
|
modApi("net.fabricmc.fabric-api:fabric-api:${property("fabric_api_version")}")
|
|
|
|
|
2024-10-11 02:54:25 +02:00
|
|
|
modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}-fabric")
|
2024-08-23 01:41:28 +02:00
|
|
|
modCompileOnly("maven.modrinth:iris:${property("iris_version")}-fabric")
|
2024-05-04 02:35:33 +02:00
|
|
|
|
|
|
|
"forApi"(project(path = ":common", configuration = "commonApiOnly"))
|
|
|
|
"forLib"(project(path = ":common", configuration = "commonLib"))
|
|
|
|
"forBackend"(project(path = ":common", configuration = "commonBackend"))
|
|
|
|
"forMain"(project(path = ":common", configuration = "commonImpl"))
|
|
|
|
}
|