Skip to content

Commit

Permalink
Merge pull request #11 from mauritssilvis/java_darts_cli_split_code
Browse files Browse the repository at this point in the history
Prepare splitting of the Java darts CLI project
  • Loading branch information
mauritssilvis authored Mar 18, 2023
2 parents 6935753 + f310a9a commit f86876d
Show file tree
Hide file tree
Showing 139 changed files with 417 additions and 395 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ In addition, several game modes are supported, including modes that require play
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 command-line toolbox](cli/java) readme.
More information about the installation and use of this app can be found in the [Java command-line toolbox](cli/java-darts-cli) readme.
If you are interested in checking out those checkout tables, refer to the [Markdown checkout tables](tables/md).

## License
Expand Down
2 changes: 1 addition & 1 deletion cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This part of the [darts](https://github.com/mauritssilvis/darts) project provide

Currently, command-line interfaces are available in the following languages:

- [Java](java)
- [Java](java-darts-cli)

## License

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 17 additions & 5 deletions cli/java/CHANGELOG.md → cli/java-darts-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ All notable changes to the `java-darts-cli` project (see [darts](https://github.
The file format is based on [keep a changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [semantic versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.0] - 2023-03-18

### Changed

#### Command-line interface

- Load the version from the project manifest file.

#### General

- Split the code in CLI, API and core packages.

## [0.3.0] - 2023-03-17

### Added
Expand All @@ -17,14 +29,14 @@ and this project adheres to [semantic versioning](https://semver.org/spec/v2.0.0

### Changed

#### Documentation

- Document changes in the usage of `darts`.

#### Installation

- Change the `darts` installation location.

#### Documentation

- Document changes in the usage of `darts`.

#### Dependencies

- Update the Gradle version to 8.0.2.
Expand All @@ -45,7 +57,7 @@ and this project adheres to [semantic versioning](https://semver.org/spec/v2.0.0

- Describe the installation of `darts`.
- Document the usage of the `darts` command-line interface.
- Document potential problems with the installation or usage of `darts`.
- Document potential problems with the installation and usage of `darts`.

#### Installation

Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions cli/java/README.md → cli/java-darts-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# darts > CLI > Java
# java-darts-cli

> A Java-based command-line toolbox aimed at the game of darts
Expand Down Expand Up @@ -50,7 +50,7 @@ You can then install the `darts` toolbox as follows:

- Navigate to the folder containing the `darts` installation scripts, `install` and `install.bat`.
- If you downloaded the latest `java-darts-cli` release, these scripts can be found in the extracted folder.
- If you downloaded the full `darts` code, these scripts can be found in the `cli/java` folder of that code.
- If you downloaded the full `darts` code, these scripts can be found in the `cli/java-darts-cli` folder of that code.
- Run the `install` command to install `darts` in the `bin` folder.
- Navigate to the newly created `bin` folder.
- Test the execution of the `darts` toolbox by running the `darts` command.
Expand Down Expand Up @@ -843,7 +843,7 @@ To solve these problems, take the following steps:
- Ensure you navigated to the folder containing the `darts` installation scripts, `install` and `install.bat`.
- If you downloaded the latest `java-darts-cli` release, these scripts can be found in the extracted folder.
- If you downloaded the full `darts` code, these scripts can be found in the `cli/java` folder of that code.
- If you downloaded the full `darts` code, these scripts can be found in the `cli/java-darts-cli` folder of that code.
- Prefix the `install` command with `./` (Bash) or `.\` (PowerShell) before execution.
#### 3.1.2 Java was not installed or found
Expand Down Expand Up @@ -928,7 +928,7 @@ To solve these problems, take the following steps:
- Install `darts` by following the [installation instructions](#1-installation).
- Ensure you navigated to the folder containing the `darts` installation scripts, `install` and `install.bat`.
- If you downloaded the latest `java-darts-cli` release, these scripts can be found in the extracted folder.
- If you downloaded the full `darts` code, these scripts can be found in the `cli/java` folder of that code.
- If you downloaded the full `darts` code, these scripts can be found in the `cli/java-darts-cli` folder of that code.
- Navigate to the `bin` folder.
- Prefix the `darts` command with `./` (Bash) or `.\` (PowerShell) before execution.
Expand Down
15 changes: 13 additions & 2 deletions cli/java/build.gradle.kts → cli/java-darts-cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
}

group = "nl.mauritssilvis.darts.java"
version = "0.3.0"
version = "0.4.0"

repositories {
mavenCentral()
Expand Down Expand Up @@ -79,6 +79,13 @@ publishing {
}
}
}

repositories {
maven {
name = "buildFolder"
url = uri(layout.buildDirectory.dir("repo"))
}
}
}

nexusPublishing {
Expand Down Expand Up @@ -107,7 +114,11 @@ tasks {

jar {
manifest {
attributes("Main-Class" to "nl.mauritssilvis.darts.java.cli.DartsApp")
attributes(
"Implementation-Title" to project.name,
"Implementation-Version" to project.version,
"Main-Class" to "nl.mauritssilvis.darts.java.cli.DartsApp"
)
}
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.boards;
package nl.mauritssilvis.darts.java.api.boards;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.boards;
package nl.mauritssilvis.darts.java.api.boards;

/**
* A dartboard field with a type, a name and a score.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.boards;
package nl.mauritssilvis.darts.java.api.boards;

import lombok.ToString;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.finders.checkouts;
package nl.mauritssilvis.darts.java.api.finders.checkouts;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.finders.checkouts;
package nl.mauritssilvis.darts.java.api.finders.checkouts;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.finders.checkouts;
package nl.mauritssilvis.darts.java.api.finders.checkouts;

import nl.mauritssilvis.darts.java.boards.Field;
import nl.mauritssilvis.darts.java.api.boards.Field;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.finders.paths;
package nl.mauritssilvis.darts.java.api.finders.paths;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.finders.paths;
package nl.mauritssilvis.darts.java.api.finders.paths;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.output;
package nl.mauritssilvis.darts.java.api.output;

/**
* A string formatter.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.output;
package nl.mauritssilvis.darts.java.api.output;

/**
* A serializer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.settings;
package nl.mauritssilvis.darts.java.api.settings;

import lombok.ToString;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.settings;
package nl.mauritssilvis.darts.java.api.settings;

import lombok.ToString;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.settings;
package nl.mauritssilvis.darts.java.api.settings;

import lombok.ToString;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.settings;
package nl.mauritssilvis.darts.java.api.settings;

import lombok.ToString;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.settings;
package nl.mauritssilvis.darts.java.api.settings;

/**
* Checkout table settings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.settings;
package nl.mauritssilvis.darts.java.api.settings;

/**
* A checkout table settings builder.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.settings;
package nl.mauritssilvis.darts.java.api.settings;

import lombok.ToString;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.settings;
package nl.mauritssilvis.darts.java.api.settings;

import lombok.ToString;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.tables;
package nl.mauritssilvis.darts.java.api.tables;

import nl.mauritssilvis.darts.java.finders.checkouts.Checkout;
import nl.mauritssilvis.darts.java.settings.Settings;
import nl.mauritssilvis.darts.java.api.finders.checkouts.Checkout;
import nl.mauritssilvis.darts.java.api.settings.Settings;

import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package nl.mauritssilvis.darts.java.tables;
package nl.mauritssilvis.darts.java.api.tables;

/**
* A checkout table generator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
package nl.mauritssilvis.darts.java.cli;

import lombok.ToString;
import nl.mauritssilvis.darts.java.boards.Board;
import nl.mauritssilvis.darts.java.boards.output.BoardSerializerFactory;
import nl.mauritssilvis.darts.java.boards.types.BoardFactory;
import nl.mauritssilvis.darts.java.output.Serializer;
import nl.mauritssilvis.darts.java.settings.BoardType;
import nl.mauritssilvis.darts.java.settings.OutputFormat;
import nl.mauritssilvis.darts.java.api.boards.Board;
import nl.mauritssilvis.darts.java.api.output.Serializer;
import nl.mauritssilvis.darts.java.api.settings.BoardType;
import nl.mauritssilvis.darts.java.api.settings.OutputFormat;
import nl.mauritssilvis.darts.java.core.boards.BoardFactory;
import nl.mauritssilvis.darts.java.core.boards.output.BoardSerializerFactory;
import picocli.CommandLine.Command;
import picocli.CommandLine.Model.CommandSpec;
import picocli.CommandLine.Option;
Expand Down Expand Up @@ -44,7 +44,7 @@
showDefaultValues = true,
footerHeading = "%n",
footer = {
"Online documentation: https://github.com/mauritssilvis/darts/tree/main/cli/java",
"Online documentation: https://github.com/mauritssilvis/darts/tree/main/cli/java-darts-cli",
"",
"Copyright © 2023 Maurits Silvis",
"SPDX-License-Identifier: GPL-3.0-or-later"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
package nl.mauritssilvis.darts.java.cli;

import lombok.ToString;
import nl.mauritssilvis.darts.java.output.Serializer;
import nl.mauritssilvis.darts.java.settings.*;
import nl.mauritssilvis.darts.java.settings.types.TableSettingsBuilder;
import nl.mauritssilvis.darts.java.tables.Table;
import nl.mauritssilvis.darts.java.tables.TableGenerator;
import nl.mauritssilvis.darts.java.tables.output.TableSerializerFactory;
import nl.mauritssilvis.darts.java.tables.types.TableGeneratorFactory;
import nl.mauritssilvis.darts.java.api.output.Serializer;
import nl.mauritssilvis.darts.java.api.settings.*;
import nl.mauritssilvis.darts.java.api.tables.Table;
import nl.mauritssilvis.darts.java.api.tables.TableGenerator;
import nl.mauritssilvis.darts.java.core.settings.TableSettingsBuilder;
import nl.mauritssilvis.darts.java.core.tables.TableGeneratorFactory;
import nl.mauritssilvis.darts.java.core.tables.output.TableSerializerFactory;
import picocli.CommandLine;
import picocli.CommandLine.*;
import picocli.CommandLine.Model.CommandSpec;
Expand Down Expand Up @@ -47,7 +47,7 @@
showDefaultValues = true,
footerHeading = "%n",
footer = {
"Online documentation: https://github.com/mauritssilvis/darts/tree/main/cli/java",
"Online documentation: https://github.com/mauritssilvis/darts/tree/main/cli/java-darts-cli",
"",
"Copyright © 2023 Maurits Silvis",
"SPDX-License-Identifier: GPL-3.0-or-later"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
commandListHeading = "%nCommands:%n",
footerHeading = "%n",
footer = {
"Online documentation: https://github.com/mauritssilvis/darts/tree/main/cli/java",
"Online documentation: https://github.com/mauritssilvis/darts/tree/main/cli/java-darts-cli",
"",
"Copyright © 2023 Maurits Silvis",
"SPDX-License-Identifier: GPL-3.0-or-later"
Expand Down
Loading

0 comments on commit f86876d

Please sign in to comment.