commit
a157a92b7c
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
||||
|
||||
# Check out current repository
|
||||
- name: Fetch Sources
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Validate wrapper
|
||||
- name: Gradle Wrapper Validation
|
||||
@ -42,7 +42,7 @@ jobs:
|
||||
|
||||
# Set up Java environment for the next steps
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: zulu
|
||||
java-version: 17
|
||||
@ -102,11 +102,11 @@ jobs:
|
||||
|
||||
# Check out current repository
|
||||
- name: Fetch Sources
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Set up Java environment for the next steps
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: zulu
|
||||
java-version: 17
|
||||
@ -155,18 +155,18 @@ jobs:
|
||||
|
||||
# Check out current repository
|
||||
- name: Fetch Sources
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Set up Java environment for the next steps
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: zulu
|
||||
java-version: 17
|
||||
|
||||
# Run Qodana inspections
|
||||
- name: Qodana - Code Inspection
|
||||
uses: JetBrains/qodana-action@v2023.2.1
|
||||
uses: JetBrains/qodana-action@v2023.2.8
|
||||
with:
|
||||
cache-default-branch-only: true
|
||||
|
||||
@ -186,11 +186,11 @@ jobs:
|
||||
|
||||
# Check out current repository
|
||||
- name: Fetch Sources
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Set up Java environment for the next steps
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: zulu
|
||||
java-version: 17
|
||||
@ -233,11 +233,11 @@ jobs:
|
||||
|
||||
# Check out current repository
|
||||
- name: Fetch Sources
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Set up Java environment for the next steps
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: zulu
|
||||
java-version: 17
|
||||
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -20,13 +20,13 @@ jobs:
|
||||
|
||||
# Check out current repository
|
||||
- name: Fetch Sources
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.release.tag_name }}
|
||||
|
||||
# Set up Java environment for the next steps
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: zulu
|
||||
java-version: 17
|
||||
|
4
.github/workflows/run-ui-tests.yml
vendored
4
.github/workflows/run-ui-tests.yml
vendored
@ -33,11 +33,11 @@ jobs:
|
||||
|
||||
# Check out current repository
|
||||
- name: Fetch Sources
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Set up Java environment for the next steps
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: zulu
|
||||
java-version: 17
|
||||
|
@ -4,6 +4,13 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- Support for all 2023.3 builds (233.*)
|
||||
|
||||
### Changed
|
||||
- Replace deprecated apache commons utils
|
||||
- Update dependencies
|
||||
|
||||
## [4.4.2] - 2023-09-02
|
||||
|
||||
### Added
|
||||
|
@ -29,7 +29,11 @@ dependencies {
|
||||
|
||||
// Set the JVM language level used to build the project. Use Java 11 for 2020.3+, and Java 17 for 2022.2+.
|
||||
kotlin {
|
||||
jvmToolchain(17)
|
||||
@Suppress("UnstableApiUsage")
|
||||
jvmToolchain {
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
vendor = JvmVendorSpec.JETBRAINS
|
||||
}
|
||||
}
|
||||
|
||||
// Configure Gradle IntelliJ Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
|
||||
|
@ -4,22 +4,22 @@ pluginGroup = de.marhali.easyi18n
|
||||
pluginName = easy-i18n
|
||||
pluginRepositoryUrl = https://github.com/marhali/easy-i18n
|
||||
# SemVer format -> https://semver.org
|
||||
pluginVersion = 4.4.2
|
||||
pluginVersion = 4.4.3
|
||||
|
||||
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
|
||||
pluginSinceBuild = 223
|
||||
pluginUntilBuild = 232.*
|
||||
pluginUntilBuild = 233.*
|
||||
|
||||
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
|
||||
platformType = IU
|
||||
platformVersion = 2023.2.1
|
||||
platformVersion = 2023.3
|
||||
|
||||
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
|
||||
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
|
||||
platformPlugins = org.jetbrains.kotlin, JavaScript, com.jetbrains.php:232.9559.64
|
||||
platformPlugins = org.jetbrains.kotlin, JavaScript, com.jetbrains.php:233.11799.241
|
||||
|
||||
# Gradle Releases -> https://github.com/gradle/gradle/releases
|
||||
gradleVersion = 8.3
|
||||
gradleVersion = 8.5
|
||||
|
||||
# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
|
||||
kotlin.stdlib.default.dependency = false
|
||||
|
@ -1,14 +1,14 @@
|
||||
[versions]
|
||||
# libraries
|
||||
annotations = "24.0.1"
|
||||
annotations = "24.1.0"
|
||||
json5-java = "2.0.0"
|
||||
|
||||
# plugins
|
||||
kotlin = "1.9.0"
|
||||
changelog = "2.1.2"
|
||||
gradleIntelliJPlugin = "1.15.0"
|
||||
kotlin = "1.9.21"
|
||||
changelog = "2.2.0"
|
||||
gradleIntelliJPlugin = "1.16.1"
|
||||
qodana = "0.1.13"
|
||||
kover = "0.7.3"
|
||||
kover = "0.7.5"
|
||||
|
||||
[libraries]
|
||||
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }
|
||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
14
gradlew
vendored
14
gradlew
vendored
@ -145,7 +145,7 @@ 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=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
@ -153,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
'' | 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=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
@ -202,11 +202,11 @@ 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
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
version: 1.0
|
||||
linter: jetbrains/qodana-jvm-community:latest
|
||||
projectJDK: 17
|
||||
projectJDK: "17"
|
||||
profile:
|
||||
name: qodana.recommended
|
||||
exclude:
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.6.0"
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
|
||||
}
|
||||
|
||||
rootProject.name = "easy-i18n"
|
||||
|
@ -1,8 +1,7 @@
|
||||
package de.marhali.easyi18n.io.parser;
|
||||
|
||||
import de.marhali.easyi18n.util.StringUtil;
|
||||
|
||||
import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.apache.commons.text.StringEscapeUtils;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Iterator;
|
||||
|
@ -7,9 +7,8 @@ import com.google.gson.JsonPrimitive;
|
||||
import de.marhali.easyi18n.model.TranslationNode;
|
||||
import de.marhali.easyi18n.model.TranslationValue;
|
||||
import de.marhali.easyi18n.util.StringUtil;
|
||||
|
||||
import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.apache.commons.text.StringEscapeUtils;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ -61,7 +60,7 @@ public class JsonMapper {
|
||||
if(content != null) {
|
||||
if(JsonArrayMapper.isArray(content)) {
|
||||
json.add(key, JsonArrayMapper.write(content));
|
||||
} else if(NumberUtils.isNumber(content)) {
|
||||
} else if(NumberUtils.isCreatable(content)) {
|
||||
json.add(key, new JsonPrimitive(NumberUtils.createNumber(content)));
|
||||
} else {
|
||||
json.add(key, new JsonPrimitive(StringEscapeUtils.unescapeJava(content)));
|
||||
|
@ -5,8 +5,7 @@ import de.marhali.easyi18n.util.StringUtil;
|
||||
import de.marhali.json5.Json5;
|
||||
import de.marhali.json5.Json5Array;
|
||||
import de.marhali.json5.Json5Primitive;
|
||||
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@ -40,7 +39,7 @@ public class Json5ArrayMapper extends ArrayMapper {
|
||||
} else {
|
||||
if(StringUtil.isHexString(element)) {
|
||||
array.add(Json5Primitive.of(element, true));
|
||||
} else if(NumberUtils.isNumber(element)) {
|
||||
} else if(NumberUtils.isCreatable(element)) {
|
||||
array.add(Json5Primitive.of(NumberUtils.createNumber(element)));
|
||||
} else {
|
||||
array.add(Json5Primitive.of(element));
|
||||
|
@ -6,9 +6,8 @@ import de.marhali.easyi18n.util.StringUtil;
|
||||
import de.marhali.json5.Json5Element;
|
||||
import de.marhali.json5.Json5Object;
|
||||
import de.marhali.json5.Json5Primitive;
|
||||
|
||||
import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.apache.commons.text.StringEscapeUtils;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ -61,7 +60,7 @@ public class Json5Mapper {
|
||||
json.add(key, Json5ArrayMapper.write(content));
|
||||
} else if(StringUtil.isHexString(content)) {
|
||||
json.add(key, Json5Primitive.of(content, true));
|
||||
} else if(NumberUtils.isNumber(content)) {
|
||||
} else if(NumberUtils.isCreatable(content)) {
|
||||
json.add(key, Json5Primitive.of(NumberUtils.createNumber(content)));
|
||||
} else {
|
||||
json.add(key, Json5Primitive.of(StringEscapeUtils.unescapeJava(content)));
|
||||
|
@ -5,9 +5,8 @@ import de.marhali.easyi18n.model.KeyPath;
|
||||
import de.marhali.easyi18n.model.TranslationValue;
|
||||
import de.marhali.easyi18n.util.KeyPathConverter;
|
||||
import de.marhali.easyi18n.util.StringUtil;
|
||||
|
||||
import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.apache.commons.text.StringEscapeUtils;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ -51,7 +50,7 @@ public class PropertiesMapper {
|
||||
|
||||
if(PropertiesArrayMapper.isArray(content)) {
|
||||
properties.put(simpleKey, PropertiesArrayMapper.write(content));
|
||||
} else if(NumberUtils.isNumber(content)) {
|
||||
} else if(NumberUtils.isCreatable(content)) {
|
||||
properties.put(simpleKey, NumberUtils.createNumber(content));
|
||||
} else {
|
||||
properties.put(simpleKey, StringEscapeUtils.unescapeJava(content));
|
||||
|
@ -3,9 +3,8 @@ package de.marhali.easyi18n.io.parser.yaml;
|
||||
import de.marhali.easyi18n.model.TranslationNode;
|
||||
import de.marhali.easyi18n.model.TranslationValue;
|
||||
import de.marhali.easyi18n.util.StringUtil;
|
||||
|
||||
import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.apache.commons.text.StringEscapeUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -53,7 +52,7 @@ public class YamlMapper {
|
||||
if(content != null) {
|
||||
if(YamlArrayMapper.isArray(content)) {
|
||||
section.put(key, YamlArrayMapper.write(content));
|
||||
} else if(NumberUtils.isNumber(content)) {
|
||||
} else if(NumberUtils.isCreatable(content)) {
|
||||
section.put(key, NumberUtils.createNumber(content));
|
||||
} else {
|
||||
section.put(key, StringEscapeUtils.unescapeJava(content));
|
||||
|
@ -24,7 +24,7 @@ public class StringUtil {
|
||||
|
||||
/**
|
||||
* Escapes control characters for the given input string.
|
||||
* Inspired by Apache Commons (see {@link org.apache.commons.lang.StringEscapeUtils}
|
||||
* Inspired by Apache Commons (see {@link org.apache.commons.text.StringEscapeUtils}
|
||||
* @param input The input string
|
||||
* @param skipStrings Should every string literal indication ("", '') be skipped? (Needed e.g. for json)
|
||||
* @return Escaped string
|
||||
|
Loading…
x
Reference in New Issue
Block a user