Skip to content

Commit

Permalink
Update dependencies!
Browse files Browse the repository at this point in the history
  • Loading branch information
Kale-Ko committed Jun 1, 2024
1 parent 6eb9be7 commit e8823f0
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 44 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: Build Test

on:
push:
branches: [ main ]
branches:
- "*"
pull_request:
branches: [ main ]
branches:
- "*"

jobs:
build:
Expand All @@ -14,21 +16,22 @@ jobs:

steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin

- name: Build Project
uses: gradle/gradle-build-action@v2
with:
arguments: build
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build
run: ./gradlew build
env:
MAVEN_TYPE: snapshot
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
MAVEN_TYPE: release
GH_PACKAGES_USER: ${{ secrets.GH_PACKAGES_USER }}
GH_PACKAGES_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
30 changes: 15 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Publish

on:
push:
tags: [ "*" ]
tags:
- "*"

jobs:
publish:
Expand All @@ -12,42 +13,41 @@ jobs:

steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin

- name: Build Project
uses: gradle/gradle-build-action@v2
with:
arguments: build
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build
run: ./gradlew build
env:
MAVEN_TYPE: release
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
MAVEN_TYPE: release
GH_PACKAGES_USER: ${{ secrets.GH_PACKAGES_USER }}
GH_PACKAGES_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}

- name: Publish to GitHub Packages
uses: gradle/gradle-build-action@v2
with:
arguments: publish
run: ./gradlew publish
env:
MAVEN_TYPE: release
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
MAVEN_TYPE: release
GH_PACKAGES_USER: ${{ secrets.GH_PACKAGES_USER }}
GH_PACKAGES_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}

- name: Publish to Github Pages
uses: jamesives/github-pages-deploy-action@v4
with:
git-config-name: github-actions[bot]
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com
commit-message: Update JavaDocs
git-config-name: "github-actions[bot]"
git-config-email: "41898282+github-actions[bot]@users.noreply.github.com"
commit-message: "Update JavaDocs"
folder: build/docs/javadoc
branch: pages
target-folder: docs
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.caching=true

java_version=11

project_version=1.10.6
project_version=1.10.7
project_description=A semi-advanced Java data serialization library with features for reducing file sizes.

jackson_version=2.16.0
jackson_version=2.17.1
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.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
15 changes: 13 additions & 2 deletions src/main/java/io/github/kale_ko/bjsl/parsers/JsonParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.fasterxml.jackson.core.json.JsonWriteFeature;
import com.fasterxml.jackson.core.util.DefaultIndenter;
import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
import com.fasterxml.jackson.core.util.Separators;
import com.fasterxml.jackson.databind.json.JsonMapper;
import io.github.kale_ko.bjsl.BJSL;
import java.io.PrintWriter;
Expand Down Expand Up @@ -201,7 +202,12 @@ public boolean getCrlf() {
indenter = indenter.withIndent(" ".repeat(this.indentLevel));
indenter = indenter.withLinefeed(this.crlf ? "\r\n" : "\n");

prettyPrinter = prettyPrinter.withObjectIndenter(indenter).withArrayIndenter(indenter).withSpacesInObjectEntries();
Separators separators = new Separators();
separators = separators.withObjectFieldValueSpacing(Separators.Spacing.BOTH);
separators = separators.withObjectEntrySpacing(Separators.Spacing.AFTER);
separators = separators.withArrayValueSpacing(Separators.Spacing.AFTER);

prettyPrinter = prettyPrinter.withObjectIndenter(indenter).withArrayIndenter(indenter).withSeparators(separators);

try {
Field separatorField = prettyPrinter.getClass().getDeclaredField("_objectFieldValueSeparatorWithSpaces");
Expand All @@ -221,7 +227,12 @@ public boolean getCrlf() {
indenter = indenter.withIndent("");
indenter = indenter.withLinefeed("");

prettyPrinter = prettyPrinter.withObjectIndenter(indenter).withArrayIndenter(indenter).withoutSpacesInObjectEntries();
Separators separators = new Separators();
separators = separators.withObjectFieldValueSpacing(Separators.Spacing.NONE);
separators = separators.withObjectEntrySpacing(Separators.Spacing.NONE);
separators = separators.withArrayValueSpacing(Separators.Spacing.NONE);

prettyPrinter = prettyPrinter.withObjectIndenter(indenter).withArrayIndenter(indenter).withSeparators(separators);
}

return new JsonParser(factory, new JsonMapper(factory), prettyPrinter);
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/io/github/kale_ko/bjsl/parsers/TomlParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.fasterxml.jackson.core.StreamWriteFeature;
import com.fasterxml.jackson.core.util.DefaultIndenter;
import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
import com.fasterxml.jackson.core.util.Separators;
import com.fasterxml.jackson.dataformat.toml.TomlFactory;
import com.fasterxml.jackson.dataformat.toml.TomlFactoryBuilder;
import com.fasterxml.jackson.dataformat.toml.TomlMapper;
Expand Down Expand Up @@ -147,7 +148,12 @@ public boolean getCrlf() {
indenter = indenter.withIndent(" ".repeat(this.indentLevel));
indenter = indenter.withLinefeed(this.crlf ? "\r\n" : "\n");

prettyPrinter = prettyPrinter.withObjectIndenter(indenter).withArrayIndenter(indenter).withSpacesInObjectEntries();
Separators separators = new Separators();
separators = separators.withObjectFieldValueSpacing(Separators.Spacing.BOTH);
separators = separators.withObjectEntrySpacing(Separators.Spacing.AFTER);
separators = separators.withArrayValueSpacing(Separators.Spacing.AFTER);

prettyPrinter = prettyPrinter.withObjectIndenter(indenter).withArrayIndenter(indenter).withSeparators(separators);

return new TomlParser(factory, new TomlMapper(factory), prettyPrinter);
}
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/io/github/kale_ko/bjsl/parsers/YamlParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.fasterxml.jackson.core.StreamWriteFeature;
import com.fasterxml.jackson.core.util.DefaultIndenter;
import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
import com.fasterxml.jackson.core.util.Separators;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactoryBuilder;
import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator;
Expand Down Expand Up @@ -150,7 +151,12 @@ public boolean getCrlf() {
indenter = indenter.withIndent(" ".repeat(this.indentLevel));
indenter = indenter.withLinefeed(this.crlf ? "\r\n" : "\n");

prettyPrinter = prettyPrinter.withObjectIndenter(indenter).withArrayIndenter(indenter).withSpacesInObjectEntries();
Separators separators = new Separators();
separators = separators.withObjectFieldValueSpacing(Separators.Spacing.BOTH);
separators = separators.withObjectEntrySpacing(Separators.Spacing.AFTER);
separators = separators.withArrayValueSpacing(Separators.Spacing.AFTER);

prettyPrinter = prettyPrinter.withObjectIndenter(indenter).withArrayIndenter(indenter).withSeparators(separators);

return new YamlParser(factory, new YAMLMapper(factory), prettyPrinter);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public interface TypeProcessor {
*
* @since 1.0.0
*/
@NotNull ParsedElement toElement(@Nullable Object object);
public @NotNull ParsedElement toElement(@Nullable Object object);

/**
* Converts a {@link ParsedElement} into an Object
Expand All @@ -31,5 +31,5 @@ public interface TypeProcessor {
*
* @since 1.0.0
*/
@Nullable Object toObject(@NotNull ParsedElement element);
public @Nullable Object toObject(@NotNull ParsedElement element);
}

0 comments on commit e8823f0

Please sign in to comment.