Build sources are engine room too

- Update buildSrc to use engine_room package
- Publish artifacts under engine_room
- Specify group in gradle.properties
This commit is contained in:
Jozufozu 2024-05-25 12:06:11 -07:00
parent a69389c175
commit 9593126d6e
12 changed files with 26 additions and 22 deletions

View File

@ -46,11 +46,12 @@ repositories {
} }
dependencies { dependencies {
compileOnly fg.deobf("com.jozufozu.flywheel:flywheel-forge-api-${minecraft_version}:${flywheel_version}") compileOnly fg.deobf("dev.engine_room.flywheel:flywheel-forge-api-${minecraft_version}:${flywheel_version}")
runtimeOnly fg.deobf("com.jozufozu.flywheel:flywheel-forge-${minecraft_version}:${flywheel_version}") runtimeOnly fg.deobf("dev.engine_room.flywheel:flywheel-forge-${minecraft_version}:${flywheel_version}")
} }
``` ```
`${flywheel_version}` gets replaced by the version of Flywheel you want to use, eg. `1.0.0-beta` `${flywheel_version}` gets replaced by the version of Flywheel you want to use, eg. `1.0.0-beta`
`${minecraft_version}` gets replaced by the version of Minecraft you're on, eg. `1.20.1` `${minecraft_version}` gets replaced by the version of Minecraft you're on, eg. `1.20.1`
For a list of available Flywheel versions, you can check [the maven](https://maven.tterrag.com/com/jozufozu/flywheel/Flywheel-Forge/). For a list of available Flywheel versions, you can check [the maven](https://maven.tterrag.com/com/jozufozu/flywheel/Flywheel-Forge/).

View File

@ -21,11 +21,11 @@ gradlePlugin {
plugins { plugins {
create("platformPlugin") { create("platformPlugin") {
id = "flywheel.platform" id = "flywheel.platform"
implementationClass = "com.jozufozu.gradle.platform.PlatformPlugin" implementationClass = "dev.engine_room.gradle.platform.PlatformPlugin"
} }
create("subprojectPlugin") { create("subprojectPlugin") {
id = "flywheel.subproject" id = "flywheel.subproject"
implementationClass = "com.jozufozu.gradle.subproject.SubprojectPlugin" implementationClass = "dev.engine_room.gradle.subproject.SubprojectPlugin"
} }
} }
} }

View File

@ -1,4 +1,4 @@
package com.jozufozu.gradle.jarset package dev.engine_room.gradle.jarset
import net.fabricmc.loom.task.RemapJarTask import net.fabricmc.loom.task.RemapJarTask
import net.fabricmc.loom.task.RemapSourcesJarTask import net.fabricmc.loom.task.RemapSourcesJarTask

View File

@ -1,4 +1,4 @@
package com.jozufozu.gradle.jarset package dev.engine_room.gradle.jarset
import net.fabricmc.loom.task.AbstractRemapJarTask import net.fabricmc.loom.task.AbstractRemapJarTask
import net.fabricmc.loom.task.RemapJarTask import net.fabricmc.loom.task.RemapJarTask

View File

@ -1,4 +1,4 @@
package com.jozufozu.gradle.nullability package dev.engine_room.gradle.nullability
import org.apache.groovy.nio.extensions.NioExtensions import org.apache.groovy.nio.extensions.NioExtensions
import org.codehaus.groovy.runtime.StringGroovyMethods import org.codehaus.groovy.runtime.StringGroovyMethods

View File

@ -1,4 +1,4 @@
package com.jozufozu.gradle.nullability package dev.engine_room.gradle.nullability
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.api.tasks.Delete import org.gradle.api.tasks.Delete

View File

@ -1,6 +1,6 @@
package com.jozufozu.gradle.platform package dev.engine_room.gradle.platform
import com.jozufozu.gradle.jarset.JarTaskSet import dev.engine_room.gradle.jarset.JarTaskSet
import net.fabricmc.loom.api.LoomGradleExtensionAPI import net.fabricmc.loom.api.LoomGradleExtensionAPI
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.api.tasks.SourceSet import org.gradle.api.tasks.SourceSet

View File

@ -1,4 +1,4 @@
package com.jozufozu.gradle.platform package dev.engine_room.gradle.platform
import org.gradle.api.Plugin import org.gradle.api.Plugin
import org.gradle.api.Project import org.gradle.api.Project

View File

@ -1,8 +1,8 @@
package com.jozufozu.gradle.subproject package dev.engine_room.gradle.subproject
import com.jozufozu.gradle.jarset.JarSetExtension import dev.engine_room.gradle.jarset.JarSetExtension
import com.jozufozu.gradle.nullability.PackageInfosExtension import dev.engine_room.gradle.nullability.PackageInfosExtension
import com.jozufozu.gradle.transitive.TransitiveSourceSetsExtension import dev.engine_room.gradle.transitive.TransitiveSourceSetsExtension
import net.fabricmc.loom.api.LoomGradleExtensionAPI import net.fabricmc.loom.api.LoomGradleExtensionAPI
import org.gradle.api.JavaVersion import org.gradle.api.JavaVersion
import org.gradle.api.Plugin import org.gradle.api.Plugin
@ -38,12 +38,14 @@ class SubprojectPlugin: Plugin<Project> {
val dev = System.getenv("RELEASE")?.contentEquals("false", true) ?: true val dev = System.getenv("RELEASE")?.contentEquals("false", true) ?: true
val buildNumber = System.getenv("BUILD_NUMBER") val buildNumber = System.getenv("BUILD_NUMBER")
val mod_version: String by project val versionSuffix = if (dev && buildNumber != null) "-${buildNumber}" else ""
project.group = "com.jozufozu.flywheel"
project.version = mod_version + if (dev && buildNumber != null) "-${buildNumber}" else ""
val artifact_minecraft_version: String by project project.group = project.property("group") as String
project.the<BasePluginExtension>().archivesName = "flywheel-${project.name}-${artifact_minecraft_version}" project.version = "${project.property("mod_version")}${versionSuffix}"
project.the<BasePluginExtension>().apply {
archivesName = "flywheel-${project.name}-${project.property("artifact_minecraft_version")}"
}
} }
@Suppress("UnstableApiUsage") @Suppress("UnstableApiUsage")

View File

@ -1,4 +1,4 @@
package com.jozufozu.gradle.transitive package dev.engine_room.gradle.transitive
import org.gradle.api.tasks.SourceSet import org.gradle.api.tasks.SourceSet

View File

@ -1,4 +1,4 @@
package com.jozufozu.gradle.transitive package dev.engine_room.gradle.transitive
import org.gradle.api.Action import org.gradle.api.Action
import org.gradle.api.Project import org.gradle.api.Project

View File

@ -36,4 +36,5 @@ embeddium_version = 0.3.9+mc1.20.1
oculus_version = 1.20.1-1.6.15a oculus_version = 1.20.1-1.6.15a
# Publication info # Publication info
group = dev.engine_room.flywheel
artifact_minecraft_version = 1.20.1 artifact_minecraft_version = 1.20.1