Skip to content

Commit

Permalink
feat: Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
phinner committed Jun 11, 2024
1 parent 4086974 commit f3f4e2a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# template-plugin

[![Build status](https://github.com/xpdustry/template-plugin/actions/workflows/build.yml/badge.svg?branch=master&event=push)](https://github.com/xpdustry/template-plugin/actions/workflows/build.yml)
[![Mindustry 7.0 ](https://img.shields.io/badge/Mindustry-7.0-ffd37f)](https://github.com/Anuken/Mindustry/releases)
[![Mindustry 7.0](https://img.shields.io/badge/Mindustry-7.0-ffd37f)](https://github.com/Anuken/Mindustry/releases)

Get your Mindustry plugin started with this awesome template repository, it features:

Expand Down
12 changes: 7 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,25 @@ indra {
}
}

val generateResources by tasks.registering {
outputs.files(fileTree(temporaryDir))
val generateMetadataFile by tasks.registering {
inputs.property("metadata", metadata)
val output = temporaryDir.resolve("plugin.json")
outputs.file(output)
doLast {
temporaryDir.resolve("plugin.json").writeText(ModMetadata.toJson(metadata))
output.writeText(ModMetadata.toJson(metadata))
}
}

tasks.shadowJar {
archiveFileName = "${metadata.name}.jar"
archiveClassifier = "plugin"
from(generateResources)
from(generateMetadataFile)
from(rootProject.file("LICENSE.md")) { into("META-INF") }
minimize()
}

tasks.register<Copy>("release") {
dependsOn(tasks.build)
from(tasks.shadowJar)
into(temporaryDir)
destinationDir = temporaryDir
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version = "1.0"
# plugins
shadow = "8.1.1"
indra = "3.1.3"
toxopid = "4.0.0"
toxopid = "4.0.1"

[plugins]
indra-common = { id = "net.kyori.indra", version.ref = "indra" }
Expand Down

0 comments on commit f3f4e2a

Please sign in to comment.