mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-10 12:34:11 +01:00
4c706f23e6
- Merge package-infos, jar-sets, and transitive-source-sets plugins - Move publishing logic into JarTaskSet - Do not eagerly add all jarsets to assemble - Significantly reduces build times - Add separate helper method for creating outgoing jarsets
63 lines
1.4 KiB
Plaintext
63 lines
1.4 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 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)
|
|
}
|
|
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("commonImpl", main)
|
|
|
|
// For publishing.
|
|
create("api", api, lib).apply {
|
|
publish("flywheel-common-mojmap-api-${property("artifact_minecraft_version")}")
|
|
publishRemap("flywheel-common-intermediary-api-${property("artifact_minecraft_version")}")
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
modCompileOnly("net.fabricmc:fabric-loader:${property("fabric_loader_version")}")
|
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
}
|