diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..0a0f148b
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,4 @@
+# https://help.github.com/articles/dealing-with-line-endings/
+* text eol=lf
+
+*.bat text eol=crlf
diff --git a/README.md b/README.md
index 8a78b1af..1f5a7b01 100644
--- a/README.md
+++ b/README.md
@@ -21,15 +21,15 @@ To answer these questions, this project presents a computational toolbox going b
`darts` can determine all possible darts checkouts and generate checkout tables for any range of scores.
This toolbox supports several dartboards, including the ‘standard’ London dartboard and the Quadro 240 board.
-In addition, several game modes are supported, including modes that require players to start or end with double or triple fields.
+In addition, several game modes are supported, including modes that require players to start or end with double or triple scores.
Finally, `darts` can provide output in several formats: easily readable Markdown tables, HTML tables for web pages and JSON objects for computer processing.
Currently, `darts` is available as a Java-based command-line application.
More information about the installation and use of this app can be found in the [Java-based command-line interface](cli/java-darts-cli) readme.
-You can also check out those [checkout tables](tables/md-darts-tables).
+You can also check out an extensive set of [checkout tables](tables/md-darts-tables) generated using `darts`.
## License
Copyright © 2023 Maurits Silvis
-This source code package is subject to the terms and conditions defined in the GNU General Public License v3.0, which can be found in the file [LICENSE.md](LICENSE.md), or later.
+This source code package is subject to the terms and conditions defined in the [GNU General Public License v3.0](LICENSE.md) or later.
diff --git a/api/README.md b/api/README.md
index 9aecdc66..014277e0 100644
--- a/api/README.md
+++ b/api/README.md
@@ -1,10 +1,10 @@
-# APIs
+# darts APIs
> APIs for the `darts` toolbox
## Introduction
-This part of the [darts](https://github.com/mauritssilvis/darts) project provides application programming interfaces (APIs) for `darts`, a computational toolbox aimed at the game of darts.
+This part of the [darts](..) project provides application programming interfaces (APIs) for `darts`, a computational toolbox aimed at the game of darts.
## Overview
@@ -16,4 +16,4 @@ Currently, APIs are available in the following languages:
Copyright © 2023 Maurits Silvis
-This source code package is subject to the terms and conditions defined in the GNU General Public License v3.0, which can be found in the file [LICENSE.md](../LICENSE.md), or later.
+This source code package is subject to the terms and conditions defined in the [GNU General Public License v3.0](../LICENSE.md) or later.
diff --git a/api/java-darts-api/.idea/inspectionProfiles/All.xml b/api/java-darts-api/.idea/inspectionProfiles/All.xml
index a2b8fc57..6d91a10c 100644
--- a/api/java-darts-api/.idea/inspectionProfiles/All.xml
+++ b/api/java-darts-api/.idea/inspectionProfiles/All.xml
@@ -17,6 +17,9 @@
+
+
+
@@ -98,6 +101,7 @@
+
@@ -202,6 +206,8 @@
+
+
@@ -215,12 +221,16 @@
+
+
+
+
@@ -247,6 +257,7 @@
+
@@ -282,6 +293,8 @@
+
+
@@ -321,10 +334,12 @@
+
+
@@ -362,11 +377,14 @@
+
+
+
@@ -407,6 +425,7 @@
+
@@ -485,6 +504,7 @@
+
@@ -494,12 +514,14 @@
+
+
@@ -514,7 +536,6 @@
-
@@ -534,6 +555,8 @@
+
+
@@ -557,6 +580,7 @@
+
@@ -601,12 +625,17 @@
+
+
+
+
+
@@ -639,7 +668,15 @@
+
+
+
+
+
+
+
+
@@ -655,7 +692,6 @@
-
@@ -681,7 +717,6 @@
-
@@ -697,6 +732,7 @@
+
@@ -719,7 +755,6 @@
-
@@ -731,6 +766,7 @@
+
@@ -774,7 +810,6 @@
-
@@ -794,6 +829,7 @@
+
@@ -826,7 +862,9 @@
+
+
@@ -861,11 +899,13 @@
+
+
\ No newline at end of file
diff --git a/api/java-darts-api/.idea/inspectionProfiles/Selected.xml b/api/java-darts-api/.idea/inspectionProfiles/Selected.xml
index 87c5b8e8..99cd5c5e 100644
--- a/api/java-darts-api/.idea/inspectionProfiles/Selected.xml
+++ b/api/java-darts-api/.idea/inspectionProfiles/Selected.xml
@@ -17,6 +17,9 @@
+
+
+
@@ -94,6 +97,7 @@
+
@@ -208,11 +212,15 @@
+
+
+
+
@@ -275,6 +283,8 @@
+
+
@@ -311,10 +321,12 @@
+
+
@@ -355,8 +367,10 @@
+
+
@@ -393,6 +407,7 @@
+
@@ -464,6 +479,7 @@
+
@@ -473,12 +489,14 @@
+
+
@@ -493,7 +511,6 @@
-
@@ -513,6 +530,8 @@
+
+
+
@@ -579,12 +599,17 @@
+
+
+
+
+
@@ -617,7 +642,15 @@
+
+
+
+
+
+
+
+
@@ -633,7 +666,6 @@
-
@@ -658,7 +690,6 @@
-
@@ -674,6 +705,7 @@
+
@@ -696,7 +728,6 @@
-
@@ -708,6 +739,7 @@
+
@@ -751,7 +783,6 @@
-
@@ -797,7 +828,9 @@
+
+
@@ -831,11 +864,13 @@
+
+
\ No newline at end of file
diff --git a/api/java-darts-api/.idea/misc.xml b/api/java-darts-api/.idea/misc.xml
index 7cf22193..976db11d 100644
--- a/api/java-darts-api/.idea/misc.xml
+++ b/api/java-darts-api/.idea/misc.xml
@@ -1,4 +1,5 @@
+
-
+
\ No newline at end of file
diff --git a/api/java-darts-api/CHANGELOG.md b/api/java-darts-api/CHANGELOG.md
index 11f68b00..1368558b 100644
--- a/api/java-darts-api/CHANGELOG.md
+++ b/api/java-darts-api/CHANGELOG.md
@@ -2,9 +2,24 @@
All notable changes to the [Java darts API](https://github.com/mauritssilvis/darts/tree/main/api/java-darts-api) project are documented in this file.
-The file format is based on [keep a changelog](https://keepachangelog.com/en/1.0.0/),
+The file format is based on [keep a changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [semantic versioning](https://semver.org/spec/v2.0.0.html).
+## [1.0.0-RC1] - 2023-10-12
+
+### Changed
+
+#### Documentation
+
+- Improve the project documentation.
+
+#### Dependencies
+
+- Update the Java version from 20 to 21.
+- Update the Gradle version from 8.3 to 8.4.
+- Update the refreshVersions version from 0.60.0 to 0.60.3.
+- Update the Lombok version from 1.18.28 to 1.18.30.
+
## [0.8.0] - 2023-08-28
### Changed
@@ -21,7 +36,7 @@ and this project adheres to [semantic versioning](https://semver.org/spec/v2.0.0
- Update the Gradle version from 8.1.1 to 8.3.
- Update the Foojay resolver convention version from 0.4.0 to 0.7.0.
-- Update the refreshVersions version from 0.51 to 0.60.
+- Update the refreshVersions version from 0.51.0 to 0.60.0.
- Update the Lombok version from 1.18.26 to 1.18.28.
## [0.7.2] - 2023-05-06
diff --git a/api/java-darts-api/README.md b/api/java-darts-api/README.md
index 4e8996c9..85d9dc3a 100644
--- a/api/java-darts-api/README.md
+++ b/api/java-darts-api/README.md
@@ -7,7 +7,7 @@
This part of the [darts](https://github.com/mauritssilvis/darts) > [APIs](https://github.com/mauritssilvis/darts/tree/main/api) project provides a Java API for `darts`, a computational toolbox aimed at the game of darts.
This API defines the features of Java implementations of `darts`.
-To explore the Java API of `darts`, dive into the code.
+To explore the Java API of `darts`, dive into the [code](src).
Alternatively, you can download the latest Java darts API release from https://github.com/mauritssilvis/darts/releases.
The release history of the Java darts API project is contained in the [changelog](CHANGELOG.md).
@@ -18,4 +18,4 @@ If you would like to explore extensive checkout tables for different types of da
Copyright © 2023 Maurits Silvis
-This source code package is subject to the terms and conditions defined in the GNU General Public License v3.0, which can be found in the file [LICENSE.md](LICENSE.md), or later.
+This source code package is subject to the terms and conditions defined in the [GNU General Public License v3.0](LICENSE.md) or later.
diff --git a/api/java-darts-api/gradle/libs.versions.toml b/api/java-darts-api/gradle/libs.versions.toml
index 6e0f1be6..1fa24fad 100644
--- a/api/java-darts-api/gradle/libs.versions.toml
+++ b/api/java-darts-api/gradle/libs.versions.toml
@@ -6,10 +6,10 @@ io-github-gradle-nexus-publish-plugin = { id = "io.github.gradle-nexus.publish-p
[versions]
-java-jdk = "20"
+java-jdk = "21"
-java-darts = "0.8.0"
+java-darts = "1.0.0-RC1"
[libraries]
-lombok = "org.projectlombok:lombok:1.18.28"
+lombok = "org.projectlombok:lombok:1.18.30"
diff --git a/api/java-darts-api/gradle/wrapper/gradle-wrapper.jar b/api/java-darts-api/gradle/wrapper/gradle-wrapper.jar
index c1962a79..7f93135c 100644
Binary files a/api/java-darts-api/gradle/wrapper/gradle-wrapper.jar and b/api/java-darts-api/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/api/java-darts-api/gradle/wrapper/gradle-wrapper.properties b/api/java-darts-api/gradle/wrapper/gradle-wrapper.properties
index c30b486a..1bbf4554 100644
--- a/api/java-darts-api/gradle/wrapper/gradle-wrapper.properties
+++ b/api/java-darts-api/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,8 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
+# TODO: Select a Gradle version that officially supports running on Java 21
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
+validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/api/java-darts-api/gradlew b/api/java-darts-api/gradlew
index aeb74cbb..1aa94a42 100644
--- a/api/java-darts-api/gradlew
+++ b/api/java-darts-api/gradlew
@@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
+# 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
@@ -130,10 +131,13 @@ 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.
@@ -141,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
@@ -149,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
@@ -198,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" \
diff --git a/api/java-darts-api/gradlew.bat b/api/java-darts-api/gradlew.bat
index 6689b85b..93e3f59f 100644
--- a/api/java-darts-api/gradlew.bat
+++ b/api/java-darts-api/gradlew.bat
@@ -1,92 +1,92 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%"=="" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%"=="" set DIRNAME=.
-@rem This is normally unused
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-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.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-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.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if %ERRORLEVEL% equ 0 goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-set EXIT_CODE=%ERRORLEVEL%
-if %EXIT_CODE% equ 0 set EXIT_CODE=1
-if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
-exit /b %EXIT_CODE%
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%"=="" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%"=="" set DIRNAME=.
+@rem This is normally unused
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+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.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+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.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if %ERRORLEVEL% equ 0 goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+set EXIT_CODE=%ERRORLEVEL%
+if %EXIT_CODE% equ 0 set EXIT_CODE=1
+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
+exit /b %EXIT_CODE%
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/api/java-darts-api/settings.gradle.kts b/api/java-darts-api/settings.gradle.kts
index 3e727544..486043af 100644
--- a/api/java-darts-api/settings.gradle.kts
+++ b/api/java-darts-api/settings.gradle.kts
@@ -5,8 +5,7 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
- id("de.fayard.refreshVersions") version "0.60.0"
+ id("de.fayard.refreshVersions") version "0.60.3"
}
rootProject.name = "java-darts-api"
-
diff --git a/cli/README.md b/cli/README.md
index ab784645..482921f2 100644
--- a/cli/README.md
+++ b/cli/README.md
@@ -1,10 +1,10 @@
-# CLIs
+# darts CLIs
> Command-line interfaces for the `darts` toolbox
## Introduction
-This part of the [darts](https://github.com/mauritssilvis/darts) project provides command-line interfaces (CLIs) for `darts`, a computational toolbox aimed at the game of darts.
+This part of the [darts](..) project provides command-line interfaces (CLIs) for `darts`, a computational toolbox aimed at the game of darts.
## Overview
@@ -16,4 +16,4 @@ Currently, command-line interfaces are available in the following languages:
Copyright © 2023 Maurits Silvis
-This source code package is subject to the terms and conditions defined in the GNU General Public License v3.0, which can be found in the file [LICENSE.md](../LICENSE.md), or later.
+This source code package is subject to the terms and conditions defined in the [GNU General Public License v3.0](../LICENSE.md) or later.
diff --git a/cli/java-darts-cli/.idea/inspectionProfiles/All.xml b/cli/java-darts-cli/.idea/inspectionProfiles/All.xml
index a2b8fc57..6d91a10c 100644
--- a/cli/java-darts-cli/.idea/inspectionProfiles/All.xml
+++ b/cli/java-darts-cli/.idea/inspectionProfiles/All.xml
@@ -17,6 +17,9 @@
+
+
+
@@ -98,6 +101,7 @@
+
@@ -202,6 +206,8 @@
+
+
@@ -215,12 +221,16 @@
+
+
+
+
@@ -247,6 +257,7 @@
+
@@ -282,6 +293,8 @@
+
+
@@ -321,10 +334,12 @@
+
+
@@ -362,11 +377,14 @@
+
+
+
@@ -407,6 +425,7 @@
+
@@ -485,6 +504,7 @@
+
@@ -494,12 +514,14 @@
+
+
@@ -514,7 +536,6 @@
-
@@ -534,6 +555,8 @@
+
+
@@ -557,6 +580,7 @@
+
@@ -601,12 +625,17 @@
+
+
+
+
+
@@ -639,7 +668,15 @@
+
+
+
+
+
+
+
+
@@ -655,7 +692,6 @@
-
@@ -681,7 +717,6 @@
-
@@ -697,6 +732,7 @@
+
@@ -719,7 +755,6 @@
-
@@ -731,6 +766,7 @@
+
@@ -774,7 +810,6 @@
-
@@ -794,6 +829,7 @@
+
@@ -826,7 +862,9 @@
+
+
@@ -861,11 +899,13 @@
+
+
\ No newline at end of file
diff --git a/cli/java-darts-cli/.idea/inspectionProfiles/Selected.xml b/cli/java-darts-cli/.idea/inspectionProfiles/Selected.xml
index 87c5b8e8..99cd5c5e 100644
--- a/cli/java-darts-cli/.idea/inspectionProfiles/Selected.xml
+++ b/cli/java-darts-cli/.idea/inspectionProfiles/Selected.xml
@@ -17,6 +17,9 @@
+
+
+
@@ -94,6 +97,7 @@
+
@@ -208,11 +212,15 @@
+
+
+
+
@@ -275,6 +283,8 @@
+
+
@@ -311,10 +321,12 @@
+
+
@@ -355,8 +367,10 @@
+
+
@@ -393,6 +407,7 @@
+
@@ -464,6 +479,7 @@
+
@@ -473,12 +489,14 @@
+
+
@@ -493,7 +511,6 @@
-
@@ -513,6 +530,8 @@
+
+
+
@@ -579,12 +599,17 @@
+
+
+
+
+
@@ -617,7 +642,15 @@
+
+
+
+
+
+
+
+
@@ -633,7 +666,6 @@
-
@@ -658,7 +690,6 @@
-
@@ -674,6 +705,7 @@
+
@@ -696,7 +728,6 @@
-
@@ -708,6 +739,7 @@
+
@@ -751,7 +783,6 @@
-
@@ -797,7 +828,9 @@
+
+
@@ -831,11 +864,13 @@
+
+
\ No newline at end of file
diff --git a/cli/java-darts-cli/.idea/misc.xml b/cli/java-darts-cli/.idea/misc.xml
index 7cf22193..976db11d 100644
--- a/cli/java-darts-cli/.idea/misc.xml
+++ b/cli/java-darts-cli/.idea/misc.xml
@@ -1,4 +1,5 @@
+
-
+
\ No newline at end of file
diff --git a/cli/java-darts-cli/CHANGELOG.md b/cli/java-darts-cli/CHANGELOG.md
index 10eca5fa..875047c5 100644
--- a/cli/java-darts-cli/CHANGELOG.md
+++ b/cli/java-darts-cli/CHANGELOG.md
@@ -2,9 +2,24 @@
All notable changes to the [Java darts CLI](https://github.com/mauritssilvis/darts/tree/main/cli/java-darts-cli) project are documented in this file.
-The file format is based on [keep a changelog](https://keepachangelog.com/en/1.0.0/),
+The file format is based on [keep a changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [semantic versioning](https://semver.org/spec/v2.0.0.html).
+## [1.0.0-RC1] - 2023-10-12
+
+### Changed
+
+#### Documentation
+
+- Improve the project documentation.
+
+#### Dependencies
+
+- Update the Java version from 20 to 21.
+- Update the Gradle version from 8.3 to 8.4.
+- Update the refreshVersions version from 0.60.0 to 0.60.3.
+- Update the Lombok version from 1.18.28 to 1.18.30.
+
## [0.8.0] - 2023-08-28
### Changed
@@ -21,7 +36,7 @@ and this project adheres to [semantic versioning](https://semver.org/spec/v2.0.0
- Update the Gradle version from 8.1.1 to 8.3.
- Update the Foojay resolver convention version from 0.4.0 to 0.7.0.
-- Update the refreshVersions version from 0.51 to 0.60.
+- Update the refreshVersions version from 0.51.0 to 0.60.0.
- Update the Lombok version from 1.18.26 to 1.18.28.
- Update the picocli version from 4.7.3 to 4.7.5.
- Update the JUnit version from 5.9.3 to 5.10.0.
diff --git a/cli/java-darts-cli/README.md b/cli/java-darts-cli/README.md
index 7c6cd3a6..0dbd40cd 100644
--- a/cli/java-darts-cli/README.md
+++ b/cli/java-darts-cli/README.md
@@ -4,7 +4,7 @@
## Introduction
-This part of the [darts](https://github.com/mauritssilvis/darts) > [CLIs](https://github.com/mauritssilvis/darts/tree/main/cli) project provides a Java-based command-line interface for `darts` , a computational toolbox aimed at the game of darts.
+This part of the [darts](https://github.com/mauritssilvis/darts) > [CLIs](https://github.com/mauritssilvis/darts/tree/main/cli) project provides a Java-based command-line interface for `darts`, a computational toolbox aimed at the game of darts.
This command-line interface, referred to as `darts` in what follows, can be used to:
- Determine all possible darts checkouts.
@@ -27,17 +27,17 @@ If you would like to explore extensive checkout tables for different types of da
To use `darts`, you have to execute the following steps.
-### 1.1 Install Java 20+
+### 1.1 Install Java 21+
-`darts` requires the installation of Java 20 or higher.
+`darts` requires the installation of Java 21 or higher.
You can install the latest version of Java as follows:
- Go to https://adoptium.net/temurin/releases/.
-- Select the latest release version, currently Java 20.
+- Select the latest long-term support (LTS) version of Java, currently Java 21.
- Download the archive or installer matching your system.
- Extract or install the files in a convenient location.
-- Set the `JAVA_HOME` environment variable to the full path of the extracted `jdk-XY+Z` folder.
+- Set the `JAVA_HOME` environment variable to the full path of the created `jdk-X+Y` folder. Here, `X` and `Y` are placeholders for version numbers.
### 1.2 Install `darts`
@@ -158,8 +158,10 @@ This table, which is truncated for brevity, looks as follows:
```
Note that a single 3 and a triple 1 (T1) have the same score.
-Therefore, these fields are listed together, and their row has a multiplicity of two.
+By default, these fields are listed together, and their row has a multiplicity of two.
In other words, this row represents two checkouts.
+With the default configuration, checkouts for a given score are sorted in descending order.
+That is, for a given score, checkouts that start with higher throws are listed before checkouts that start with lower scores.
The `darts` toolbox can also generate a checkout table for a single score.
For example, to find 501-point checkouts, pass the same value as the minimum and maximum score:
@@ -258,7 +260,7 @@ Single final scores are accepted with the selected checkout mode, and a finish o
##### Master out
-To allow for master, i.e., double or triple, checkouts, use a command like:
+To select master, i.e., double or triple, checkouts, use a command like:
```shell
darts checkouts -j master 20 21
@@ -349,12 +351,12 @@ This option takes a non-negative integer as a parameter:
Two different throw modes can be used if the number of throws is fixed.
These throw modes are represented by the two values the `-m` and `--throw-mode` options can take:
-- `optimal` for finding all [optimal](#optimal) checkouts (default);
+- `optimal` for finding only [optimal](#optimal) checkouts (default);
- `fixed` for finding [all](#fixed) checkouts for a given number of throws.
##### Optimal
-To look for all *optimal* checkouts with a fixed number of darts, pass the desired number to the `-n` or `--throws` option.
+To find only the *optimal* checkouts with a fixed number of darts, pass the desired number to the `-n` or `--throws` option.
The throw mode will then take its default value, `optimal`.
For example:
@@ -374,7 +376,7 @@ The resulting output is as follows:
| 4 | * | * | 0 |
```
-Here, only the checkouts that require a minimum of two darts are found.
+Here, only the checkouts that require two darts are found.
Scores of 2 and 4 can be reached by hitting one double.
Therefore, these checkouts are not shown.
@@ -470,8 +472,24 @@ darts checkouts -o html 1 4 \
| sed -r "s|?span( class=\"\\w\")?>||g"
```
+This command has the following output:
+
+```html
+
+ Score | 1 | 2 | # |
+ 1 | * | * | 0 |
+ 2 | * | * | 1 |
+ D1 | - | 1 |
+ 3 | * | * | 1 |
+ 1 | D1 | 1 |
+ 4 | * | * | 1 |
+ D2 | - | 1 |
+
+```
+
##### JSON
+Markdown and HTML tables aren't very suitable for computer processing.
To obtain a JSON object that contains all checkouts for a range of scores, use a command like:
```shell
@@ -558,7 +576,7 @@ The following command can be used to generate a checkout table for a double-out
darts checkouts -b quadro 501 501
```
-The resulting output shows there are six seven-dart checkouts for a score of 501 points:
+The resulting output shows there are six seven-dart checkouts with a Quadro board for a score of 501 points:
```markdown
| Score | 1 | 2 | 3 | 4 | 5 | 6 | 7 | # |
@@ -597,9 +615,8 @@ The resulting (truncated) checkout table is:
##### The checkout finder type
By default, the `darts checkouts` subcommand uses an optimized descending checkout finder.
-The `darts` toolbox, however, also provides a Cartesian checkout finder, which uses a brute-force method that scans all possible combinations of available dartboard fields.
-In rare cases, you may want to change the checkout finder.
-To that end, use the `-f` or `--finder` option, which supports the following values:
+The `darts` toolbox, however, also provides a Cartesian checkout finder, which uses a brute-force method to find checkouts and sorts results differently.
+If you want to change the checkout finder, use the `-f` or `--finder` option, which supports the following values:
- `descending` for an optimized descending checkout finder (default);
- `Cartesian` for a brute-force [Cartesian](#cartesian) checkout finder.
@@ -629,11 +646,14 @@ The resulting checkout table looks as follows:
| | 19 | D1 | 1 |
```
-In checkout tables generated using the Cartesian checkout finder, checkouts are sorted by dartboard field score (in ascending order) and type (single, double, triple, quadruple).
+Checkout tables generated using the Cartesian checkout finder look different than tables produced by the descending checkout finder.
+With the Cartesian checkout finder, checkouts for a given score are sorted by throw score (in ascending order) and type (single, double, triple, quadruple).
Additionally, checkouts are not summarized.
That is, each possible checkout is represented using its own row.
Consequently, checkout tables can become very long when many checkouts exist.
-Moreover, the brute-force search method used by the Cartesian checkout finder tends to be slow for scores that require more than five darts.
+
+The Cartesian checkout finder looks for checkouts with a brute-force method that scans all possible combinations of available dartboard fields.
+Therefore, this checkout finder tends to be slow for scores that require more than five darts.
### 2.2 Print a dartboard
@@ -797,7 +817,9 @@ This feature mainly exists for debugging purposes and is not discussed further h
### 2.3 Get help
-In addition to consulting this online documentation, one can request command-line help from `darts` itself.
+In addition to consulting the [online documentation](https://mauritssilvis.nl/software/darts/cli/java-darts-cli), one can request command-line help from `darts` itself.
+
+#### 2.3.1 General command-line help
To receive general information about `darts` or to see which subcommands are available, execute:
@@ -807,6 +829,44 @@ darts
Alternatively, run any of the following commands: `darts help`, `darts -h` or `darts --help`.
+`darts` then returns the following information:
+
+```text
+darts -- A computational toolbox aimed at the game of darts
+
+Usage: darts [-hV] [COMMAND]
+
+Determine all possible darts checkouts and generate checkout tables for any
+range of scores.
+
+ darts checkouts 20 21
+ darts checkouts -i double -j double 501 501
+ darts checkouts -o html 1 4
+ darts checkouts -b quadro 901 901
+
+Print one of the supported dartboards.
+
+ darts boards london
+ darts boards -o json quadro
+
+Options:
+ -h, --help Show this help message and exit.
+ -V, --version Print version information and exit.
+
+Commands:
+ help Display help information about the specified command.
+ boards Print a dartboard.
+ checkouts Generate a darts checkout table.
+
+Online documentation:
+ https://mauritssilvis.nl/software/darts/cli/java-darts-cli
+
+Copyright © 2023 Maurits Silvis
+SPDX-License-Identifier: GPL-3.0-or-later
+```
+
+#### 2.3.2 `darts checkouts` command-line help
+
You can receive help with the `darts checkouts` subcommand by executing:
```shell
@@ -815,6 +875,63 @@ darts checkouts
Otherwise, execute `darts help checkouts`, `darts checkouts -h` or `darts checkouts --help`.
+The corresponding (truncated) output looks as follows:
+
+```text
+Generate a darts checkout table.
+
+Usage: darts checkouts [-hV] [-b=] [-i=] [-j=]
+ [-n=] [-m=] [-f=]
+ [-o=
+
+
+
@@ -98,6 +101,7 @@
+
@@ -202,6 +206,8 @@
+
+
@@ -215,12 +221,16 @@
+
+
+
+
@@ -247,6 +257,7 @@
+
@@ -282,6 +293,8 @@
+
+
@@ -321,10 +334,12 @@
+
+
@@ -362,11 +377,14 @@
+
+
+
@@ -407,6 +425,7 @@
+
@@ -485,6 +504,7 @@
+
@@ -494,12 +514,14 @@
+
+
@@ -514,7 +536,6 @@
-
@@ -534,6 +555,8 @@
+
+
@@ -557,6 +580,7 @@
+
@@ -601,12 +625,17 @@
+
+
+
+
+
@@ -639,7 +668,15 @@
+
+
+
+
+
+
+
+
@@ -655,7 +692,6 @@
-
@@ -681,7 +717,6 @@
-
@@ -697,6 +732,7 @@
+
@@ -719,7 +755,6 @@
-
@@ -731,6 +766,7 @@
+
@@ -774,7 +810,6 @@
-
@@ -794,6 +829,7 @@
+
@@ -826,7 +862,9 @@
+
+
@@ -861,11 +899,13 @@
+
+
\ No newline at end of file
diff --git a/core/java-darts-core/.idea/inspectionProfiles/Selected.xml b/core/java-darts-core/.idea/inspectionProfiles/Selected.xml
index 87c5b8e8..99cd5c5e 100644
--- a/core/java-darts-core/.idea/inspectionProfiles/Selected.xml
+++ b/core/java-darts-core/.idea/inspectionProfiles/Selected.xml
@@ -17,6 +17,9 @@
+
+
+
@@ -94,6 +97,7 @@
+
@@ -208,11 +212,15 @@
+
+
+
+
@@ -275,6 +283,8 @@
+
+
@@ -311,10 +321,12 @@
+
+
@@ -355,8 +367,10 @@
+
+
@@ -393,6 +407,7 @@
+
@@ -464,6 +479,7 @@
+
@@ -473,12 +489,14 @@
+
+
@@ -493,7 +511,6 @@
-
@@ -513,6 +530,8 @@
+
+
+
@@ -579,12 +599,17 @@
+
+
+
+
+
@@ -617,7 +642,15 @@
+
+
+
+
+
+
+
+
@@ -633,7 +666,6 @@
-
@@ -658,7 +690,6 @@
-
@@ -674,6 +705,7 @@
+
@@ -696,7 +728,6 @@
-
@@ -708,6 +739,7 @@
+
@@ -751,7 +783,6 @@
-
@@ -797,7 +828,9 @@
+
+
@@ -831,11 +864,13 @@
+
+
\ No newline at end of file
diff --git a/core/java-darts-core/.idea/misc.xml b/core/java-darts-core/.idea/misc.xml
index 7cf22193..976db11d 100644
--- a/core/java-darts-core/.idea/misc.xml
+++ b/core/java-darts-core/.idea/misc.xml
@@ -1,4 +1,5 @@
+
-
+
\ No newline at end of file
diff --git a/core/java-darts-core/CHANGELOG.md b/core/java-darts-core/CHANGELOG.md
index 8b2dc69f..4ff0db75 100644
--- a/core/java-darts-core/CHANGELOG.md
+++ b/core/java-darts-core/CHANGELOG.md
@@ -2,9 +2,24 @@
All notable changes to the [Java darts core](https://github.com/mauritssilvis/darts/tree/main/core/java-darts-core) project are documented in this file.
-The file format is based on [keep a changelog](https://keepachangelog.com/en/1.0.0/),
+The file format is based on [keep a changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [semantic versioning](https://semver.org/spec/v2.0.0.html).
+## [1.0.0-RC1] - 2023-10-12
+
+### Changed
+
+#### Documentation
+
+- Improve the project documentation.
+
+#### Dependencies
+
+- Update the Java version from 20 to 21.
+- Update the Gradle version from 8.3 to 8.4.
+- Update the refreshVersions version from 0.60.0 to 0.60.3.
+- Update the Lombok version from 1.18.28 to 1.18.30.
+
## [0.8.0] - 2023-08-28
### Changed
@@ -21,7 +36,7 @@ and this project adheres to [semantic versioning](https://semver.org/spec/v2.0.0
- Update the Gradle version from 8.1.1 to 8.3.
- Update the Foojay resolver convention version from 0.4.0 to 0.7.0.
-- Update the refreshVersions version from 0.51 to 0.60.
+- Update the refreshVersions version from 0.51.0 to 0.60.0.
- Update the Lombok version from 1.18.26 to 1.18.28.
- Update the JUnit version from 5.9.3 to 5.10.0.
diff --git a/core/java-darts-core/README.md b/core/java-darts-core/README.md
index b64d4cd6..995f0f75 100644
--- a/core/java-darts-core/README.md
+++ b/core/java-darts-core/README.md
@@ -17,7 +17,7 @@ Additionally, this implementation lets you:
- Set the number of darts.
- Pick the output format.
-To explore the Java implementation of `darts`, dive into the code.
+To explore the Java implementation of `darts`, dive into the [code](src).
Alternatively, you can download the latest Java darts core release from https://github.com/mauritssilvis/darts/releases.
The release history of the Java darts core project is contained in the [changelog](CHANGELOG.md).
@@ -28,4 +28,4 @@ If you would like to explore extensive checkout tables for different types of da
Copyright © 2023 Maurits Silvis
-This source code package is subject to the terms and conditions defined in the GNU General Public License v3.0, which can be found in the file [LICENSE.md](LICENSE.md), or later.
+This source code package is subject to the terms and conditions defined in the [GNU General Public License v3.0](LICENSE.md) or later.
diff --git a/core/java-darts-core/gradle/libs.versions.toml b/core/java-darts-core/gradle/libs.versions.toml
index 5304a90f..d073c312 100644
--- a/core/java-darts-core/gradle/libs.versions.toml
+++ b/core/java-darts-core/gradle/libs.versions.toml
@@ -6,15 +6,15 @@ io-github-gradle-nexus-publish-plugin = { id = "io.github.gradle-nexus.publish-p
[versions]
-java-jdk = "20"
+java-jdk = "21"
-java-darts = "0.8.0"
+java-darts = "1.0.0-RC1"
junit-jupiter = "5.10.0"
[libraries]
-lombok = "org.projectlombok:lombok:1.18.28"
+lombok = "org.projectlombok:lombok:1.18.30"
java-darts-api = { group = "nl.mauritssilvis.darts.java", name = "java-darts-api", version.ref = "java-darts" }
diff --git a/core/java-darts-core/gradle/wrapper/gradle-wrapper.jar b/core/java-darts-core/gradle/wrapper/gradle-wrapper.jar
index c1962a79..7f93135c 100644
Binary files a/core/java-darts-core/gradle/wrapper/gradle-wrapper.jar and b/core/java-darts-core/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/core/java-darts-core/gradle/wrapper/gradle-wrapper.properties b/core/java-darts-core/gradle/wrapper/gradle-wrapper.properties
index c30b486a..1bbf4554 100644
--- a/core/java-darts-core/gradle/wrapper/gradle-wrapper.properties
+++ b/core/java-darts-core/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,8 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
+# TODO: Select a Gradle version that officially supports running on Java 21
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
+validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/core/java-darts-core/gradlew b/core/java-darts-core/gradlew
index aeb74cbb..1aa94a42 100644
--- a/core/java-darts-core/gradlew
+++ b/core/java-darts-core/gradlew
@@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
+# 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
@@ -130,10 +131,13 @@ 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.
@@ -141,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
@@ -149,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
@@ -198,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" \
diff --git a/core/java-darts-core/gradlew.bat b/core/java-darts-core/gradlew.bat
index 6689b85b..93e3f59f 100644
--- a/core/java-darts-core/gradlew.bat
+++ b/core/java-darts-core/gradlew.bat
@@ -1,92 +1,92 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%"=="" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%"=="" set DIRNAME=.
-@rem This is normally unused
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-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.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-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.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if %ERRORLEVEL% equ 0 goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-set EXIT_CODE=%ERRORLEVEL%
-if %EXIT_CODE% equ 0 set EXIT_CODE=1
-if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
-exit /b %EXIT_CODE%
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%"=="" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%"=="" set DIRNAME=.
+@rem This is normally unused
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+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.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+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.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if %ERRORLEVEL% equ 0 goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+set EXIT_CODE=%ERRORLEVEL%
+if %EXIT_CODE% equ 0 set EXIT_CODE=1
+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
+exit /b %EXIT_CODE%
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/core/java-darts-core/settings.gradle.kts b/core/java-darts-core/settings.gradle.kts
index d157bd79..05d9eeb2 100644
--- a/core/java-darts-core/settings.gradle.kts
+++ b/core/java-darts-core/settings.gradle.kts
@@ -5,7 +5,7 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
- id("de.fayard.refreshVersions") version "0.60.0"
+ id("de.fayard.refreshVersions") version "0.60.3"
}
rootProject.name = "java-darts-core"
@@ -15,4 +15,3 @@ val apiDir = "../../api/java-darts-api"
if (file(apiDir).isDirectory) {
includeBuild(apiDir)
}
-
diff --git a/scripts/do-single-tag b/scripts/do-single-tag
new file mode 100644
index 00000000..8f0da4c7
--- /dev/null
+++ b/scripts/do-single-tag
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# Check project identifier
+if [ $# -eq 0 ] || [ "${1}" = "" ]; then
+ echo "Error: No project identifier supplied."
+ exit
+fi
+
+id=${1}
+
+if [ ! -f "${id}-properties" ]; then
+ echo "Error: No properties found for project identifier ${id}."
+ exit
+fi
+
+# Check version
+if [ $# -eq 0 ] || [ "${2}" = "" ]; then
+ echo "Error: No version supplied."
+ exit
+fi
+
+version=${2}
+
+# Check branch
+branch=$(git rev-parse --abbrev-ref HEAD)
+
+if [ "${branch}" != "main" ]; then
+ echo "Error: Not on main branch."
+ exit
+fi
+
+# Get properties
+# shellcheck source=java-darts-properties
+. "./${id}-properties"
+
+# Tag
+message="${name} ${version}"
+tag="${label,,}-${version,,}"
+git tag -am "${message}" "${tag}"
diff --git a/scripts/java-darts-properties b/scripts/java-darts-properties
index 3aa7c77f..4167f60f 100644
--- a/scripts/java-darts-properties
+++ b/scripts/java-darts-properties
@@ -1,6 +1,12 @@
#!/bin/sh
-# Project names
+# Project name
+name="Java darts"
+
+# Project label
+label="java-darts"
+
+# Subproject names
name_prefix="Java darts"
names=(
@@ -9,7 +15,7 @@ names=(
"CLI"
)
-# Project labels
+# Subproject labels
label_prefix="java-darts"
labels=(
diff --git a/scripts/java-darts-tag b/scripts/java-darts-tag
index fa51ef90..e1d3b007 100644
--- a/scripts/java-darts-tag
+++ b/scripts/java-darts-tag
@@ -4,4 +4,4 @@
id="java-darts"
# Tag
-./do-tag "${id}" "${1}"
+./do-single-tag "${id}" "${1}"