mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-23 03:17:53 +01:00
Scratch that
- Loom gets angry when a mod* dependency doesn't immediately exist so use a regular runtime dependency with the devlibs jar - Strangely, the include dependency is just fine with the remap jar - Move outgoing remapJar/jar configuration generation to JarTaskSet - Don't actually need evaluationDependsOn - Fix test mod id
This commit is contained in:
parent
b541c19785
commit
b6124be28a
8 changed files with 35 additions and 23 deletions
|
@ -41,6 +41,29 @@ class JarTaskSet(
|
|||
}
|
||||
}
|
||||
|
||||
fun outgoing(name: String) {
|
||||
outgoingRemapJar("${name}Remap")
|
||||
outgoingJar("${name}Dev")
|
||||
}
|
||||
|
||||
fun outgoingRemapJar(name: String) {
|
||||
val config = project.configurations.register(name) {
|
||||
isCanBeConsumed = true
|
||||
isCanBeResolved = false
|
||||
}
|
||||
|
||||
project.artifacts.add(config.name, remapJar)
|
||||
}
|
||||
|
||||
fun outgoingJar(name: String) {
|
||||
val config = project.configurations.register(name) {
|
||||
isCanBeConsumed = true
|
||||
isCanBeResolved = false
|
||||
}
|
||||
|
||||
project.artifacts.add(config.name, jar)
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the assemble task to depend on the remap tasks and javadoc jar.
|
||||
*/
|
||||
|
|
|
@ -134,7 +134,6 @@ open class PlatformExtension(val project: Project) {
|
|||
|
||||
override fun setValue(thisRef: Any?, property: KProperty<*>, value: Project) {
|
||||
this.value = value
|
||||
thisProject.evaluationDependsOn(value.path)
|
||||
}
|
||||
|
||||
override fun toString(): String =
|
||||
|
|
|
@ -56,6 +56,8 @@ platform {
|
|||
|
||||
jarSets {
|
||||
mainSet.publish(platform.modArtifactId)
|
||||
mainSet.outgoing("flywheel")
|
||||
|
||||
create("api", api, lib).apply {
|
||||
addToAssemble()
|
||||
publish(platform.apiArtifactId)
|
||||
|
@ -68,13 +70,6 @@ jarSets {
|
|||
}
|
||||
}
|
||||
|
||||
val config = project.configurations.register("flywheelFabric") {
|
||||
isCanBeConsumed = true
|
||||
isCanBeResolved = false
|
||||
}
|
||||
|
||||
project.artifacts.add(config.name, jarSets.mainSet.remapJar)
|
||||
|
||||
defaultPackageInfos {
|
||||
sources(api, lib, backend, main)
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"schemaVersion": 1,
|
||||
"id" : "${mod_id}_testmod",
|
||||
"name": "${mod_name} Test Mod",
|
||||
"id" : "${flywheel_id}_testmod",
|
||||
"name" : "${flywheel_name} Test Mod",
|
||||
"version": "1.0.0",
|
||||
"environment": "*",
|
||||
"license": "${mod_license}",
|
||||
|
|
|
@ -54,6 +54,8 @@ platform {
|
|||
|
||||
jarSets {
|
||||
mainSet.publish(platform.modArtifactId)
|
||||
mainSet.outgoing("flywheel")
|
||||
|
||||
create("api", api, lib).apply {
|
||||
addToAssemble()
|
||||
publish(platform.apiArtifactId)
|
||||
|
@ -66,13 +68,6 @@ jarSets {
|
|||
}
|
||||
}
|
||||
|
||||
val config = project.configurations.register("flywheelForge") {
|
||||
isCanBeConsumed = true
|
||||
isCanBeResolved = false
|
||||
}
|
||||
|
||||
project.artifacts.add(config.name, jarSets.mainSet.remapJar)
|
||||
|
||||
defaultPackageInfos {
|
||||
sources(api, lib, backend, main)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,6 @@ loaderVersion = "[0,)"
|
|||
license = "${mod_license}"
|
||||
|
||||
[[mods]]
|
||||
modId = "${mod_id}_testmod"
|
||||
modId = "${flywheel_id}_testmod"
|
||||
version = "1.0.0"
|
||||
displayName = "${mod_name} Test Mod"
|
||||
displayName = "${flywheel_name} Test Mod"
|
||||
|
|
|
@ -73,6 +73,6 @@ dependencies {
|
|||
compileOnly(project(path = ":common", configuration = "vanillinResources"))
|
||||
|
||||
// JiJ flywheel proper
|
||||
include(project(path = ":fabric", configuration = "flywheelFabric"))
|
||||
modRuntimeOnly(project(path = ":fabric", configuration = "flywheelFabric"))
|
||||
include(project(path = ":fabric", configuration = "flywheelRemap"))
|
||||
runtimeOnly(project(path = ":fabric", configuration = "flywheelDev"))
|
||||
}
|
||||
|
|
|
@ -84,6 +84,6 @@ dependencies {
|
|||
compileOnly(project(path = ":common", configuration = "vanillinResources"))
|
||||
|
||||
// JiJ flywheel proper
|
||||
include(project(path = ":forge", configuration = "flywheelForge"))
|
||||
modRuntimeOnly(project(path = ":forge", configuration = "flywheelForge"))
|
||||
include(project(path = ":forge", configuration = "flywheelRemap"))
|
||||
runtimeOnly(project(path = ":forge", configuration = "flywheelDev"))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue