Skip to content

Commit

Permalink
build updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Sep 17, 2023
1 parent e5d376a commit bcae9ff
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 27 deletions.
1 change: 1 addition & 0 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ repositories {

dependencies {
implementation(libs.build.indraCommon)
implementation(libs.build.indraLicenser)
implementation(libs.build.shadow)
implementation(libs.build.hangarPublishPlugin)
implementation(libs.build.minotaur)
Expand Down
2 changes: 1 addition & 1 deletion build-logic/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ca.stellardrift.build.configurate.ConfigFormats
import ca.stellardrift.build.configurate.catalog.PolyglotVersionCatalogExtension

plugins {
id("ca.stellardrift.polyglot-version-catalogs") version "5.0.1"
id("ca.stellardrift.polyglot-version-catalogs") version "6.1.0"
}

extensions.configure<PolyglotVersionCatalogExtension> {
Expand Down
15 changes: 10 additions & 5 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import ca.stellardrift.build.localization.TemplateType
import java.util.Locale

plugins {
id("tabtps.base")
Expand All @@ -9,12 +8,12 @@ plugins {

localization {
templateType.set(TemplateType.JAVA)
templateFile.set(projectDir.resolve("src/main/template/messages.java.tmpl"))
templateFile.set(projectDir.resolve("src/main/message-templates/messages.java.tmpl"))
}

tasks.jar {
from(rootProject.file("license.txt")) {
rename { "license_${rootProject.name.toLowerCase(Locale.ENGLISH)}.txt" }
rename { "license_${rootProject.name.lowercase()}.txt" }
}
}

Expand All @@ -34,6 +33,12 @@ dependencies {
api(libs.slf4jApi)
}

blossom {
replaceToken("\${VERSION}", version.toString(), "src/main/java/xyz/jpenilla/tabtps/common/util/Constants.java")
sourceSets {
main {
blossom {
javaSources {
property("version", project.version.toString())
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public final class Constants {
private Constants() {
}

public static final String TABTPS_VERSION = "${VERSION}";
public static final String TABTPS_VERSION = "{{ version }}";

public static final String PREFIX_MINIMESSAGE = "<white>[<gradient:blue:aqua>TabTPS</gradient>]</white>";
public static final Component PREFIX = Serializers.MINIMESSAGE.deserialize(PREFIX_MINIMESSAGE);
Expand Down
File renamed without changes.
16 changes: 10 additions & 6 deletions gradle/libs.versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ metadata:
- plugins

plugins:
net.kyori.blossom: 1.3.1
ca.stellardrift.localization: 5.0.1
net.kyori.blossom: 2.1.0
ca.stellardrift.localization: 6.1.0
net.minecrell.plugin-yml.bukkit: 0.5.3
xyz.jpenilla.run-paper: 2.1.0
org.spongepowered.gradle.plugin: 2.0.2
org.spongepowered.gradle.plugin: 2.2.0

versions:
adventure: 4.14.0
Expand All @@ -34,8 +34,8 @@ versions:
mixin: 0.8.5

# buildSrc
indra: 2.1.1
shadow: 7.1.2
indra: 3.1.3
shadow: 8.1.1
minotaur: 2.7.5
hangarPublishPlugin: 0.0.5

Expand Down Expand Up @@ -182,8 +182,12 @@ dependencies:
group: net.kyori
name: indra-common
version: { ref: indra }
build-indraLicenser:
group: net.kyori
name: indra-licenser-cadix
version: { ref: indra }
build-shadow:
group: gradle.plugin.com.github.johnrengelman
group: com.github.johnrengelman
name: shadow
version: { ref: shadow }
build-minotaur:
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
19 changes: 12 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,6 +198,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ pluginManagement {
}

plugins {
id("ca.stellardrift.polyglot-version-catalogs") version "5.0.1"
id("quiet-fabric-loom") version "1.1-SNAPSHOT"
id("ca.stellardrift.polyglot-version-catalogs") version "6.1.0"
id("quiet-fabric-loom") version "1.3-SNAPSHOT"
id("org.spongepowered.gradle.vanilla") version "0.2.1-SNAPSHOT"
}

Expand Down
2 changes: 1 addition & 1 deletion spigot/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ tasks {
"org.bstats",
"xyz.jpenilla.pluginbase"
).forEach { pkg ->
relocate(pkg, "${rootProject.group}.${rootProject.name.toLowerCase()}.lib.$pkg")
relocate(pkg, "${rootProject.group}.${rootProject.name.lowercase()}.lib.$pkg")
}
}

Expand Down
5 changes: 2 additions & 3 deletions sponge/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import org.spongepowered.gradle.plugin.config.PluginLoaders
import org.spongepowered.gradle.vanilla.repository.MinecraftPlatform
import org.spongepowered.plugin.metadata.model.PluginDependency
import java.util.Locale

plugins {
id("tabtps.platform")
Expand All @@ -27,7 +26,7 @@ dependencies {
sponge {
injectRepositories(false)
apiVersion("8.1.0")
plugin(rootProject.name.toLowerCase(Locale.ENGLISH)) {
plugin(rootProject.name.lowercase()) {
loader {
name(PluginLoaders.JAVA_PLAIN)
version("1.0")
Expand Down Expand Up @@ -77,7 +76,7 @@ tasks {
"com.typesafe.config",
"xyz.jpenilla.jmplib"
).forEach { pkg ->
relocate(pkg, "${rootProject.group}.${rootProject.name.toLowerCase()}.lib.$pkg")
relocate(pkg, "${rootProject.group}.${rootProject.name.lowercase()}.lib.$pkg")
}
dependencies {
exclude {
Expand Down

0 comments on commit bcae9ff

Please sign in to comment.