Skip to content

Commit

Permalink
Merge pull request #37 from Astra-Interactive/dependabot/gradle/versi…
Browse files Browse the repository at this point in the history
…ons-b849027c5d

Update versions
  • Loading branch information
makeevrserg authored May 27, 2024
2 parents b5630f5 + 448cbb6 commit c416ecd
Show file tree
Hide file tree
Showing 21 changed files with 81 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
steps:
- name: Checkout Git repo
uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
java-version: 21
- name: Give gradle permission
run: chmod +x gradlew
- name: Build with Gradle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@ jobs:
with:
path: './gradle.properties'
properties: 'makeevrserg.project.name makeevrserg.project.version.string'
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
java-version: 21
- name: Give gradle permission
run: chmod +x gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@v3
with:
arguments: shadowJar --stacktrace
arguments: :plugin:shadowJar --stacktrace
- name: Create release
id: create_internal_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
with:
files: |
./jars/${{ steps.properties.outputs.makeevrserg-project-name }}-${{ steps.properties.outputs.makeevrserg-project-version-string }}.jar
./jars/*.jar
tag_name: ${{ steps.properties.outputs.makeevrserg-project-version-string }}
name: ${{ steps.properties.outputs.makeevrserg-project-name }} - ${{ steps.properties.outputs.makeevrserg-project-version-string }}
draft: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 1.17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'
- name: Give gradle permission
run: chmod +x gradlew
- name: detekt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
java-version: '21'
- name: Give gradle permission
run: chmod +x gradlew
- name: Run tests
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/check-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
jobs:
gradle_validation:
name: Validate gradle wrapper
uses: ./.github/workflows/gradle-wrapper-validation.yml
uses: ./.github/workflows/call-gradle-wrapper-validation.yml
detekt_validation:
name: Check by detekt
needs: gradle_validation
uses: ./.github/workflows/detekt-validation.yml
uses: ./.github/workflows/call-detekt-validation.yml
tests_validation:
needs: gradle_validation
uses: ./.github/workflows/tests-validation.yml
uses: ./.github/workflows/call-tests-validation.yml
build:
name: Build project
needs: [ gradle_validation, detekt_validation,tests_validation ]
uses: ./.github/workflows/build-project.yml
uses: ./.github/workflows/call-build-project.yml
8 changes: 4 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ concurrency:
jobs:
gradle_validation:
name: Validate gradle wrapper
uses: ./.github/workflows/gradle-wrapper-validation.yml
uses: ./.github/workflows/call-gradle-wrapper-validation.yml
detekt_validation:
name: Check by detekt
needs: gradle_validation
uses: ./.github/workflows/detekt-validation.yml
uses: ./.github/workflows/call-detekt-validation.yml
tests_validation:
needs: gradle_validation
uses: ./.github/workflows/tests-validation.yml
uses: ./.github/workflows/call-tests-validation.yml
build:
name: Build project
needs: [ gradle_validation, detekt_validation, tests_validation ]
uses: ./.github/workflows/build-project.yml
uses: ./.github/workflows/call-build-project.yml
8 changes: 4 additions & 4 deletions .github/workflows/release-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ on:
- master
jobs:
gradle_validation:
uses: ./.github/workflows/gradle-wrapper-validation.yml
uses: ./.github/workflows/call-gradle-wrapper-validation.yml
detekt_validation:
needs: gradle_validation
uses: ./.github/workflows/detekt-validation.yml
uses: ./.github/workflows/call-detekt-validation.yml
tests_validation:
needs: gradle_validation
uses: ./.github/workflows/tests-validation.yml
uses: ./.github/workflows/call-tests-validation.yml
create_artifact:
needs: [ gradle_validation, detekt_validation, tests_validation ]
uses: ./.github/workflows/create-artifacts.yml
uses: ./.github/workflows/call-create-artifacts.yml
secrets:
ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ kotlin.code.style=official
testTask.ignoreFailures=true
# Java
makeevrserg.java.source=8
makeevrserg.java.target=17
makeevrserg.java.ktarget=17
makeevrserg.java.target=21
makeevrserg.java.ktarget=21
# Project
makeevrserg.project.name=AspeKt
makeevrserg.project.group=ru.astrainteractive.aspekt
makeevrserg.project.version.string=2.19.11
makeevrserg.project.version.string=2.20.0
makeevrserg.project.description=Essentials plugin for EmpireProjekt
makeevrserg.project.developers=makeevrserg|Makeev Roman|[email protected]
makeevrserg.project.url=https://empireprojekt.ru
Expand Down
36 changes: 18 additions & 18 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,44 @@
# Kotlin
kotlin-version = "1.9.23" # https://github.com/JetBrains/kotlin
kotlin-benchmark = "0.4.10" # https://github.com/Kotlin/kotlinx-benchmark
kotlin-coroutines = "1.8.0" # https://github.com/Kotlin/kotlinx.coroutines
kotlin-coroutines = "1.8.1" # https://github.com/Kotlin/kotlinx.coroutines
kotlin-json = "1.6.3" # https://github.com/Kotlin/kotlinx.serialization
kotlin-kaml = "0.58.0" # https://github.com/charleskorn/kaml
kotlin-kaml = "0.59.0" # https://github.com/charleskorn/kaml

# Drivers
driver-jdbc = "3.45.3.0" # https://github.com/xerial/sqlite-jdbc
driver-jdbc = "3.46.0.0" # https://github.com/xerial/sqlite-jdbc
driver-mysql = "8.0.33" # https://github.com/mysql/mysql-connector-j

# klibs
klibs-gradleplugin = "1.0.0-alpha01" # https://github.com/makeevrserg/gradle-plugin
klibs-mikro = "1.6.0-beta" # https://github.com/makeevrserg/klibs.mikro
klibs-gradleplugin = "1.1.2" # https://github.com/makeevrserg/gradle-plugin
klibs-mikro = "1.7.0" # https://github.com/makeevrserg/klibs.mikro
klibs-kdi = "1.3.2" # https://github.com/makeevrserg/klibs.kdi
klibs-kstorage = "1.3.0" # https://github.com/makeevrserg/klibs.kstorage
klibs-kstorage = "1.4.0" # https://github.com/makeevrserg/klibs.kstorage

# Minecraft
minecraft-velocity = "3.3.0-SNAPSHOT" # https://github.com/PaperMC/Velocity
minecraft-spigot = "1.20.4-R0.1-SNAPSHOT" # https://github.com/PaperMC/Paper
minecraft-papi = "2.11.5" # https://github.com/PlaceholderAPI/PlaceholderAPI
minecraft-protocollib = "4.8.0" # https://github.com/dmulloy2/ProtocolLib
minecraft-vault = "1.7" # https://github.com/MilkBowl/VaultAPI
minecraft-astralibs = "3.4.0-alpha" # https://github.com/Astra-Interactive/AstraLibs
minecraft-bstats = "3.0.0" # https://github.com/Bastian/bStats
minecraft-mockbukkit = "v1.19-SNAPSHOT" #https://github.com/MockBukkit/MockBukkit
minecraft-velocity = "4.0.0-SNAPSHOT" # https://github.com/PaperMC/Velocity
minecraft-spigot = "1.20.6-R0.1-SNAPSHOT" # https://github.com/PaperMC/Paper
minecraft-papi = "2.11.6" # https://github.com/PlaceholderAPI/PlaceholderAPI
minecraft-protocollib = "5.1.0" # https://github.com/dmulloy2/ProtocolLib
minecraft-vault = "1.7.1" # https://github.com/MilkBowl/VaultAPI
minecraft-astralibs = "3.6.0" # https://github.com/Astra-Interactive/AstraLibs
minecraft-bstats = "3.0.2" # https://github.com/Bastian/bStats
minecraft-mockbukkit = "3.86.1" #https://github.com/MockBukkit/MockBukkit

# Shadow
gradle-shadow = "7.1.2" # https://github.com/johnrengelman/shadow
gradle-shadow = "8.0.0" # https://github.com/johnrengelman/shadow

# BuildConfig
gradle-buildconfig = "3.1.0" # https://github.com/gmazzo/gradle-buildconfig-plugin
gradle-buildconfig = "5.3.5" # https://github.com/gmazzo/gradle-buildconfig-plugin

# Exposed
exposed = "0.44.0" # https://github.com/JetBrains/Exposed
exposed = "0.50.1" # https://github.com/JetBrains/Exposed

# DisordSrv
discordsrv = "1.27.0" # https://github.com/DiscordSRV/DiscordSRV

# Mockito
mockito = "5.11.0" # https://github.com/mockito/mockito
mockito = "5.12.0" # https://github.com/mockito/mockito

[libraries]
# Kotlin
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ internal class AntiSwearKrate(
player: Player,
stringFormat: StringFormat,
) : FileKrate<AntiSwearStorage> by StringFormatKrate(
default = AntiSwearStorage(
playerName = player.name,
uuid = player.uniqueId.toString()
),
factory = {
AntiSwearStorage(
playerName = player.name,
uuid = player.uniqueId.toString()
)
},
fileName = "${player.uniqueId}.json",
stringFormat = stringFormat,
kSerializer = AntiSwearStorage.serializer(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import kotlinx.serialization.StringFormat
import org.bukkit.entity.Player
import ru.astrainteractive.aspekt.module.antiswear.model.AntiSwearStorage
import ru.astrainteractive.klibs.kstorage.api.MutableStorageValue
import ru.astrainteractive.klibs.kstorage.update
import ru.astrainteractive.klibs.mikro.core.dispatchers.KotlinDispatchers
import java.util.UUID

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import net.kyori.adventure.text.TextReplacementConfig
internal object SwearRuRegex {
val SWEAR_REGEX by lazy {
"""
(?iu)\b(?:(?:(?:у|[нз]а|(?:хитро|не)?вз?[ыьъ]|с[ьъ]|(?:и|ра)[зс]ъ?|(?:о[тб]|п[оа]д)[ьъ]?|(?:.\B)+?[оаеи-])-?)?(?:[её](?:б(?!о[рй]|рач)|п[уа](?:ц|тс))|и[пб][ае][тцд][ьъ]).*?|(?:(?:н[иеа]|ра[зс]|[зд]?[ао](?:т|дн[оа])?|с(?:м[еи])?|а[пб]ч)-?)?ху(?:[яйиеёю]|л+и(?!ган)).*?|бл(?:[эя]|еа?)(?:[дт][ьъ]?)?|\S*?(?:п(?:[иеё]зд|ид[аое]?р|ед(?:р(?!о)|[аое]р|ик)|охую)|бля(?:[дбц]|тс)|[ое]ху[яйиеё]|хуйн).*?|(?:о[тб]?|про|на|вы)?м(?:анд(?:[ауеыи](?:л(?:и[сзщ])?[ауеиы])?|ой|[ао]в.*?|юк(?:ов|[ауи])?|е[нт]ь|ища)|уд(?:[яаиое].+?|е?н(?:[ьюия]|ей))|[ао]л[ао]ф[ьъ](?:[яиюе]|[еёо]й))|елд[ауые].*?|ля[тд]ь|(?:[нз]а|по)х)\b
(?<![а-яё])(?:(?:(?:у|[нз]а|(?:хитро|не)?вз?[ыьъ]|с[ьъ]|(?:и|ра)[зс]ъ?|(?:о[тб]|п[оа]д)[ьъ]?|(?:\S(?=[а-яё]))+?[оаеи-])-?)?(?:[её](?:б(?!о[рй]|рач)|п[уа](?:ц|тс))|и[пб][ае][тцд][ьъ]).*?|(?:(?:н[иеа]|ра[зс]|[зд]?[ао](?:т|дн[оа])?|с(?:м[еи])?|а[пб]ч)-?)?ху(?:[яйиеёю]|л+и(?!ган)).*?|бл(?:[эя]|еа?)(?:[дт][ьъ]?)?|\S*?(?:п(?:[иеё]зд|ид[аое]?р|ед(?:р(?!о)|[аое]р|ик)|охую)|бля(?:[дбц]|тс)|[ое]ху[яйиеё]|хуйн).*?|(?:о[тб]?|про|на|вы)?м(?:анд(?:[ауеыи](?:л(?:и[сзщ])?[ауеиы])?|ой|[ао]в.*?|юк(?:ов|[ауи])?|е[нт]ь|ища)|уд(?:[яаиое].+?|е?н(?:[ьюия]|ей))|[ао]л[ао]ф[ьъ](?:[яиюе]|[еёо]й))|елд[ауые].*?|ля[тд]ь|(?:[нз]а|по)х)(?![а-яё])
""".trimIndent().toRegex()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class SwearRuRegexTest {
fun GIVEN_swear_WHEN_regex_THEN_match() {
assert(SwearRuRegex.SWEAR_REGEX.matches("бля"))
assert(SwearRuRegex.SWEAR_REGEX.matches("еблан"))
assert(!SwearRuRegex.SWEAR_REGEX.matches("Привет друг"))
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ internal class NewBeeEventListener(
return buildList {
createInfinitePotionEffect(
player,
PotionEffectType.HEAL,
PotionEffectType.REGENERATION,
5,
).run(::add)
createInfinitePotionEffect(
Expand All @@ -50,7 +50,7 @@ internal class NewBeeEventListener(
).run(::add)
createInfinitePotionEffect(
player,
PotionEffectType.FAST_DIGGING,
PotionEffectType.HASTE,
3,
).run(::add)
createInfinitePotionEffect(
Expand Down
2 changes: 1 addition & 1 deletion modules/towny-discord/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies {
compileOnly("net.luckperms:api:5.4")
compileOnly(libs.minecraft.discordsrv)
compileOnly("net.essentialsx:EssentialsX:2.20.1")
compileOnly("com.palmergames.bukkit.towny:towny:0.100.1.0")
compileOnly("com.palmergames.bukkit.towny:towny:0.100.2.11")
// Test
testImplementation(libs.bundles.testing.kotlin)
testImplementation(libs.tests.kotlin.test)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ enum class Sort(val desc: Boolean) {
WOOL_ASC(false), WOOL_DESC(true),
GLASS_ASC(false), GLASS_DESC(true),
BLOCK_ASC(false), BLOCK_DESC(true),
TOOL_ASC(false), TOOLS_DESC(true);
TOOL_ASC(false), TOOLS_DESC(true)
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class TCEvent(
val maxDmg: Short = tool.type.maxDurability
var dmg: Int = damageable.damage
// Check for durability enchantment
val unbLevel: Int = tool.getEnchantmentLevel(Enchantment.DURABILITY)
val unbLevel: Int = tool.getEnchantmentLevel(Enchantment.UNBREAKING)
if (Random.nextInt(unbLevel + 1) == 0) {
damageable.damage = ++dmg
}
Expand Down
Loading

0 comments on commit c416ecd

Please sign in to comment.