diff --git a/buildSrc/src/main/kotlin/dev/engine_room/gradle/jarset/JarTaskSet.kt b/buildSrc/src/main/kotlin/dev/engine_room/gradle/jarset/JarTaskSet.kt index 03c30a11f..da7fa4e1b 100644 --- a/buildSrc/src/main/kotlin/dev/engine_room/gradle/jarset/JarTaskSet.kt +++ b/buildSrc/src/main/kotlin/dev/engine_room/gradle/jarset/JarTaskSet.kt @@ -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. */ diff --git a/buildSrc/src/main/kotlin/dev/engine_room/gradle/platform/PlatformExtension.kt b/buildSrc/src/main/kotlin/dev/engine_room/gradle/platform/PlatformExtension.kt index 55b0d12ac..76f1b175e 100644 --- a/buildSrc/src/main/kotlin/dev/engine_room/gradle/platform/PlatformExtension.kt +++ b/buildSrc/src/main/kotlin/dev/engine_room/gradle/platform/PlatformExtension.kt @@ -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 = diff --git a/fabric/build.gradle.kts b/fabric/build.gradle.kts index 1dee675de..8392678c3 100644 --- a/fabric/build.gradle.kts +++ b/fabric/build.gradle.kts @@ -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) } diff --git a/fabric/src/testMod/resources/fabric.mod.json b/fabric/src/testMod/resources/fabric.mod.json index 11bd545a1..f8c0b82c3 100644 --- a/fabric/src/testMod/resources/fabric.mod.json +++ b/fabric/src/testMod/resources/fabric.mod.json @@ -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}", diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts index f3de6800b..fb03838f2 100644 --- a/forge/build.gradle.kts +++ b/forge/build.gradle.kts @@ -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) } diff --git a/forge/src/testMod/resources/META-INF/mods.toml b/forge/src/testMod/resources/META-INF/mods.toml index 4d76a503e..20235395d 100644 --- a/forge/src/testMod/resources/META-INF/mods.toml +++ b/forge/src/testMod/resources/META-INF/mods.toml @@ -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" diff --git a/vanillinFabric/build.gradle.kts b/vanillinFabric/build.gradle.kts index fa9184276..3b59ceb16 100644 --- a/vanillinFabric/build.gradle.kts +++ b/vanillinFabric/build.gradle.kts @@ -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")) } diff --git a/vanillinForge/build.gradle.kts b/vanillinForge/build.gradle.kts index 270b68aee..26a7b2e30 100644 --- a/vanillinForge/build.gradle.kts +++ b/vanillinForge/build.gradle.kts @@ -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")) }