diff --git a/buildSrc/src/main/kotlin/dev/engine_room/gradle/jarset/JarSetExtension.kt b/buildSrc/src/main/kotlin/dev/engine_room/gradle/jarset/JarSetExtension.kt index 7f7eb2f7f..218984e20 100644 --- a/buildSrc/src/main/kotlin/dev/engine_room/gradle/jarset/JarSetExtension.kt +++ b/buildSrc/src/main/kotlin/dev/engine_room/gradle/jarset/JarSetExtension.kt @@ -13,10 +13,6 @@ open class JarSetExtension(private val project: Project) { return JarTaskSet.create(project, name, *sourceSetSet) } - fun outgoing(name: String, vararg sourceSetSet: SourceSet): JarTaskSet { - return JarTaskSet.create(project, name, *sourceSetSet).also { it.createOutgoingConfiguration() } - } - val mainSet: JarTaskSet by lazy { val jarTask = project.tasks.named("jar") val remapJarTask = project.tasks.named("remapJar") 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 0327683d5..03c30a11f 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,18 +41,6 @@ class JarTaskSet( } } - /** - * Create a new configuration that can be consumed by other projects, and export the base jar. - */ - fun createOutgoingConfiguration() { - 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/subproject/SubprojectExtension.kt b/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectExtension.kt new file mode 100644 index 000000000..29e3f7690 --- /dev/null +++ b/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectExtension.kt @@ -0,0 +1,182 @@ +package dev.engine_room.gradle.subproject + +import net.fabricmc.loom.api.LoomGradleExtensionAPI +import org.gradle.api.JavaVersion +import org.gradle.api.Project +import org.gradle.api.plugins.BasePluginExtension +import org.gradle.api.plugins.JavaPluginExtension +import org.gradle.api.publish.PublishingExtension +import org.gradle.api.publish.tasks.GenerateModuleMetadata +import org.gradle.api.tasks.bundling.AbstractArchiveTask +import org.gradle.api.tasks.compile.JavaCompile +import org.gradle.api.tasks.javadoc.Javadoc +import org.gradle.jvm.tasks.Jar +import org.gradle.jvm.toolchain.JavaLanguageVersion +import org.gradle.kotlin.dsl.* +import org.gradle.language.jvm.tasks.ProcessResources + +open class SubprojectExtension(val project: Project) { + fun init(group: String, version: String) { + setBaseProperties(group, version) + setupJava() + addRepositories() + setupLoom() + setupDependencies() + configureTasks() + setupPublishing() + } + + private fun setBaseProperties(group: String, version: String) { + val dev = System.getenv("RELEASE")?.contentEquals("false", true) ?: true + val buildNumber = System.getenv("BUILD_NUMBER") + + val versionSuffix = if (dev && buildNumber != null) "-${buildNumber}" else "" + + project.group = group + project.version = "${version}${versionSuffix}" + + project.the().apply { + archivesName = "flywheel-${project.name}-${project.property("artifact_minecraft_version")}" + } + } + + private fun setupLoom() { + val loom = project.the() + loom.silentMojangMappingsLicense() + } + + private fun setupJava() { + val java_version: String by project + + project.the().apply { + val javaVersion = JavaVersion.toVersion(java_version) + sourceCompatibility = javaVersion + targetCompatibility = javaVersion + + toolchain.languageVersion = JavaLanguageVersion.of(java_version) + + withSourcesJar() + withJavadocJar() + } + } + + private fun addRepositories() { + project.repositories.apply { + mavenCentral() + maven("https://maven.parchmentmc.org") { + name = "ParchmentMC" + } + maven("https://maven.tterrag.com/") { + name = "tterrag maven" + } + maven("https://www.cursemaven.com") { + name = "CurseMaven" + content { + includeGroup("curse.maven") + } + } + maven("https://api.modrinth.com/maven") { + name = "Modrinth" + content { + includeGroup("maven.modrinth") + } + } + } + } + + @Suppress("UnstableApiUsage") + private fun setupDependencies() { + project.dependencies.apply { + val minecraft_version: String by project + val parchment_minecraft_version: String by project + val parchment_version: String by project + val loom = project.the() + + add("minecraft", "com.mojang:minecraft:${minecraft_version}") + + add("mappings", loom.layered { + officialMojangMappings() + parchment("org.parchmentmc.data:parchment-${parchment_minecraft_version}:${parchment_version}@zip") + }) + + add("api", "com.google.code.findbugs:jsr305:3.0.2") + } + } + + private fun configureTasks() { + val java_version: String by project + + project.tasks.apply { + // make builds reproducible + withType().configureEach { + isPreserveFileTimestamps = false + isReproducibleFileOrder = true + } + + // module metadata is often broken on multi-platform projects + withType().configureEach { + enabled = false + } + + withType().configureEach { + options.encoding = "UTF-8" + options.release = Integer.parseInt(java_version) + options.compilerArgs.add("-Xdiags:verbose") + } + + withType().configureEach { + from("${project.rootDir}/LICENSE.md") { + into("META-INF") + } + } + + withType().configureEach { + options.optionFiles(project.rootProject.file("javadoc-options.txt")) + options.encoding = "UTF-8" + } + + val replaceProperties = processResourcesExpandProperties.associateWith { project.property(it) as String } + + withType().configureEach { + inputs.properties(replaceProperties) + + filesMatching(processResourcesExpandFiles) { + expand(replaceProperties) + } + } + } + } + + private fun setupPublishing() { + project.the().repositories.apply { + maven("file://${project.rootProject.projectDir}/mcmodsrepo") + + if (project.hasProperty("mavendir")) { + maven(project.rootProject.file(project.property("mavendir") as String)) + } + } + } +} + +val processResourcesExpandFiles = listOf("pack.mcmeta", "fabric.mod.json", "META-INF/mods.toml") + +val processResourcesExpandProperties = listOf( + "mod_license", + "mod_sources", + "mod_issues", + "mod_homepage", + "flywheel_id", + "flywheel_name", + "flywheel_description", + "flywheel_version", + "vanillin_id", + "vanillin_name", + "vanillin_version", + "vanillin_description", + "flywheel_maven_version_range", + "flywheel_semver_version_range", + "minecraft_semver_version_range", + "minecraft_maven_version_range", + "fabric_api_version_range", + "forge_version_range", +) diff --git a/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt b/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt index 8fa4ff4d4..8a22ae7c1 100644 --- a/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt +++ b/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt @@ -3,189 +3,14 @@ package dev.engine_room.gradle.subproject import dev.engine_room.gradle.jarset.JarSetExtension import dev.engine_room.gradle.nullability.PackageInfosExtension import dev.engine_room.gradle.transitive.TransitiveSourceSetsExtension -import net.fabricmc.loom.api.LoomGradleExtensionAPI -import org.gradle.api.JavaVersion import org.gradle.api.Plugin import org.gradle.api.Project -import org.gradle.api.plugins.BasePluginExtension -import org.gradle.api.plugins.JavaPluginExtension -import org.gradle.api.publish.PublishingExtension -import org.gradle.api.publish.tasks.GenerateModuleMetadata -import org.gradle.api.tasks.bundling.AbstractArchiveTask -import org.gradle.api.tasks.compile.JavaCompile -import org.gradle.api.tasks.javadoc.Javadoc -import org.gradle.jvm.tasks.Jar -import org.gradle.jvm.toolchain.JavaLanguageVersion -import org.gradle.kotlin.dsl.* -import org.gradle.language.jvm.tasks.ProcessResources class SubprojectPlugin: Plugin { override fun apply(project: Project) { project.extensions.create("defaultPackageInfos", PackageInfosExtension::class.java, project) project.extensions.create("transitiveSourceSets", TransitiveSourceSetsExtension::class.java, project) project.extensions.create("jarSets", JarSetExtension::class.java, project) - - setBaseProperties(project) - setupJava(project) - addRepositories(project) - setupLoom(project) - setupDependencies(project) - configureTasks(project) - setupPublishing(project) - } - - private fun setBaseProperties(project: Project) { - val dev = System.getenv("RELEASE")?.contentEquals("false", true) ?: true - val buildNumber = System.getenv("BUILD_NUMBER") - - val versionSuffix = if (dev && buildNumber != null) "-${buildNumber}" else "" - - project.group = project.property("group") as String - project.version = "${project.property("mod_version")}${versionSuffix}" - - project.the().apply { - archivesName = "flywheel-${project.name}-${project.property("artifact_minecraft_version")}" - } - } - - private fun setupLoom(project: Project) { - val loom = project.the() - loom.silentMojangMappingsLicense() - } - - private fun setupJava(project: Project) { - val java_version: String by project - - project.the().apply { - val javaVersion = JavaVersion.toVersion(java_version) - sourceCompatibility = javaVersion - targetCompatibility = javaVersion - - toolchain.languageVersion = JavaLanguageVersion.of(java_version) - - withSourcesJar() - withJavadocJar() - } - } - - private fun addRepositories(project: Project) { - project.repositories.apply { - mavenCentral() - maven("https://maven.parchmentmc.org") { - name = "ParchmentMC" - } - maven("https://maven.tterrag.com/") { - name = "tterrag maven" - } - maven("https://www.cursemaven.com") { - name = "CurseMaven" - content { - includeGroup("curse.maven") - } - } - maven("https://api.modrinth.com/maven") { - name = "Modrinth" - content { - includeGroup("maven.modrinth") - } - } - } - } - - @Suppress("UnstableApiUsage") - private fun setupDependencies(project: Project) { - project.dependencies.apply { - val minecraft_version: String by project - val parchment_minecraft_version: String by project - val parchment_version: String by project - val loom = project.the() - - add("minecraft", "com.mojang:minecraft:${minecraft_version}") - - add("mappings", loom.layered { - officialMojangMappings() - parchment("org.parchmentmc.data:parchment-${parchment_minecraft_version}:${parchment_version}@zip") - }) - - add("api", "com.google.code.findbugs:jsr305:3.0.2") - } - } - - private fun configureTasks(project: Project) { - val java_version: String by project - - project.tasks.apply { - // make builds reproducible - withType().configureEach { - isPreserveFileTimestamps = false - isReproducibleFileOrder = true - } - - // module metadata is often broken on multi-platform projects - withType().configureEach { - enabled = false - } - - withType().configureEach { - options.encoding = "UTF-8" - options.release = Integer.parseInt(java_version) - options.compilerArgs.add("-Xdiags:verbose") - } - - withType().configureEach { - from("${project.rootDir}/LICENSE.md") { - into("META-INF") - } - } - - withType().configureEach { - options.optionFiles(project.rootProject.file("javadoc-options.txt")) - options.encoding = "UTF-8" - } - - val replaceProperties = processResourcesExpandProperties.associateWith { project.property(it) as String } - - withType().configureEach { - inputs.properties(replaceProperties) - - filesMatching(processResourcesExpandFiles) { - expand(replaceProperties) - } - } - } - } - - private fun setupPublishing(project: Project) { - project.the().repositories.apply { - maven("file://${project.rootProject.projectDir}/mcmodsrepo") - - if (project.hasProperty("mavendir")) { - maven(project.rootProject.file(project.property("mavendir") as String)) - } - } + project.extensions.create("subproject", SubprojectExtension::class.java, project) } } - -val processResourcesExpandFiles = listOf("pack.mcmeta", "fabric.mod.json", "META-INF/mods.toml") - -val processResourcesExpandProperties = listOf( - "mod_id", - "mod_name", - "mod_description", - "mod_license", - "mod_sources", - "mod_issues", - "mod_homepage", - "mod_version", - "minecraft_semver_version_range", - "minecraft_maven_version_range", - "fabric_api_version_range", - "forge_version_range", - "vanillin_id", - "vanillin_name", - "vanillin_version", - "vanillin_description", - "flywheel_maven_version_range", - "flywheel_semver_version_range", -) - diff --git a/buildSrc/src/main/kotlin/dev/engine_room/gradle/transitive/TransitiveSourceSetConfigurator.kt b/buildSrc/src/main/kotlin/dev/engine_room/gradle/transitive/TransitiveSourceSetConfigurator.kt index c2c69f2ce..7d043ebf1 100644 --- a/buildSrc/src/main/kotlin/dev/engine_room/gradle/transitive/TransitiveSourceSetConfigurator.kt +++ b/buildSrc/src/main/kotlin/dev/engine_room/gradle/transitive/TransitiveSourceSetConfigurator.kt @@ -1,6 +1,9 @@ package dev.engine_room.gradle.transitive import org.gradle.api.tasks.SourceSet +import org.gradle.api.tasks.compile.JavaCompile +import org.gradle.kotlin.dsl.named +import org.gradle.language.jvm.tasks.ProcessResources class TransitiveSourceSetConfigurator(private val parent: TransitiveSourceSetsExtension, private val sourceSet: SourceSet) { internal val compileSourceSets = mutableSetOf() @@ -37,4 +40,35 @@ class TransitiveSourceSetConfigurator(private val parent: TransitiveSourceSetsEx compile(*sourceSets) runtime(*sourceSets) } + + fun outgoing() { + outgoingClasses() + outgoingResources() + } + + fun outgoingResources() { + val project = parent.project + val exportResources = project.configurations.register("${sourceSet.name}Resources") { + isCanBeResolved = false + isCanBeConsumed = true + } + val processResources = project.tasks.named(sourceSet.processResourcesTaskName).get() + + project.artifacts.add(exportResources.name, processResources.destinationDir) { + builtBy(processResources) + } + } + + fun outgoingClasses() { + val project = parent.project + val exportClasses = project.configurations.register("${sourceSet.name}Classes") { + isCanBeResolved = false + isCanBeConsumed = true + } + + val compileTask = project.tasks.named(sourceSet.compileJavaTaskName).get() + project.artifacts.add(exportClasses.name, compileTask.destinationDirectory) { + builtBy(compileTask) + } + } } diff --git a/buildSrc/src/main/kotlin/dev/engine_room/gradle/transitive/TransitiveSourceSetsExtension.kt b/buildSrc/src/main/kotlin/dev/engine_room/gradle/transitive/TransitiveSourceSetsExtension.kt index 05fa4dc46..2fb1478e7 100644 --- a/buildSrc/src/main/kotlin/dev/engine_room/gradle/transitive/TransitiveSourceSetsExtension.kt +++ b/buildSrc/src/main/kotlin/dev/engine_room/gradle/transitive/TransitiveSourceSetsExtension.kt @@ -5,7 +5,7 @@ import org.gradle.api.Project import org.gradle.api.file.FileCollection import org.gradle.api.tasks.SourceSet -open class TransitiveSourceSetsExtension(private val project: Project) { +open class TransitiveSourceSetsExtension(val project: Project) { var compileClasspath: FileCollection? = null var runtimeClasspath: FileCollection? = null diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 84d63c41c..af237a959 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -6,6 +6,8 @@ plugins { id("flywheel.subproject") } +subproject.init(property("flywheel_group") as String, property("flywheel_version") as String) + val api = sourceSets.create("api") val lib = sourceSets.create("lib") val backend = sourceSets.create("backend") @@ -18,20 +20,25 @@ transitiveSourceSets { sourceSet(api) { rootCompile() + outgoingClasses() } sourceSet(lib) { rootCompile() compile(api) + outgoing() } sourceSet(backend) { rootCompile() compile(api, lib) + outgoing() } sourceSet(stubs) { rootCompile() + outgoingClasses() } sourceSet(main) { compile(api, lib, backend, stubs) + outgoing() } sourceSet(sourceSets.getByName("test")) { implementation(api, lib, backend) @@ -39,6 +46,7 @@ transitiveSourceSets { sourceSet(vanillin) { rootCompile() compile(api, lib) + outgoing() } } @@ -47,14 +55,6 @@ defaultPackageInfos { } jarSets { - // For sharing with other subprojects. - outgoing("commonApiOnly", api) - outgoing("commonLib", lib) - outgoing("commonBackend", backend) - outgoing("commonStubs", stubs) - outgoing("commonImpl", main) - outgoing("commonVanillin", vanillin) - // For publishing. create("api", api, lib).apply { addToAssemble() diff --git a/common/src/vanillin/resources/logo.png b/common/src/vanillin/resources/logo.png new file mode 100644 index 000000000..f704c5629 Binary files /dev/null and b/common/src/vanillin/resources/logo.png differ diff --git a/fabric/build.gradle.kts b/fabric/build.gradle.kts index 6f2a7745e..1dee675de 100644 --- a/fabric/build.gradle.kts +++ b/fabric/build.gradle.kts @@ -7,6 +7,8 @@ plugins { id("flywheel.platform") } +subproject.init(property("flywheel_group") as String, property("flywheel_version") as String) + val api = sourceSets.create("api") val lib = sourceSets.create("lib") val backend = sourceSets.create("backend") @@ -91,9 +93,13 @@ dependencies { modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}") - "forApi"(project(path = ":common", configuration = "commonApiOnly")) - "forLib"(project(path = ":common", configuration = "commonLib")) - "forBackend"(project(path = ":common", configuration = "commonBackend")) - "forStubs"(project(path = ":common", configuration = "commonStubs")) - "forMain"(project(path = ":common", configuration = "commonImpl")) + "forApi"(project(path = ":common", configuration = "apiClasses")) + "forLib"(project(path = ":common", configuration = "libClasses")) + "forBackend"(project(path = ":common", configuration = "backendClasses")) + "forStubs"(project(path = ":common", configuration = "stubsClasses")) + "forMain"(project(path = ":common", configuration = "mainClasses")) + + "forLib"(project(path = ":common", configuration = "libResources")) + "forBackend"(project(path = ":common", configuration = "backendResources")) + "forMain"(project(path = ":common", configuration = "mainResources")) } diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index d90f772c9..8e4687393 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -1,9 +1,9 @@ { "schemaVersion": 1, - "id": "${mod_id}", - "version": "${mod_version}", - "name": "${mod_name}", - "description": "${mod_description}", + "id" : "${flywheel_id}", + "version" : "${flywheel_version}", + "name" : "${flywheel_name}", + "description" : "${flywheel_description}", "authors": [ "Jozufozu", "PepperCode1" diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts index 6b1959a84..f3de6800b 100644 --- a/forge/build.gradle.kts +++ b/forge/build.gradle.kts @@ -7,6 +7,8 @@ plugins { id("flywheel.platform") } +subproject.init(property("flywheel_group") as String, property("flywheel_version") as String) + val api = sourceSets.create("api") val lib = sourceSets.create("lib") val backend = sourceSets.create("backend") @@ -100,9 +102,13 @@ dependencies { modCompileOnly("maven.modrinth:embeddium:${property("embeddium_version")}") - "forApi"(project(path = ":common", configuration = "commonApiOnly")) - "forLib"(project(path = ":common", configuration = "commonLib")) - "forBackend"(project(path = ":common", configuration = "commonBackend")) - "forStubs"(project(path = ":common", configuration = "commonStubs")) - "forMain"(project(path = ":common", configuration = "commonImpl")) + "forApi"(project(path = ":common", configuration = "apiClasses")) + "forLib"(project(path = ":common", configuration = "libClasses")) + "forBackend"(project(path = ":common", configuration = "backendClasses")) + "forStubs"(project(path = ":common", configuration = "stubsClasses")) + "forMain"(project(path = ":common", configuration = "mainClasses")) + + "forLib"(project(path = ":common", configuration = "libResources")) + "forBackend"(project(path = ":common", configuration = "backendResources")) + "forMain"(project(path = ":common", configuration = "mainResources")) } diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index 766bbfe9f..b41d47516 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -5,34 +5,34 @@ license = "${mod_license}" issueTrackerURL = "${mod_issues}" [[mods]] -modId = "${mod_id}" -version = "${mod_version}" -displayName = "${mod_name}" -description = "${mod_description}" +modId = "${flywheel_id}" +version = "${flywheel_version}" +displayName = "${flywheel_name}" +description = "${flywheel_description}" logoFile = "logo.png" authors = "Jozufozu, PepperCode1" displayURL = "${mod_homepage}" displayTest = "IGNORE_ALL_VERSION" -[[dependencies.${mod_id}]] +[[dependencies.${ flywheel_id }]] modId = "minecraft" mandatory = true versionRange = "${minecraft_maven_version_range}" side = "CLIENT" -[[dependencies.${mod_id}]] +[[dependencies.${ flywheel_id }]] modId = "forge" mandatory = true versionRange = "${forge_version_range}" side = "CLIENT" -[[dependencies.${mod_id}]] +[[dependencies.${ flywheel_id }]] modId = "embeddium" mandatory = false versionRange = "[0.3.25,)" side = "CLIENT" -[[dependencies.${mod_id}]] +[[dependencies.${ flywheel_id }]] modId = "sodium" mandatory = false versionRange = "[0.6.0-beta.2,)" diff --git a/forge/src/main/resources/pack.mcmeta b/forge/src/main/resources/pack.mcmeta index ae03c9b7f..9db28873e 100644 --- a/forge/src/main/resources/pack.mcmeta +++ b/forge/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "description": "${mod_name} resources", + "description": "${flywheel_name} resources", "pack_format": 15 } } diff --git a/gradle.properties b/gradle.properties index 1741bed76..0bc337a5d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,19 +1,21 @@ org.gradle.jvmargs = -Xmx3G org.gradle.daemon = false - -# Mod metadata -mod_id = flywheel -mod_name = Flywheel -mod_version = 1.0.0-beta -mod_description = An overhauled entity and block entity rendering API. +# Common metadata mod_license = MIT mod_sources = https://github.com/Engine-Room/Flywheel mod_issues = https://github.com/Engine-Room/Flywheel/issues mod_homepage = https://github.com/Engine-Room/Flywheel +# Flywheel metadata +flywheel_id=flywheel +flywheel_name=Flywheel +flywheel_version=1.0.0-beta +flywheel_description=An overhauled entity and block entity rendering API. +# Vanillin metadata vanillin_id=vanillin vanillin_name=Vanillin vanillin_version=1.0.0-beta vanillin_description=Instanced rendering for entities and block entities via Flywheel. +# Vanillin dependencies flywheel_maven_version_range=[1.0.0-beta,2.0) flywheel_semver_version_range=>=1.0.0-beta <2.0.0 @@ -41,5 +43,6 @@ sodium_version = mc1.20.1-0.5.11 embeddium_version = 0.3.25+mc1.20.1 # Publication info -group = dev.engine_room.flywheel +flywheel_group=dev.engine_room.flywheel +vanillin_group=dev.engine_room.vanillin artifact_minecraft_version = 1.20.1 diff --git a/vanillinFabric/build.gradle.kts b/vanillinFabric/build.gradle.kts index 84adeef1e..fa9184276 100644 --- a/vanillinFabric/build.gradle.kts +++ b/vanillinFabric/build.gradle.kts @@ -10,7 +10,7 @@ plugins { id("flywheel.platform") } -group = "dev.engine_room.vanillin" +subproject.init(property("vanillin_group") as String, property("vanillin_version") as String) val main = sourceSets.getByName("main") @@ -69,7 +69,10 @@ dependencies { modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}") - compileOnly(project(path = ":common", configuration = "commonVanillin")) + compileOnly(project(path = ":common", configuration = "vanillinClasses")) + compileOnly(project(path = ":common", configuration = "vanillinResources")) + + // JiJ flywheel proper include(project(path = ":fabric", configuration = "flywheelFabric")) modRuntimeOnly(project(path = ":fabric", configuration = "flywheelFabric")) } diff --git a/vanillinFabric/src/main/resources/fabric.mod.json b/vanillinFabric/src/main/resources/fabric.mod.json index fd50a6f89..3dd5c0342 100644 --- a/vanillinFabric/src/main/resources/fabric.mod.json +++ b/vanillinFabric/src/main/resources/fabric.mod.json @@ -27,7 +27,7 @@ "minecraft" : "${minecraft_semver_version_range}", "fabricloader" : ">=0.15.0", "fabric-api" : "${fabric_api_version_range}", - "${mod_id}" : "${flywheel_semver_version_range}" + "${flywheel_id}" : "${flywheel_semver_version_range}" }, "breaks" : { } diff --git a/vanillinForge/build.gradle.kts b/vanillinForge/build.gradle.kts index 0c72d0ef9..270b68aee 100644 --- a/vanillinForge/build.gradle.kts +++ b/vanillinForge/build.gradle.kts @@ -10,7 +10,7 @@ plugins { id("flywheel.platform") } -group = "dev.engine_room.vanillin" +subproject.init(property("vanillin_group") as String, property("vanillin_version") as String) val main = sourceSets.getByName("main") @@ -80,7 +80,10 @@ dependencies { modCompileOnly("maven.modrinth:embeddium:${property("embeddium_version")}") - compileOnly(project(path = ":common", configuration = "commonVanillin")) + compileOnly(project(path = ":common", configuration = "vanillinClasses")) + compileOnly(project(path = ":common", configuration = "vanillinResources")) + + // JiJ flywheel proper include(project(path = ":forge", configuration = "flywheelForge")) modRuntimeOnly(project(path = ":forge", configuration = "flywheelForge")) } diff --git a/vanillinForge/src/main/resources/META-INF/mods.toml b/vanillinForge/src/main/resources/META-INF/mods.toml index b550c343b..dd213eb6b 100644 --- a/vanillinForge/src/main/resources/META-INF/mods.toml +++ b/vanillinForge/src/main/resources/META-INF/mods.toml @@ -27,7 +27,7 @@ versionRange = "${forge_version_range}" side = "CLIENT" [[dependencies.${ vanillin_id }]] -modId = "${mod_id}" +modId = "${flywheel_id}" mandatory = true versionRange = "${flywheel_maven_version_range}" side = "CLIENT" diff --git a/vanillinForge/src/main/resources/pack.mcmeta b/vanillinForge/src/main/resources/pack.mcmeta index d9e46396e..0d29ea3f1 100644 --- a/vanillinForge/src/main/resources/pack.mcmeta +++ b/vanillinForge/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "description": "${mod_name} resources", + "description": "${vanillin_name} resources", "pack_format": 15 } }