-
-
Notifications
You must be signed in to change notification settings - Fork 0
refactor!: complete rewrite of DoubleJump plugin #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| plugins { | ||
| `kotlin-dsl` | ||
| } | ||
|
|
||
| repositories { | ||
| gradlePluginPortal() | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation("com.gradleup.shadow:shadow-gradle-plugin:9.3.2") | ||
| implementation("net.minecrell:plugin-yml:0.6.0") | ||
| } | ||
|
|
||
| sourceSets { | ||
| main { | ||
| java.setSrcDirs(emptyList<String>()) | ||
| groovy.setSrcDirs(emptyList<String>()) | ||
| resources.setSrcDirs(emptyList<String>()) | ||
| } | ||
| test { | ||
| java.setSrcDirs(emptyList<String>()) | ||
| kotlin.setSrcDirs(emptyList<String>()) | ||
| groovy.setSrcDirs(emptyList<String>()) | ||
| resources.setSrcDirs(emptyList<String>()) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| object Versions { | ||
|
|
||
| const val SPIGOT_API = "1.21.11-R0.1-SNAPSHOT" | ||
|
|
||
| const val ETERNAL_COMBAT = "2.4.0" | ||
| const val WORLDGUARD_API = "7.0.9" | ||
| const val WORLDEDIT = "3ISh7ADm" | ||
| const val WORLDGUARD = "7.0.15-beta-01" | ||
| const val PACKETEVENTS = "2.11.2" | ||
|
|
||
| const val PANDA_DI = "1.8.0" | ||
| const val CLASSGRAPH = "4.8.184" | ||
|
|
||
| const val KYORI_PLATFORM_BUKKIT = "4.4.1" | ||
| const val KYORI_TEXT_MINIMESSAGE = "4.21.0" | ||
|
|
||
| const val MULTIFICATION_BUKKIT = "1.2.4" | ||
| const val MULTIFICATION_OKAERI = "1.2.4" | ||
|
|
||
| const val OKAERI_SNAKEYAML = "5.0.9" | ||
| const val OKAERI_SERDES_COMMONS = "5.0.5" | ||
|
|
||
| const val TRIUMPH_GUI = "3.1.13" | ||
| const val BSTATS_BUKKIT = "3.1.0" | ||
| const val LITECOMMANDS = "3.10.9" | ||
|
|
||
| const val LIBBY_BUKKIT = "2.0.0-SNAPSHOT" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| plugins { | ||
| `java-library` | ||
| } | ||
|
|
||
| dependencies { | ||
| testImplementation("org.junit.jupiter:junit-jupiter:6.0.2") | ||
| testImplementation("org.assertj:assertj-core:3.27.6") | ||
| testImplementation("org.mockito:mockito-core:5.21.0") | ||
| testImplementation("org.mockito:mockito-junit-jupiter:5.21.0") | ||
| testImplementation("org.mockito:mockito-inline:5.2.0") | ||
| testRuntimeOnly("org.junit.platform:junit-platform-launcher") | ||
| } | ||
|
|
||
| tasks.getByName<Test>("test") { | ||
| useJUnitPlatform() | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| plugins { | ||
| `java-library` | ||
| } | ||
|
|
||
| group = "com.github.imdmk" | ||
| version = "4.0.0" | ||
|
|
||
| java { | ||
| toolchain.languageVersion.set(JavaLanguageVersion.of(21)) | ||
| } | ||
|
|
||
| tasks.compileJava { | ||
| options.compilerArgs = listOf("-Xlint:deprecation", "-parameters") | ||
| options.encoding = "UTF-8" | ||
| options.release = 21 | ||
| } |
15 changes: 15 additions & 0 deletions
15
buildSrc/src/main/kotlin/doublejump-repositories.gradle.kts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| plugins { | ||
| `java-library` | ||
| } | ||
|
|
||
| repositories { | ||
| mavenCentral() | ||
| maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") | ||
| maven("https://repo.papermc.io/repository/maven-public/") | ||
| maven("https://repo.eternalcode.pl/releases") | ||
| maven("https://storehouse.okaeri.eu/repository/maven-public/") | ||
| maven("https://repo.panda-lang.org/releases") | ||
| maven("https://repo.alessiodp.com/releases/") | ||
| maven("https://repo.alessiodp.com/snapshots/") | ||
| maven("https://maven.enginehub.org/repo/") | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
| import net.minecrell.pluginyml.bukkit.BukkitPluginDescription | ||
|
|
||
| plugins { | ||
| `java-library` | ||
| id("net.minecrell.plugin-yml.bukkit") | ||
| id("com.gradleup.shadow") | ||
| } | ||
|
|
||
| open class DoubleJumpShadowExtension { | ||
|
|
||
| internal var bukkitAction: Action<BukkitPluginDescription>? = null | ||
| internal var shadowAction: Action<ShadowJar>? = null | ||
|
|
||
| fun pluginYml(action: Action<BukkitPluginDescription>) { | ||
| bukkitAction = action | ||
| } | ||
|
|
||
| fun shadowJar(action: Action<ShadowJar>) { | ||
| shadowAction = action | ||
| } | ||
| } | ||
|
|
||
| extensions.create("doubleJumpShadow", DoubleJumpShadowExtension::class.java) | ||
|
|
||
| afterEvaluate { | ||
|
|
||
| val ext = extensions.getByType(DoubleJumpShadowExtension::class.java) | ||
|
|
||
| ext.bukkitAction?.let { action -> | ||
| extensions.configure<BukkitPluginDescription>("bukkit") { | ||
| action.execute(this) | ||
| } | ||
| } | ||
|
|
||
| tasks.withType<ShadowJar>().configureEach { | ||
| ext.shadowAction?.execute(this) | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.