6 Commits

Author SHA1 Message Date
dependabot[bot]
f184a1eddb ci: bump actions/setup-java from 4 to 5
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4 to 5.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-14 09:07:27 +00:00
!verity
34b683aacf Remove CodeQL workflow, add GitHub Pages deployment, and update project documentation
- Remove `codeql.yml` workflow for static security analysis.
- Add `pages.yml` workflow for deploying docs to GitHub Pages.
- Introduce `CODE_OF_CONDUCT.md` and `FUNDING.yml`.
- Update `README.md` with links to GitHub Pages and additional project setup details.
- Refine release workflow by splitting build and publish steps, and allowing publish errors for existing versions.
2026-03-14 10:06:31 +01:00
!verity
b2a08a2c30 Update README with GitHub Packages installation guide and enhance project configuration
- Add installation instructions for Gradle and Maven in the README.
- Update `.idea/misc.xml` for Java 21 compatibility.
- Improve release workflow with clearer build and publish step naming.
2026-03-13 20:54:37 +01:00
!verity
ac1e1f1ece Enhance release workflow: enable publishing to GitHub Packages and integrate versioning from tags 2026-03-13 20:47:19 +01:00
!verity
fee9d8533c Update Release Drafter and CodeQL workflows: add release notes template and Java 21 setup 2026-03-13 20:40:17 +01:00
!verity
6f146516a8 Set up project configuration: EditorConfig, Git attributes, devcontainer, Release Drafter, SECURITY.md, and README badges 2026-03-13 20:38:01 +01:00
21 changed files with 396 additions and 187 deletions

View File

@@ -0,0 +1,20 @@
{
"name": "terminal-ui",
"image": "mcr.microsoft.com/devcontainers/java:1-21-bookworm",
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "21",
"installGradle": "true",
"installMaven": "false"
}
},
"postCreateCommand": "java -version && ./gradlew --version",
"customizations": {
"vscode": {
"extensions": [
"vscjava.vscode-java-pack",
"vscjava.vscode-gradle"
]
}
}
}

20
.editorconfig Normal file
View File

@@ -0,0 +1,20 @@
# EditorConfig: consistent style across editors
# https://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.{java,kts}]
indent_style = space
indent_size = 4
[*.{yml,yaml,md,json}]
indent_size = 2
[*.bat]
end_of_line = crlf

9
.gitattributes vendored Normal file
View File

@@ -0,0 +1,9 @@
# Normalize line endings
* text=auto eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
# GitHub linguist: don't count these as language
gradle/wrapper/gradle-wrapper.jar binary
*.jar binary
*.zip binary

27
.github/release-drafter.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
# Config for release-drafter v6: categorizes PRs in draft release notes
# https://github.com/release-drafter/release-drafter
template: |
## What's Changed
$CHANGES
**Full Changelog**: https://github.com/jakubbbdev/terminal-ui/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels: [feature, enhancement]
- title: '🐛 Bug Fixes'
labels: [bug, fix]
- title: '📚 Documentation'
labels: [documentation]
- title: '⬆️ Dependencies'
labels: [dependencies]
- title: 'Other'
labels: ['*']
exclude-labels:
- skip-changelog

View File

@@ -6,7 +6,6 @@ on:
pull_request:
branches: [ main, master ]
# Alte Läufe abbrechen, wenn ein neuer Push kommt (spart Zeit)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
@@ -20,7 +19,7 @@ jobs:
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 21
@@ -45,7 +44,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 21
@@ -59,7 +58,7 @@ jobs:
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 21

View File

@@ -1,35 +0,0 @@
# CodeQL: static security analysis (free for public repos).
name: CodeQL
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
schedule:
- cron: '0 6 * * 1'
jobs:
analyze:
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java
- name: Build (for CodeQL)
run: |
chmod +x gradlew
./gradlew compileJava --no-daemon
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

53
.github/workflows/pages.yml vendored Normal file
View File

