Skip to content

Commit

Permalink
Merge pull request #133 from FairyProject/fix/bukkit-yml
Browse files Browse the repository at this point in the history
fix: Fixed bukkit-yml not properly generating when bukkit-bootstrap exists
  • Loading branch information
LeeGodSRC authored Mar 2, 2024
2 parents a090fbf + 333eff4 commit 0c44fce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ class FairyResourceBukkitMeta : FairyResource {
fairyExtension: FairyExtension,
classMapper: Map<ClassType, ClassInfo>
): ResourceInfo? {
val hasBukkitPlatform = project.configurations.flatMap { it.dependencies }.any {
it.isClassBukkitPlatform()
val hasBukkit = project.configurations.flatMap { it.dependencies }.any {
it.hasBukkitPlatform
}
if (!hasBukkitPlatform)
if (!hasBukkit)
return null

classMapper[ClassType.BUKKIT_PLUGIN] ?: return null
Expand All @@ -40,7 +40,7 @@ class FairyResourceBukkitMeta : FairyResource {
return resourceOf("plugin.yml", stringJoiner.toString().encodeToByteArray())
}

private fun Dependency.isClassBukkitPlatform() =
group == "io.fairyproject" &&
(name == "bukkit-platform" || name == "bukkit-bundles")
private val Dependency.hasBukkitPlatform
get() = group == "io.fairyproject" &&
(name == "bukkit-platform" || name == "bukkit-bundles" || name == "bukkit-bootstrap")
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#

# Fairy
fairy.version = 0.7.0b4-SNAPSHOT
fairy.version = 0.7.0b5-SNAPSHOT
gradle-plugin.version = 1.2.0b9

mongojack.version = 4.2.0
Expand Down

0 comments on commit 0c44fce

Please sign in to comment.