Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 16
java-version: 17
distribution: temurin
- name: Run Check
uses: eskatos/gradle-command-action@v2
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 16
java-version: 17
distribution: temurin
- name: Generate docs
uses: eskatos/gradle-command-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 16
java-version: 17
distribution: temurin

- name: Assemble Plugin
Expand Down
20 changes: 20 additions & 0 deletions .run/Run Server [mimic-bukkit].run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name='ProjectRunConfigurationManager'>
<configuration default='false' name='Run Server [mimic-bukkit]' type='GradleRunConfiguration' factoryName='Gradle' singleton='true'>
<ExternalSystemSettings>
<option name='externalProjectPath' value='$PROJECT_DIR$/mimic-bukkit' />
<option name='externalSystemIdString' value='GRADLE' />
<option name='vmOptions' value='' />
<option name='scriptParameters' value='' />
<option name='taskNames'>
<list>
<option value='runServer' />
</list>
</option>
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>false</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v='2' />
</configuration>
</component>
20 changes: 16 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
## [Unreleased]

### Paper-first

Keeping the plugin compatible both with Paper and Spigot consumes a lot of time.
Now, Mimic is Paper-first as it is the most popular platform.
This means that compatibility with Spigot is not guaranteed.

To reduce the maintenance burden, support for versions older than 1.20 has been dropped.
Java 17 is required.

### Added command `/mimic config`

Since now, it is possible to change Mimic config using commands in two ways:
> [!NOTE]
> This feature requires the CommandAPI plugin to be installed.

Now it is possible to change Mimic config using commands in two ways:

1. Using interactive config `/mimic config`.
Every option in the output is interactive, so you can change it just by mouse click.
Expand All @@ -25,10 +37,10 @@ Since now, it is possible to change Mimic config using commands in two ways:

### Housekeeping

- Update required Java 1.8 → 16
- Update Kotlin 1.6.20 → 1.9.20
- Update required Java 1.8 → 17
- Update Kotlin 1.6.20 → 2.1.20
- Replace ACF with CommandAPI
- Update Gradle 7.4.2 → 8.5
- Update Gradle 7.4.2 → 8.13
- Update dependencies
- Migrate to version catalogs

Expand Down
3 changes: 1 addition & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

kotlin {
jvmToolchain(16)
jvmToolchain(17)
compilerOptions {
freeCompilerArgs.add("-Xcontext-receivers")
}
Expand All @@ -15,7 +15,6 @@ dependencies {
implementation(kotlin("serialization", version = kotlinVersion))
implementation(libs.dokka)
implementation(libs.kotlinx.binaryCompatibilityValidator)
implementation(libs.gradleDownloadTask)
}

repositories {
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ dependencyResolutionManagement {
}
}
}

rootProject.name = "buildSrc"
15 changes: 2 additions & 13 deletions buildSrc/src/main/kotlin/commons.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,19 @@ tasks.test {
}

kotlin {
jvmToolchain(16)
jvmToolchain(17)
explicitApi()

compilerOptions {
apiVersion = KotlinVersion.KOTLIN_1_9
languageVersion = KotlinVersion.KOTLIN_1_9
freeCompilerArgs.add("-Xjvm-default=all")
optIn.add("kotlin.RequiresOptIn")
allWarningsAsErrors = System.getProperty("warningsAsErrors") == "true"
javaParameters = true
}
}

// TODO: Remove after fix in BukkitGradle
// https://github.com/EndlessCodeGroup/BukkitGradle/issues/62
afterEvaluate {
java {
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
}
}

dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(kotlin("stdlib"))
testingDependencies()
}

Expand Down
8 changes: 8 additions & 0 deletions buildSrc/src/main/kotlin/internal/Accessors.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package internal

import org.gradle.api.Project
import org.gradle.api.artifacts.VersionCatalogsExtension
import org.gradle.kotlin.dsl.getByName

internal val Project.versionCatalogs: VersionCatalogsExtension
get() = extensions.getByName<VersionCatalogsExtension>("versionCatalogs")
13 changes: 6 additions & 7 deletions buildSrc/src/main/kotlin/internal/libs.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package internal

import gradle.kotlin.dsl.accessors._1f737d11fad22b9b058419dfc437a798.versionCatalogs
import org.gradle.api.Project
import org.gradle.api.artifacts.MinimalExternalModuleDependency
import org.gradle.api.provider.Provider
Expand All @@ -14,24 +13,24 @@ internal object libs {

context(Project)
val junit_bom
get() = get("junit-bom")
get() = lib("junit-bom")

context(Project)
val junit_jupiter
get() = get("junit-jupiter")
get() = lib("junit-jupiter")

context(Project)
val junit_jupiter_params
get() = get("junit-jupiter-params")
get() = lib("junit-jupiter-params")

context(Project)
val kotest_assertions
get() = get("kotest-assertions")
get() = lib("kotest-assertions")

context(Project)
val mockk
get() = get("mockk")
get() = lib("mockk")

private fun Project.get(alias: String): Provider<MinimalExternalModuleDependency> =
private fun Project.lib(alias: String): Provider<MinimalExternalModuleDependency> =
versionCatalogs.named("libs").findLibrary(alias).get()
}
65 changes: 42 additions & 23 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,44 +1,63 @@
[versions]

