Flywheel/common/build.gradle.kts
IThundxr 07e66bb299
Merge remote-tracking branch 'upstream/1.20/dev' into feat/multi-loader-1.21
# Conflicts:
#	common/src/lib/java/dev/engine_room/flywheel/lib/util/ShadersModHandler.java
#	common/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplat.java
#	common/src/main/java/dev/engine_room/flywheel/impl/compat/SodiumCompat.java
#	common/src/main/java/dev/engine_room/flywheel/impl/mixin/BlockEntityTypeMixin.java
#	fabric/build.gradle.kts
#	fabric/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java
#	fabric/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
#	fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
#	fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
#	fabric/src/main/resources/fabric.mod.json
#	forge/build.gradle.kts
#	forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java
#	forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
#	forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
#	forge/src/main/resources/META-INF/neoforge.mods.toml
#	gradle.properties
#	gradle/wrapper/gradle-wrapper.properties
2024-10-29 17:38:23 -04:00

88 lines
2.1 KiB
Plaintext

plugins {
idea
java
`maven-publish`
id("dev.architectury.loom")
id("flywheel.subproject")
}
val api = sourceSets.create("api")
val lib = sourceSets.create("lib")
val backend = sourceSets.create("backend")
val stubs = sourceSets.create("stubs")
val main = sourceSets.getByName("main")
transitiveSourceSets {
compileClasspath = main.compileClasspath
sourceSet(api) {
rootCompile()
}
sourceSet(lib) {
rootCompile()
compile(api)
}
sourceSet(backend) {
rootCompile()
compile(api, lib)
}
sourceSet(stubs) {
rootCompile()
}
sourceSet(main) {
compile(api, lib, backend, stubs)
}
sourceSet(sourceSets.getByName("test")) {
implementation(api, lib, backend)
}
}
defaultPackageInfos {
sources(api, lib, backend, main)
}
jarSets {
// For sharing with other subprojects.
outgoing("commonApiOnly", api)
outgoing("commonLib", lib)
outgoing("commonBackend", backend)
outgoing("commonStubs", stubs)
outgoing("commonImpl", main)
// For publishing.
create("api", api, lib).apply {
addToAssemble()
publish("flywheel-common-intermediary-api-${property("artifact_minecraft_version")}")
configureJar {
manifest {
attributes("Fabric-Loom-Remap" to "true")
}
}
// Don't publish the un-remapped jars because they don't have the correct manifest populated by Loom.
forkRemap("apiMojmap").apply {
addToAssemble()
configureRemap {
// "named" == mojmap
// We're probably remapping from named to named so Loom should noop this.
targetNamespace = "named"
}
publish("flywheel-common-mojmap-api-${property("artifact_minecraft_version")}")
}
}
}
dependencies {
modCompileOnly("net.fabricmc:fabric-loader:${property("fabric_loader_version")}")
modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}-fabric")
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
}
tasks.test {
useJUnitPlatform()
}