Compare commits
1 Commits
master
...
renovate/o
Author | SHA1 | Date |
---|---|---|
|
706592e5e6 |
|
@ -1,40 +0,0 @@
|
||||||
name: "Build and publish releases"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags: "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
if: github.repository_owner == 'mc'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Set up JDK 17
|
|
||||||
uses: https://github.com/actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
java-version: '17'
|
|
||||||
distribution: 'temurin'
|
|
||||||
|
|
||||||
- name: "build"
|
|
||||||
run: |
|
|
||||||
./gradlew build
|
|
||||||
|
|
||||||
- name: "move releases"
|
|
||||||
run: |
|
|
||||||
mkdir release
|
|
||||||
mv build/libs/*.jar release
|
|
||||||
|
|
||||||
- name: "publish release"
|
|
||||||
uses: https://code.forgejo.org/actions/forgejo-release@v1
|
|
||||||
with:
|
|
||||||
direction: upload
|
|
||||||
release-dir: release
|
|
||||||
token: ${{ secrets.TOKEN }}
|
|
||||||
|
|
||||||
- name: "publish to maven"
|
|
||||||
env:
|
|
||||||
MAVEN_REPO_URL: "https://git.kallestruik.nl/api/packages/mc/maven"
|
|
||||||
MAVEN_REPO_TOKEN: ${{ secrets.TOKEN }}
|
|
||||||
run: |
|
|
||||||
./gradlew publishReleasePublicationToMavenRepository
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
pipeline:
|
||||||
|
build:
|
||||||
|
image: "eclipse-temurin:17-jdk"
|
||||||
|
commands:
|
||||||
|
- "./gradlew assemble"
|
||||||
|
test:
|
||||||
|
image: "eclipse-temurin:17-jdk"
|
||||||
|
commands:
|
||||||
|
- "./gradlew test"
|
||||||
|
|
||||||
|
release:
|
||||||
|
image: plugins/gitea-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: "gitea_api_key"
|
||||||
|
base_url:
|
||||||
|
from_secret: "gitea_base_url"
|
||||||
|
files: build/libs/DLib-*.jar
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
maven:
|
||||||
|
image: "eclipse-temurin:17-jdk"
|
||||||
|
commands:
|
||||||
|
- "./gradlew publishReleasePublicationToMavenRepository"
|
||||||
|
environment:
|
||||||
|
MAVEN_REPO_URL:
|
||||||
|
from_secret: maven_repo_url
|
||||||
|
MAVEN_REPO_TOKEN:
|
||||||
|
from_secret: gitea_api_key
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
|
@ -1,34 +1,33 @@
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version "1.8.22"
|
kotlin("jvm") version "1.7.10"
|
||||||
kotlin("plugin.serialization") version "1.8.22"
|
kotlin("plugin.serialization") version "1.7.0"
|
||||||
id("maven-publish")
|
id("maven-publish")
|
||||||
id("com.github.johnrengelman.shadow") version "8.1.1"
|
id("com.github.johnrengelman.shadow") version "7.1.2"
|
||||||
id("io.papermc.paperweight.userdev") version "1.5.5"
|
id("io.papermc.paperweight.userdev") version "1.3.8"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "nl.kallestruik"
|
group = "nl.kallestruik"
|
||||||
version = "1.5.1"
|
version = "1.5.0"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
paperweight.paperDevBundle("1.20-R0.1-SNAPSHOT")
|
paperDevBundle("1.19-R0.1-SNAPSHOT")
|
||||||
|
|
||||||
implementation(kotlin("reflect"))
|
implementation(kotlin("reflect"))
|
||||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0")
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3")
|
||||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1")
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.3")
|
||||||
implementation("org.jetbrains.kotlin:kotlin-scripting-common")
|
implementation("org.jetbrains.kotlin:kotlin-scripting-common")
|
||||||
implementation("org.jetbrains.kotlin:kotlin-scripting-jvm")
|
implementation("org.jetbrains.kotlin:kotlin-scripting-jvm")
|
||||||
implementation("org.jetbrains.kotlin:kotlin-scripting-jvm-host")
|
implementation("org.jetbrains.kotlin:kotlin-scripting-jvm-host")
|
||||||
implementation("net.kyori:adventure-text-serializer-plain:4.14.0")
|
|
||||||
|
|
||||||
testImplementation(kotlin("test-junit5"))
|
testImplementation(kotlin("test-junit5"))
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
|
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
|
||||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
|
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.2")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
|
@ -88,4 +87,4 @@ kotlin {
|
||||||
languageSettings.optIn("kotlinx.serialization.ExperimentalSerializationApi")
|
languageSettings.optIn("kotlinx.serialization.ExperimentalSerializationApi")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
|
@ -5,4 +5,4 @@ import org.bukkit.plugin.java.JavaPlugin
|
||||||
/**
|
/**
|
||||||
* This class is only here to make sure that paper loads the plugin.
|
* This class is only here to make sure that paper loads the plugin.
|
||||||
*/
|
*/
|
||||||
class DLib: JavaPlugin()
|
class DLib: JavaPlugin()
|
|
@ -42,4 +42,4 @@ class DUtil(
|
||||||
// Return the completed vector.
|
// Return the completed vector.
|
||||||
return vec
|
return vec
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -2,7 +2,6 @@ package nl.kallestruik.dlib.gui
|
||||||
|
|
||||||
import kotlinx.coroutines.runBlocking
|
import kotlinx.coroutines.runBlocking
|
||||||
import net.kyori.adventure.text.Component
|
import net.kyori.adventure.text.Component
|
||||||
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer
|
|
||||||
import org.bukkit.Material
|
import org.bukkit.Material
|
||||||
import org.bukkit.entity.Player
|
import org.bukkit.entity.Player
|
||||||
import org.bukkit.event.EventHandler
|
import org.bukkit.event.EventHandler
|
||||||
|
@ -117,9 +116,7 @@ class TextInputDialog: Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
val item = event.currentItem
|
val item = event.currentItem
|
||||||
val nameComponent = item?.itemMeta?.displayName() ?: Component.empty()
|
val name = item?.itemMeta?.displayName ?: ""
|
||||||
|
|
||||||
val name = PlainTextComponentSerializer.plainText().serialize(nameComponent)
|
|
||||||
|
|
||||||
if (name == "") {
|
if (name == "") {
|
||||||
event.isCancelled = true
|
event.isCancelled = true
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name: DLib
|
name: "DLib"
|
||||||
version: ${version}
|
|
||||||
main: nl.kallestruik.dlib.DLib
|
main: nl.kallestruik.dlib.DLib
|
||||||
api-version: '1.20'
|
version: ${version}
|
||||||
|
api-version: 1.16
|
Loading…
Reference in New Issue