kotlin = "1.9.20"
commandapi = "9.2.0"
junit = "5.10.1"
paper = "1.20-R0.1-SNAPSHOT"
kotlin = "2.1.20"
kotlinx-binaryCompatibilityValidator = "0.17.0"
kotlinx-serialization = "1.8.1"
dokka = "1.9.10"
annotations = "26.0.2"

commandapi = "9.7.0"
bstats = "3.1.0"

skillapi = "3.102"
battlelevels = "6.9.1"
mmocore = "1.12.1-SNAPSHOT"
mmoitems = "6.9.5-SNAPSHOT"
mythiclib = "1.6.2-SNAPSHOT"
heroes = "1.9.30-RELEASE"

junit = "5.12.2"
kotest = "6.0.0.M3"
mockk = "1.14.0"

gradlePlugin-bukkitgradle = "1.0.0"
gradlePlugin-shadow = "8.3.6"
gradlePlugin-versions = "0.52.0"

[libraries]

spigot-api = "org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT"
bstats = "org.bstats:bstats-bukkit:3.0.2"
annotations = "org.jetbrains:annotations:24.1.0"
serialization-hocon = "org.jetbrains.kotlinx:kotlinx-serialization-hocon:1.6.1"
adventure = "net.kyori:adventure-platform-bukkit:4.3.1"
paperApi = { module = "io.papermc.paper:paper-api", version.ref = "paper" }
serialization-hocon = { module = "org.jetbrains.kotlinx:kotlinx-serialization-hocon", version.ref = "kotlinx-serialization" }
annotations = { module = "org.jetbrains:annotations", version.ref = "annotations" }

commandapi = { module = "dev.jorel:commandapi-bukkit-shade", version.ref = "commandapi" }
commandapi = { module = "dev.jorel:commandapi-bukkit-core", version.ref = "commandapi" }
commandapi-kotlin = { module = "dev.jorel:commandapi-bukkit-kotlin", version.ref = "commandapi" }
bstats = { module = "org.bstats:bstats-bukkit", version.ref = "bstats" }

rpgplugins-skillapi = "com.sucy:SkillAPI:3.102"
rpgplugins-battlelevels = "me.robin:BattleLevels:6.9.1"
rpgplugins-mmocore = "net.Indyuce:MMOCore:1.9.2"
rpgplugins-mmoitems = "net.Indyuce:MMOItems:6.7.2"
rpgplugins-mythiclib = "io.lumine:MythicLib-dist:1.4"
rpgplugins-heroes = "com.herocraftonline.heroes:Heroes:1.9.30-RELEASE"
rpgplugins-skillapi = { module = "com.sucy:SkillAPI", version.ref = "skillapi" }
rpgplugins-battlelevels = { module = "me.robin:BattleLevels", version.ref = "battlelevels" }
rpgplugins-mmocore = { module = "net.Indyuce:MMOCore-API", version.ref = "mmocore" }
rpgplugins-mmoitems = { module = "net.Indyuce:MMOItems-API", version.ref = "mmoitems" }
rpgplugins-mythiclib = { module = "io.lumine:MythicLib-dist", version.ref = "mythiclib" }
rpgplugins-heroes = { module = "com.herocraftonline.heroes:Heroes", version.ref = "heroes" }

# Test dependencies
junit-bom = { module = "org.junit:junit-bom", version.ref = "junit" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" }
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit" }
kotest-assertions = "io.kotest:kotest-assertions-core:5.8.0"
mockk = "io.mockk:mockk:1.13.8"
kotest-assertions = { module = "io.kotest:kotest-assertions-core", version.ref = "kotest" }
mockk = { module = "io.mockk:mockk", version.ref = "mockk" }

# Build dependencies
dokka = "org.jetbrains.dokka:dokka-gradle-plugin:1.9.10"
kotlinx-binaryCompatibilityValidator = "org.jetbrains.kotlinx:binary-compatibility-validator:0.13.2"
gradleDownloadTask = "de.undercouch:gradle-download-task:5.5.0"
dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }
kotlinx-binaryCompatibilityValidator = { module = "org.jetbrains.kotlinx:binary-compatibility-validator", version.ref = "kotlinx-binaryCompatibilityValidator" }

[plugins]

bukkitgradle = "ru.endlesscode.bukkitgradle:0.10.1"
shadow = "com.github.johnrengelman.shadow:8.1.1"
versions = "com.github.ben-manes.versions:0.50.0"
bukkitgradle = { id = "ru.endlesscode.bukkitgradle", version.ref = "gradlePlugin-bukkitgradle" }
shadow = { id = "com.gradleup.shadow", version.ref = "gradlePlugin-shadow" }
versions = { id = "com.github.ben-manes.versions", version.ref = "gradlePlugin-versions" }

[bundles]

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
8 changes: 5 additions & 3 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions mimic-bukkit-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ plugins {
description = "Abstraction API for Bukkit RPG plugins"

repositories {
maven(url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots")
maven("https://repo.papermc.io/repository/maven-public/")
}

dependencies {
api(projects.mimicApi)
compileOnly(libs.annotations)
compileOnly(libs.spigot.api) { isTransitive = false }
compileOnly(libs.paperApi)
}
Loading
Loading