Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ jobs:
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Check-out
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Set up Maven settings
uses: Bernardo-MG/deployment-maven-settings-action@master
uses: bernardo-mg/deployment-maven-settings-action@v1.1.2
with:
version-type: ${{ steps.extract_branch.outputs.branch }}
env:
Expand All @@ -37,5 +38,9 @@ jobs:
DEPLOY_DOCS_DEVELOP_PASSWORD: ${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }}
DEPLOY_DOCS_SITE: ${{ secrets.DEPLOY_DOCS_SITE }}
DEPLOY_DOCS_DEVELOP_SITE: ${{ secrets.DEPLOY_DOCS_DEVELOP_SITE }}
- name: Deploy docs
run: mvn site site:deploy -B -P deployment --settings settings.xml
- name: Deploy development docs
if: steps.extract_branch.outputs.branch == 'develop'
run: mvn verify site site:deploy -B -P deployment,deployment-development --settings settings.xml
- name: Deploy release docs
if: steps.extract_branch.outputs.branch == 'master'
run: mvn verify site site:deploy -B -P deployment,deployment-release --settings settings.xml
7 changes: 4 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ jobs:
jdk: [ 8, 11, 14 ]

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Check-out
uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.jdk }}
- name: Runs tests
- name: Run all tests
run: mvn clean verify
34 changes: 6 additions & 28 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<groupId>com.bernardomg.tabletop</groupId>
<artifactId>dice-cli</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
<packaging>jar</packaging>

<name>Dice Notation Tools CLI</name>
Expand All @@ -30,8 +30,8 @@

<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
<name>Apache v2 License</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
Expand Down Expand Up @@ -174,11 +174,11 @@
<!-- ============================================== -->
<!-- =========== DEPENDENCIES VERSIONS ============ -->
<!-- ============================================== -->
<dice.version>2.0.2</dice.version>
<dice.version>2.0.4</dice.version>
<guava.version>29.0-jre</guava.version>
<junit.jupiter.version>5.6.2</junit.jupiter.version>
<mockito.version>3.3.3</mockito.version>
<picocli.version>4.4.0</picocli.version>
<mockito.version>3.5.13</mockito.version>
<picocli.version>4.5.1</picocli.version>
<log4j.version>2.13.3</log4j.version>
<slf4j.version>1.7.30</slf4j.version>
<spring.boot.version>2.3.1.RELEASE</spring.boot.version>
Expand Down Expand Up @@ -403,31 +403,13 @@
<configuration>
<!-- The customized rules file -->
<configLocation>${project.basedir}/src/config/checkstyle/checkstyle-rules.xml</configLocation>
<!-- Excludes generated code -->
<excludes>**/generated/**/*</excludes>
</configuration>
</plugin>
<plugin>
<!-- FindBugs -->
<!-- Checks for patterns which are prone to errors -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<!-- Exclusion patterns -->
<excludeFilterFile>${project.basedir}/src/config/findbugs/findbugs-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<!-- Javadoc -->
<!-- Generates the javadocs -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<sourceFileExcludes>
<!-- Excludes generated code -->
<exclude>**/generated/**/*</exclude>
</sourceFileExcludes>
</configuration>
</plugin>
<plugin>
<!-- PMD -->
Expand All @@ -439,10 +421,6 @@
<!-- The customized rules file -->
<ruleset>${project.basedir}/src/config/pmd/pmd-rules.xml</ruleset>
</rulesets>
<excludes>
<!-- Excludes generated code -->
<exclude>**/generated/**/*</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
Expand Down
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ If you wish to fork or modify the code, visit the [GitHub project page][scm], wh
The project has been released under the [MIT License][license].

[issues]: https://github.com/bernardo-mg/dice-notation-java-cli/issues
[javadoc-develop]: http://docs.bernardomg.com/development/maven/dice-notation-java-cli/apidocs
[javadoc-release]: http://docs.bernardomg.com/maven/dice-notation-java-cli/apidocs
[javadoc-develop]: https://docs.bernardomg.com/development/maven/dice-notation-java-cli/apidocs
[javadoc-release]: https://docs.bernardomg.com/maven/dice-notation-java-cli/apidocs
[license]: https://www.opensource.org/licenses/mit-license.php
[scm]: https://github.com/bernardo-mg/dice-notation-java-cli
[site-develop]: http://docs.bernardomg.com/development/maven/dice-notation-java-cli
[site-release]: http://docs.bernardomg.com/maven/dice-notation-java-cli
[site-develop]: https://docs.bernardomg.com/development/maven/dice-notation-java-cli
[site-release]: https://docs.bernardomg.com/maven/dice-notation-java-cli

[dice-notation-tools]: https://github.com/Bernardo-MG/dice-notation-java
5 changes: 5 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,10 @@
Extended and improved CLI.
</action>
</release>
<release version="1.1.1" date="2020-10-09" description="Small corrections">
<action dev="bmg" type="fix">
Several small corrections.
</action>
</release>
</body>
</document>
9 changes: 0 additions & 9 deletions src/config/findbugs/findbugs-exclude.xml

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/java/com/bernardomg/tabletop/dice/cli/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.bernardomg.tabletop.dice.cli.command.DiceMenu;
import com.bernardomg.tabletop.dice.cli.menu.DiceMenu;

import picocli.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,22 @@ public final class DiceGathererCommand implements Runnable {
private static final Logger LOGGER = LoggerFactory
.getLogger(DiceGathererCommand.class);

/**
* Expression to roll.
*/
@Parameters(index = "0", description = "The expression to roll",
paramLabel = "EXP")
private String expression;

/**
* Command specification. Used to get the line output.
*/
@Spec
private CommandSpec spec;

/**
* Default constructor.
*/
public DiceGathererCommand() {
super();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,30 +55,55 @@ public final class DiceRollCommand implements Runnable {
private static final Logger LOGGER = LoggerFactory
.getLogger(DiceRollCommand.class);

/**
* Expression to roll.
*/
@Parameters(index = "0", description = "The expression to roll",
paramLabel = "EXP")
private String expression;

/**
* Roll history flag.
*/
@Option(names = "-history", description = "Prints the roll history",
defaultValue = "false")
private Boolean history;

/**
* Full history flag.
*/
@Option(names = "-fullHistory",
description = "Prints a detailed roll history",
defaultValue = "false")
private Boolean historyDetailed;

/**
* Command specification. Used to get the line output.
*/
@Spec
private CommandSpec spec;

/**
* Default constructor.
*/
public DiceRollCommand() {
super();
}

/**
* Returns the history flag.
*
* @return the history flag
*/
public Boolean getHistory() {
return history;
}

/**
* Returns the detailed history flag.
*
* @return the detailed history flag
*/
public Boolean getHistoryDetailed() {
return historyDetailed;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright 2020 the original author or authors
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
/**
* CLI commands.
*/

package com.bernardomg.tabletop.dice.cli.command;
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
* the License.
*/

package com.bernardomg.tabletop.dice.cli.command;
package com.bernardomg.tabletop.dice.cli.menu;

import com.bernardomg.tabletop.dice.cli.command.DiceGathererCommand;
import com.bernardomg.tabletop.dice.cli.command.DiceRollCommand;
import com.bernardomg.tabletop.dice.cli.version.ManifestVersionProvider;

import picocli.CommandLine.Command;
Expand All @@ -33,4 +35,11 @@
versionProvider = ManifestVersionProvider.class)
public class DiceMenu {

/**
* Default constructor.
*/
public DiceMenu() {
super();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright 2020 the original author or authors
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
/**
* CLI menu.
*/

package com.bernardomg.tabletop.dice.cli.menu;
Loading