Compare commits

...
5 Commits
Author SHA1 Message Date
Adrian Gonzales 8593beccbd release: Version 3.0.1 2025-08-22 20:01:43 -05:00
Adrian Gonzales 5d92446a6b Merge remote-tracking branch 'origin/main' 2025-08-22 19:15:54 -05:00
Adrian Gonzales edc82b2bc9 fix: Fixed Fabric Initialization 2025-08-22 19:15:24 -05:00
Adrian Gonzales 70bd4fee88 fix: Fixed maven publication 2025-08-22 19:02:06 -05:00
renovate[bot] dbf440b4b3 chore(deps): update actions/setup-java action to v5 (#278)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-21 14:59:27 -05:00
14 changed files with 128 additions and 197 deletions

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ jobs:
uses: actions/checkout@v5
- name: Set up JDK 21
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: 21
distribution: 'temurin'
+44 -5
View File
@@ -1,7 +1,10 @@
import java.time.LocalDate
plugins {
id("miniplaceholders.base")
alias(libs.plugins.jmh)
id("miniplaceholders.publish")
`java-library`
id("com.vanniktech.maven.publish")
}
dependencies {
@@ -28,10 +31,6 @@ jmh {
fork.set(2)
}
java {
withJavadocJar()
}
tasks {
processResources {
filteringCharset = Charsets.UTF_8.name()
@@ -60,3 +59,43 @@ tasks {
}
}
}
mavenPublishing {
publishToMavenCentral()
signAllPublications()
coordinates(project.group as String, "miniplaceholders-api", project.version as String)
pom {
name.set(project.name)
description.set(project.description)
inceptionYear.set(LocalDate.now().year.toString())
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("4drian3d")
name.set("Adrian Gonzales")
email.set("adriangonzalesval@gmail.com")
}
}
scm {
connection.set("scm:git:https://github.com/MiniPlaceholders/MiniPlaceholders.git")
developerConnection.set("scm:git:ssh://git@github.com/MiniPlaceholders/MiniPlaceholders.git")
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders")
}
ciManagement {
name.set("GitHub Actions")
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders/actions")
}
issueManagement {
name.set("GitHub")
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders/issues")
}
}
}
@@ -56,7 +56,7 @@ final class ExpansionImpl implements Expansion {
}
@Override
public @NotNull String name() {
public String name() {
return this.name;
}
@@ -71,21 +71,21 @@ final class ExpansionImpl implements Expansion {
}
@Override
public @NotNull TagResolver audiencePlaceholders() {
public TagResolver audiencePlaceholders() {
if (audiencePlaceholders.placeholders().length == 0) return TagResolver.empty();
return this.audiencePlaceholders;
}
@Override
public @NotNull TagResolver relationalPlaceholders() {
public TagResolver relationalPlaceholders() {
if (relationalPlaceholders.placeholders().length == 0) return TagResolver.empty();
return this.relationalPlaceholders;
}
@Override
public @NotNull TagResolver globalPlaceholders() {
public TagResolver globalPlaceholders() {
if (globalPlaceholders.placeholders().length == 0) return TagResolver.empty();
return this.globalPlaceholders;
-1
View File
@@ -5,7 +5,6 @@ plugins {
dependencies {
implementation(libs.plugin.shadow)
implementation(libs.plugin.kotlin)
implementation(libs.plugin.dokka)
}
repositories {
@@ -1,104 +0,0 @@
plugins {
kotlin("jvm")
`java-library`
`maven-publish`
signing
id("org.jetbrains.dokka")
}
val dokkaHtmlJar by tasks.registering(Jar::class) {
description = "A HTML Documentation JAR containing Dokka HTML"
from(tasks.dokkaGeneratePublicationHtml.flatMap { it.outputDirectory })
archiveClassifier.set("javadoc")
}
dokka {
dokkaSourceSets.main {
includes.from("README.md")
sourceLink {
localDirectory.set(rootDir)
remoteUrl("https://github.com/MiniPlaceholders/MiniPlaceholders/tree/main")
remoteLineSuffix.set("#L")
}
}
pluginsConfiguration.html {
footerMessage.set("(c) MiniPlaceholders | 4drian3d")
}
}
val projectVersion = project.version.toString()
val projectName = project.name
val projectDescription = project.description
publishing {
publications {
register<MavenPublication>("maven") {
artifact(dokkaHtmlJar)
repositories {
maven {
credentials {
username = findProperty("sonatypeTokenUsername") as? String ?: ""
password = findProperty("sonatypeTokenPassword") as? String ?: ""
}
val central = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
val snapshots = "https://central.sonatype.com/repository/maven-snapshots/"
if (projectVersion.endsWith("SNAPSHOT") || projectVersion.contains("RC")) {
name = "SonatypeSnapshots"
setUrl(snapshots)
} else {
name = "OSSRH"
setUrl(central)
}
}
maven(file("build/dev-maven")) {
name = "DevMaven"
}
}
from(components["java"])
pom {
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders")
licenses {
license {
name.set("Apache License 2.0")
url.set("https://opensource.org/license/apache-2-0/")
}
}
scm {
connection.set("scm:git:https://github.com/MiniPlaceholders/MiniPlaceholders.git")
developerConnection.set("scm:git:ssh://git@github.com/MiniPlaceholders/MiniPlaceholders.git")
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders")
}
developers {
developer {
id.set("4drian3d")
name.set("Adrian Gonzales")
email.set("adriangonzalesval@gmail.com")
}
}
issueManagement {
name.set("GitHub")
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders/issues")
}
ciManagement {
name.set("GitHub Actions")
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders/actions")
}
name.set(projectName)
description.set(projectDescription)
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders")
}
}
}
}
signing {
useGpgCmd()
sign(configurations.archives.get())
sign(publishing.publications["maven"])
sign(dokkaHtmlJar.get())
}
java {
withSourcesJar()
}
@@ -1,75 +0,0 @@
plugins {
`java-library`
`maven-publish`
signing
}
publishing {
publications {
create<MavenPublication>("maven") {
repositories {
maven {
credentials {
username = findProperty("sonatypeTokenUsername") as? String ?: ""
password = findProperty("sonatypeTokenPassword") as? String ?: ""
}
val central = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
val snapshots = "https://central.sonatype.com/repository/maven-snapshots/"
val projectVersion = project.version.toString()
if (projectVersion.endsWith("SNAPSHOT") || projectVersion.contains("RC")) {
name = "SonatypeSnapshots"
setUrl(snapshots)
} else {
name = "OSSRH"
setUrl(central)
}
}
}
from(components["java"])
pom {
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders")
licenses {
license {
name.set("Apache License 2.0")
url.set("https://opensource.org/license/apache-2-0/")
}
}
scm {
connection.set("scm:git:https://github.com/MiniPlaceholders/MiniPlaceholders.git")
developerConnection.set("scm:git:ssh://git@github.com/MiniPlaceholders/MiniPlaceholders.git")
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders")
}
developers {
developer {
id.set("4drian3d")
name.set("Adrian Gonzales")
email.set("adriangonzalesval@gmail.com")
}
}
issueManagement {
name.set("GitHub")
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders/issues")
}
ciManagement {
name.set("GitHub Actions")
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders/actions")
}
name.set(project.name)
description.set(project.description)
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders")
}
}
}
}
signing {
useGpgCmd()
sign(configurations.archives.get())
sign(publishing.publications["maven"])
}
java {
withSourcesJar()
}
+1
View File
@@ -20,6 +20,7 @@ dependencies {
includeDependency(libs.cloud.core)
includeDependency(libs.cloud.extras)
includeDependency(libs.desertwell)
includeDependency(libs.unnamedinject)
shadeModule(projects.miniplaceholdersApi)
shadeModule(projects.miniplaceholdersCommon)
@@ -19,7 +19,7 @@ import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
public class FabricMod implements ModInitializer, PlaceholdersPlugin {
public final class FabricMod implements ModInitializer, PlaceholdersPlugin {
private final ComponentLogger componentLogger = ComponentLogger.logger("miniplaceholders");
private MinecraftServer minecraftServer;
+1 -1
View File
@@ -25,7 +25,7 @@
"java": ">=21",
"cloud": "*",
"adventure-platform-fabric": "*",
"minecraft": ">=1.21.4",
"minecraft": ">=1.21.6",
"fabric-permissions-api-v0": "*"
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
group = io.github.miniplaceholders
version = 3.0.0-SNAPSHOT
version = 3.0.1
description = MiniMessage Component-based Placeholders API
org.gradle.jvmargs=-Xmx2G
+2 -1
View File
@@ -19,7 +19,7 @@ adventure = "4.24.0"
adventureModded = "6.6.0"
kotlin = "2.2.20-RC"
fabric-api = "0.132.1+1.21.9"
fabric-api = "0.132.0+1.21.8"
fabric-loader = "0.17.2"
desertwell = "2.0.4"
@@ -65,3 +65,4 @@ blossom = { id = "net.kyori.blossom", version.ref = "blossom" }
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
jmh = { id = "me.champeau.jmh", version.ref = "jmh" }
idea-ext = { id = "org.jetbrains.gradle.plugin.idea-ext", version = "1.2" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
+70 -2
View File
@@ -1,13 +1,18 @@
import com.vanniktech.maven.publish.KotlinJvm
import com.vanniktech.maven.publish.JavadocJar
import java.time.LocalDate
plugins {
kotlin("jvm")
id("miniplaceholders.kotlin.publish")
id("com.vanniktech.maven.publish")
id("org.jetbrains.dokka") version "2.0.0"
}
dependencies {
compileOnly(kotlin("stdlib"))
compileOnly(libs.adventure.api)
compileOnly(libs.adventure.minimessage)
compileOnlyApi(projects.miniplaceholdersApi)
compileOnly(projects.miniplaceholdersApi)
}
kotlin {
@@ -17,3 +22,66 @@ kotlin {
}
}
dokka {
dokkaSourceSets.main {
includes.from("README.md")
sourceLink {
localDirectory.set(rootDir)
remoteUrl("https://github.com/MiniPlaceholders/MiniPlaceholders/tree/main")
remoteLineSuffix.set("#L")
}
}
pluginsConfiguration.html {
footerMessage.set("(c) MiniPlaceholders | 4drian3d")
}
}
mavenPublishing {
publishToMavenCentral()
signAllPublications()
coordinates(project.group as String, "miniplaceholders-kotlin-ext", project.version as String)
pom {
name.set(project.name)
description.set(project.description)
inceptionYear.set(LocalDate.now().year.toString())
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("4drian3d")
name.set("Adrian Gonzales")
email.set("adriangonzalesval@gmail.com")
}
}
scm {
connection.set("scm:git:https://github.com/MiniPlaceholders/MiniPlaceholders.git")
developerConnection.set("scm:git:ssh://git@github.com/MiniPlaceholders/MiniPlaceholders.git")
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders")
}
ciManagement {
name.set("GitHub Actions")
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders/actions")
}
issueManagement {
name.set("GitHub")
url.set("https://github.com/MiniPlaceholders/MiniPlaceholders/issues")
}
}
configure(KotlinJvm(
// configures the -javadoc artifact, possible values:
// - `JavadocJar.None()` don't publish this artifact
// - `JavadocJar.Empty()` publish an empty jar
// - `JavadocJar.Dokka("dokkaHtml")` when using Kotlin with Dokka, where `dokkaHtml` is the name of the Dokka task that should be used as input
javadocJar = JavadocJar.Dokka("dokkaGeneratePublicationHtml"),
sourcesJar = true,
))
}
+2
View File
@@ -39,6 +39,8 @@ dependencyResolutionManagement {
plugins {
id("quiet-fabric-loom") version "1.11.324"
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
id("com.vanniktech.maven.publish") version "0.34.0" apply false
kotlin("jvm") version "2.2.20-RC" apply false
}
arrayOf(
+1 -1
View File
@@ -17,7 +17,7 @@ dependencies {
sponge {
injectRepositories(false)
apiVersion("8.1.0")
apiVersion("12.0.0")
license("GPL-3")
loader {
name(PluginLoaders.JAVA_PLAIN)