mirror of
https://github.com/GayPizzaSpecifications/concrete.git
synced 2025-08-03 13:11:33 +00:00
Fix bug in update manifest generation.
This commit is contained in:
@ -19,7 +19,7 @@ data class ExtensibleManifestItem(
|
|||||||
*/
|
*/
|
||||||
val name: String,
|
val name: String,
|
||||||
/**
|
/**
|
||||||
* The type of item, for example "bukkit-plugin"
|
* The type of item.
|
||||||
*/
|
*/
|
||||||
val type: String,
|
val type: String,
|
||||||
/**
|
/**
|
||||||
@ -33,7 +33,7 @@ data class ExtensibleManifestItem(
|
|||||||
/**
|
/**
|
||||||
* The files that are required to install the item.
|
* The files that are required to install the item.
|
||||||
*/
|
*/
|
||||||
val files: List<String>
|
val files: List<ExtensibleManifestItemFile>
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,7 +45,7 @@ data class ExtensibleManifestItemFile(
|
|||||||
*/
|
*/
|
||||||
val name: String,
|
val name: String,
|
||||||
/**
|
/**
|
||||||
* A type of file. For example: "plugin-jar".
|
* A type of file.
|
||||||
*/
|
*/
|
||||||
val type: String,
|
val type: String,
|
||||||
/**
|
/**
|
||||||
|
@ -4,6 +4,7 @@ import org.gradle.api.DefaultTask
|
|||||||
import org.gradle.api.tasks.TaskAction
|
import org.gradle.api.tasks.TaskAction
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
|
import kotlin.io.path.name
|
||||||
|
|
||||||
open class UpdateManifestTask : DefaultTask() {
|
open class UpdateManifestTask : DefaultTask() {
|
||||||
@TaskAction
|
@TaskAction
|
||||||
@ -33,7 +34,17 @@ open class UpdateManifestTask : DefaultTask() {
|
|||||||
type = "bukkit-plugin",
|
type = "bukkit-plugin",
|
||||||
version = project.version.toString(),
|
version = project.version.toString(),
|
||||||
dependencies = dependencies,
|
dependencies = dependencies,
|
||||||
files = paths.map { it.toUnixString() }
|
files = paths.map { path ->
|
||||||
|
var type = "unknown"
|
||||||
|
if (path.name.endsWith("-plugin.jar")) {
|
||||||
|
type = "plugin-jar"
|
||||||
|
}
|
||||||
|
ExtensibleManifestItemFile(
|
||||||
|
name = path.name,
|
||||||
|
type = type,
|
||||||
|
path = path.toUnixString()
|
||||||
|
)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user