do not export internal multi map, update to Gradle 7.5

This commit is contained in:
Jörg Prante 2022-08-26 21:16:23 +02:00
parent bb8a53148b
commit 09c944e031
13 changed files with 68 additions and 45 deletions

View file

@ -1,14 +0,0 @@
# xbib Time
image:https://api.travis-ci.org/xbib/time.svg[title="Build status", link="https://travis-ci.org/xbib/time/"]
image:https://img.shields.io/sonar/http/nemo.sonarqube.com/org.xbib%3Atime/coverage.svg?style=flat-square[title="Coverage", link="https://sonarqube.com/dashboard/index?id=org.xbib%3Atime"]
image:https://maven-badges.herokuapp.com/maven-central/org.xbib/time/badge.svg[title="Maven Central", link="http://search.maven.org/#search%7Cga%7C1%7Cxbib%20time"]
image:https://img.shields.io/badge/License-Apache%202.0-blue.svg[title="Apache License 2.0", link="https://opensource.org/licenses/Apache-2.0"]
This is a bundle of time utilities for Java 8 Time API. It consists of
- Chronic: parsing natural language to compute time spans (from https://github.com/samtingleff/jchronic)
- Pretty: pretty printing time durations (from https://github.com/ocpsoft/prettytime)
- Format: format time descriptions (from https://github.com/JodaOrg/joda-time)
This project has no dependencies.

9
README.md Normal file
View file

@ -0,0 +1,9 @@
# xbib Time
This is a bundle of time utilities for Java 8 Time API. It consists of
- Chronic: parsing natural language to compute time spans (from https://github.com/samtingleff/jchronic)
- Pretty: pretty printing time durations (from https://github.com/ocpsoft/prettytime)
- Format: format time descriptions (from https://github.com/JodaOrg/joda-time)
This project has no dependencies.

View file

@ -4,7 +4,7 @@ plugins {
} }
wrapper { wrapper {
gradleVersion = "${project.property('gradle.wrapper.version')}" gradleVersion = libs.versions.gradle.get()
distributionType = Wrapper.DistributionType.ALL distributionType = Wrapper.DistributionType.ALL
} }
@ -25,14 +25,15 @@ ext {
apply plugin: 'java-library' apply plugin: 'java-library'
dependencies {
testImplementation "org.quartz-scheduler:quartz:${project.property('quartz.version')}"
testImplementation "com.google.caliper:caliper:${project.property('caliper.version')}"
}
apply from: rootProject.file('gradle/ide/idea.gradle') apply from: rootProject.file('gradle/ide/idea.gradle')
apply from: rootProject.file('gradle/repositories/maven.gradle') apply from: rootProject.file('gradle/repositories/maven.gradle')
apply from: rootProject.file('gradle/compile/java.gradle') apply from: rootProject.file('gradle/compile/java.gradle')
apply from: rootProject.file('gradle/test/junit5.gradle') apply from: rootProject.file('gradle/test/junit5.gradle')
apply from: rootProject.file('gradle/publishing/publication.gradle') apply from: rootProject.file('gradle/publishing/publication.gradle')
apply from: rootProject.file('gradle/publishing/sonatype.gradle') apply from: rootProject.file('gradle/publishing/sonatype.gradle')
dependencies {
testImplementation libs.quartz
testImplementation libs.caliper
}

View file

@ -1,8 +1,5 @@
group = org.xbib group = org.xbib
name = time name = time
version = 2.2.0 version = 2.3.0
org.gradle.warning.mode = ALL org.gradle.warning.mode = ALL
gradle.wrapper.version = 7.3.2
quartz.version = 2.3.2
caliper.version = 1.0-beta-2

View file

@ -1,12 +1,8 @@
def junitVersion = project.hasProperty('junit.version')?project.property('junit.version'):'5.8.2'
def hamcrestVersion = project.hasProperty('hamcrest.version')?project.property('hamcrest.version'):'2.2'
dependencies { dependencies {
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}" testImplementation libs.junit.jupiter.api
testImplementation "org.junit.jupiter:junit-jupiter-params:${junitVersion}" testImplementation libs.junit.jupiter.params
testImplementation "org.hamcrest:hamcrest-library:${hamcrestVersion}" testImplementation libs.hamcrest
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}" testRuntimeOnly libs.junit.jupiter.engine
} }
test { test {
@ -24,4 +20,16 @@ test {
"${result.skippedTestCount} skipped" "${result.skippedTestCount} skipped"
} }
} }
// for Guava using reflection on JDK classes which JDK17 does not like
jvmArgs '--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED',
'--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED',
'--add-exports=java.base/sun.nio.ch=ALL-UNNAMED',
'--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac=ALL-UNNAMED',
'--add-opens=java.base/java.lang=ALL-UNNAMED',
'--add-opens=java.base/java.lang.reflect=ALL-UNNAMED',
'--add-opens=java.base/java.io=ALL-UNNAMED',
'--add-opens=java.base/java.util=ALL-UNNAMED'
} }

Binary file not shown.

View file

@ -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-7.3.2-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

6
gradlew vendored
View file

@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \ org.gradle.wrapper.GradleWrapperMain \
"$@" "$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args. # Use "xargs" to parse quoted args.
# #
# With -n1 it outputs one arg per line, with the quotes and backslashes removed. # With -n1 it outputs one arg per line, with the quotes and backslashes removed.

14
gradlew.bat vendored
View file

@ -14,7 +14,7 @@
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View file

@ -1 +1,16 @@
rootProject.name = name dependencyResolutionManagement {
versionCatalogs {
libs {
version('gradle', '7.5')
version('groovy', '3.0.10')
version('junit', '5.8.2')
library('junit-jupiter-api', 'org.junit.jupiter', 'junit-jupiter-api').versionRef('junit')
library('junit-jupiter-params', 'org.junit.jupiter', 'junit-jupiter-params').versionRef('junit')
library('junit-jupiter-engine', 'org.junit.jupiter', 'junit-jupiter-engine').versionRef('junit')
library('hamcrest', 'org.hamcrest', 'hamcrest-library').version('2.2')
library('junit4', 'junit', 'junit').version('4.13.2')
library('quartz', 'org.quartz-scheduler', 'quartz').version('2.3.2')
library('caliper', 'com.google.caliper', 'caliper').version('1.0-beta-3')
}
}
}

View file

@ -9,5 +9,4 @@ module org.xbib.time {
exports org.xbib.time.pretty.i18n; exports org.xbib.time.pretty.i18n;
exports org.xbib.time.pretty.units; exports org.xbib.time.pretty.units;
exports org.xbib.time.schedule; exports org.xbib.time.schedule;
exports org.xbib.time.util;
} }

View file

@ -117,8 +117,8 @@ public class DayOfWeekField extends DefaultField {
protected Builder(boolean oneBased) { protected Builder(boolean oneBased) {
super(1, 7); super(1, 7);
this.oneBased = oneBased; this.oneBased = oneBased;
last = new LinkedHashSet<>(); this.last = new LinkedHashSet<>();
nth = new LinkedHashSetMultiMap<>(); this.nth = new LinkedHashSetMultiMap<>();
} }
@Override @Override

View file

@ -26,9 +26,9 @@ public class PrettyTimeI18n_in_ID_Test {
@Test @Test
public void testLocaleISOCorrectness() { public void testLocaleISOCorrectness() {
assertEquals("in", this.locale.getLanguage()); assertEquals("id", this.locale.getLanguage());
assertEquals("ID", this.locale.getCountry()); assertEquals("ID", this.locale.getCountry());
assertEquals("Bahasa Indonesia", this.locale.getDisplayLanguage()); assertEquals("Indonesia", this.locale.getDisplayLanguage());
assertEquals("Indonesia", this.locale.getDisplayCountry()); assertEquals("Indonesia", this.locale.getDisplayCountry());
} }