@@ -0,0 +1,53 @@
# Deploy docs to GitHub Pages (optional)
# Enable in repo: Settings → Pages → Source: GitHub Actions
# Site will be at https://jakubbbdev.github.io/terminal-ui/
name: Pages
on:
push:
branches: [master, main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
environment: github-pages
steps:
- uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build site
run: |
mkdir -p _site
cp -r docs _site/
cat > _site/index.html << 'EOF'
<!DOCTYPE html>
<html><head><meta charset="utf-8"><title>terminal-ui</title></head>
<body style="font-family:sans-serif;max-width:600px;margin:2rem auto;padding:0 1rem">
<h1>terminal-ui</h1>
<p>Java library for terminal UIs: tables, prompts, menus, and more.</p>
<ul>
<li><a href="https://github.com/jakubbbdev/terminal-ui">GitHub repo</a></li>
<li><a href="https://github.com/jakubbbdev/terminal-ui#install">Install (README)</a></li>
<li><a href="https://github.com/jakubbbdev/terminal-ui/releases">Releases</a></li>
<li><a href="https://github.com/jakubbbdev/terminal-ui/tree/master/docs">Docs (markdown)</a></li>
</ul>
</body></html>
EOF
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

22
.github/workflows/release-drafter.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
# Drafts release notes from merged PRs when you create a release.
# Install: add a Release Drafter config (see below), then create a release on GitHub;
# this workflow will update the draft with categorized PRs.
name: Release Drafter
on:
push:
branches: [main, master]
workflow_dispatch:
permissions:
contents: read
pull-requests: write
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- name: Draft Release
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,4 +1,4 @@
# On push of a version tag (e.g. v1.0.0): build, create GitHub Release, upload JARs.
# On push of a version tag (e.g. v1.0.0): build, publish to GitHub Packages, create Release, upload JARs.
name: Release
on:
@@ -8,22 +8,36 @@ on:
permissions:
contents: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
env:
RELEASE_VERSION: ${{ github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 21
cache: gradle
- run: chmod +x gradlew && ./gradlew build --no-daemon
- name: Strip v from version
run: echo "RELEASE_VERSION=${RELEASE_VERSION#v}" >> $GITHUB_ENV
- name: Build
run: chmod +x gradlew && ./gradlew build --no-daemon
- name: Publish to GitHub Packages
run: ./gradlew publish --no-daemon
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
# 409 = version already exists; use a new tag (e.g. v1.0.2) next time
- name: Create Release
uses: softprops/action-gh-release@v2

3
.idea/misc.xml generated
View File

@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="corretto-21" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="corretto-21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

17
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,17 @@
# Code of Conduct
## Our Pledge
We are committed to providing a welcoming and harassment-free experience for everyone. Be respectful, inclusive, and constructive when contributing or discussing this project.
## Unacceptable Behavior
Harassment, trolling, insulting comments, personal or political attacks, and other conduct that could make others feel unsafe are not acceptable.
## Enforcement
Maintainers may remove or edit content that violates this code. Repeated or serious violations may result in being blocked from the repository.
## Contact
If you have concerns, open an issue or contact the maintainers privately if preferred.

5
FUNDING.yml Normal file
View File

@@ -0,0 +1,5 @@
# Optional: Uncomment to show "Sponsor" button on the repo
# github: [jakubbbdev]
# patreon: your-username
# ko_fi: your-username
# custom: ['https://your-link.com']

View File

@@ -3,6 +3,57 @@
Java library for terminal UI: tables, rules, colors, prompts, menus, SelectList, pager, and more. Fluent API, ANSI support, testable.
[![CI](https://github.com/jakubbbdev/terminal-ui/actions/workflows/ci.yml/badge.svg)](https://github.com/jakubbbdev/terminal-ui/actions/workflows/ci.yml)
[![Java 21](https://img.shields.io/badge/Java-21-ED8B00?logo=openjdk)](https://openjdk.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Latest release](https://img.shields.io/github/v/release/jakubbbdev/terminal-ui)](https://github.com/jakubbbdev/terminal-ui/releases)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/jakubbbdev/terminal-ui)
**First time here?** → [NEXT_STEPS.md](NEXT_STEPS.md) has a short checklist (Pages, topics, release).
## Install
Published to [GitHub Packages](https://github.com/jakubbbdev/terminal-ui/packages). Replace `VERSION` with a [release](https://github.com/jakubbbdev/terminal-ui/releases) tag (e.g. `1.0.0`).
**Gradle (Kotlin DSL):**
```kotlin
repositories {
mavenCentral()
maven { url = uri("https://maven.pkg.github.com/jakubbbdev/terminal-ui") }
}
dependencies {
implementation("dev.jakub.terminal:terminal-ui:VERSION")
}
```
**Gradle (Groovy):**
```groovy
repositories {
mavenCentral()
maven { url "https://maven.pkg.github.com/jakubbbdev/terminal-ui" }
}
dependencies {
implementation "dev.jakub.terminal:terminal-ui:VERSION"
}
```
**Maven:**
```xml
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/jakubbbdev/terminal-ui</url>
</repository>
<dependency>
<groupId>dev.jakub.terminal</groupId>
<artifactId>terminal-ui</artifactId>
<version>VERSION</version>
</dependency>
```
For public packages, read access usually works without credentials. If your tool asks for auth, use a [GitHub PAT](https://github.com/settings/tokens) with `read:packages` as username and the token as password.
## Requirements
@@ -21,18 +72,6 @@ Run tests:
./gradlew test
```
Demo (non-interactive):
```bash
./gradlew run
```
Interactive demo (best run in a real terminal):
```bash
./gradlew runDemo2
```
## Usage (excerpt)
```java
@@ -59,6 +98,12 @@ String choice = Terminal.menu()
.select();
```
## Docs & links
- **In-repo docs:** [docs/](docs/) Home, Install, Components, Examples.
- **GitHub Pages:** Enable in **Settings → Pages → Source: GitHub Actions** (uses workflow `pages.yml`). Site: `https://jakubbbdev.github.io/terminal-ui/`.
- **Wiki:** **Settings → Features** → enable **Wiki**; copy content from `docs/` if you like.
## License
See [LICENSE](LICENSE).

11
SECURITY.md Normal file
View File

@@ -0,0 +1,11 @@
# Security
## Reporting a vulnerability
If you find a security issue, please report it responsibly:
1. **Do not** open a public issue.
2. Email the maintainers or report via [GitHub Security Advisories](https://github.com/jakubbbdev/terminal-ui/security/advisories/new) (if enabled).
3. Give a clear description and steps to reproduce; well respond as soon as we can.
Thank you for helping keep this project safe.

View File

@@ -2,15 +2,15 @@ plugins {
id("java")
id("java-library")
id("application")
id("maven-publish")
}
tasks.named<JavaExec>("run") {
jvmArgs("-Ddev.jakub.terminal.ansi=true", "-Dfile.encoding=UTF-8")
}
group = "dev.jakub.terminal"
version = "1.0-SNAPSHOT"
version = System.getenv("RELEASE_VERSION") ?: "1.0-SNAPSHOT"
java {
sourceCompatibility = JavaVersion.VERSION_21
@@ -29,4 +29,25 @@ dependencies {
tasks.test {
useJUnitPlatform()
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = project.group.toString()
artifactId = "terminal-ui"
version = project.version.toString()
from(components["java"])
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/jakubbbdev/terminal-ui")
credentials {
username = System.getenv("GITHUB_ACTOR") ?: project.findProperty("gpr.user")?.toString()
password = System.getenv("GITHUB_TOKEN") ?: project.findProperty("gpr.token")?.toString()
}
}
}
}

Binary file not shown.

View File

@@ -1,6 +1,6 @@
#Fri Mar 13 15:14:45 CET 2026
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
networkTimeout=10000
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

50
gradlew vendored Executable file → Normal file
View File

@@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright © 2015 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,8 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
@@ -57,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -82,11 +80,13 @@ do
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# 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"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -114,6 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@@ -132,29 +133,22 @@ location of your Java installation."
fi
else
JAVACMD=java
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.
which java >/dev/null 2>&1 || 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.
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=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -171,6 +165,7 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -198,27 +193,18 @@ if "$cygwin" || "$msys" ; then
done
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 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.
# 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.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
-classpath "$CLASSPATH" \
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.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

182
gradlew.bat vendored
View File

@@ -1,93 +1,89 @@
@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
@rem SPDX-License-Identifier: Apache-2.0
@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. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
: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=.
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%" == "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%"=="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!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@@ -72,7 +72,7 @@ public final class Confirm {
}
/**
* Uses the given scanner for one line. Use when sharing one scanner (e.g. demo).
* Uses the given scanner for one line. Use when sharing one scanner (e.g. interactive app).
*/
public boolean ask(Scanner sharedScanner) {
if (sharedScanner == null) return ask();

View File

@@ -64,7 +64,7 @@ public final class Prompt {
/**
* Prompts and returns the next line from the given scanner. Use this when
* sharing one scanner (e.g. in a demo) so input blocks correctly.
* sharing one scanner (e.g. in an interactive app) so input blocks correctly.
*/
public String ask(Scanner sharedScanner) {
if (sharedScanner == null) return ask();