Skip to content

Commit

Permalink
Improve published appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobkmar committed Jan 18, 2022
1 parent b5aaba8 commit b99d820
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
15 changes: 14 additions & 1 deletion buildSrc/src/main/kotlin/mod-build-script.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ data class FabricModConfiguration(
val contact: Contact,
val license: String,
val icon: String? = null,
val custom: Custom? = null,
) {
@Serializable
data class Contact(
Expand All @@ -51,12 +52,23 @@ data class FabricModConfiguration(
val adapter: String,
val value: String,
)

@Serializable
data class Custom(
val modmenu: ModMenu? = null,
) {
@Serializable
data class ModMenu(
val parent: String,
)
}
}

val modName: String by extra
val modEntrypoints: LinkedHashMap<String, List<String>>? by extra(null)
val modMixinFiles: List<String>? by extra(null)
val modDepends: LinkedHashMap<String, String>? by extra(null)
val isModParent by extra(false)

tasks {
val modDotJsonTask = register("modDotJson") {
Expand All @@ -83,7 +95,8 @@ tasks {
"https://discord.gg/CJDUVuJ"
),
"GPL-3.0-or-later",
if (project.name.endsWith("-all")) "assets/${project.name}/icon.png" else null
if (project.name.endsWith("-all")) "assets/${project.name}/icon.png" else null,
if (isModParent) null else FabricModConfiguration.Custom(FabricModConfiguration.Custom.ModMenu("fabrikmc-all")),
)

val modDotJson = buildDir.resolve("resources/main/fabric.mod.json")
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/project-publish-script.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ publishing {

licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
name.set("GNU General Public License 3")
url.set("https://www.gnu.org/licenses/gpl-3.0.txt")
}
}

Expand Down
1 change: 1 addition & 0 deletions fabrikmc-all/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ dependencies {
}

val modName by extra("$projectTitle (All modules)")
val isModParent by extra(true)

0 comments on commit b99d820

Please sign in to comment.