Compare commits
4 Commits
v1.0.0
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c38266706d | ||
|
|
34b683aacf | ||
|
|
b2a08a2c30 | ||
|
|
ac1e1f1ece |
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@@ -6,7 +6,6 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main, master ]
|
branches: [ main, master ]
|
||||||
|
|
||||||
# Alte Läufe abbrechen, wenn ein neuer Push kommt (spart Zeit)
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@@ -17,7 +16,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up JDK 21
|
- name: Set up JDK 21
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
@@ -43,7 +42,7 @@ jobs:
|
|||||||
javadoc:
|
javadoc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- name: Set up JDK 21
|
- name: Set up JDK 21
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
@@ -56,7 +55,7 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up JDK 21
|
- name: Set up JDK 21
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
|
|||||||
42
.github/workflows/codeql.yml
vendored
42
.github/workflows/codeql.yml
vendored
@@ -1,42 +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: Set up JDK 21
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: 21
|
|
||||||
cache: gradle
|
|
||||||
|
|
||||||
- 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
|
|
||||||
2
.github/workflows/dependency-review.yml
vendored
2
.github/workflows/dependency-review.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Dependency Review
|
- name: Dependency Review
|
||||||
uses: actions/dependency-review-action@v4
|
uses: actions/dependency-review-action@v4
|
||||||
|
|||||||
53
.github/workflows/pages.yml
vendored
Normal file
53
.github/workflows/pages.yml
vendored
Normal 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@v6
|
||||||
|
|
||||||
|
- 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
|
||||||
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
@@ -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
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -8,13 +8,16 @@ on:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RELEASE_VERSION: ${{ github.ref_name }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up JDK 21
|
- name: Set up JDK 21
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
@@ -23,7 +26,18 @@ jobs:
|
|||||||
java-version: 21
|
java-version: 21
|
||||||
cache: gradle
|
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
|
- name: Create Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
|
|||||||
3
.idea/misc.xml
generated
3
.idea/misc.xml
generated
@@ -1,10 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<component name="FrameworkDetectionExcludesConfiguration">
|
<component name="FrameworkDetectionExcludesConfiguration">
|
||||||
<file type="web" url="file://$PROJECT_DIR$" />
|
<file type="web" url="file://$PROJECT_DIR$" />
|
||||||
</component>
|
</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" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
17
CODE_OF_CONDUCT.md
Normal file
17
CODE_OF_CONDUCT.md
Normal 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
5
FUNDING.yml
Normal 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']
|
||||||
53
README.md
53
README.md
@@ -5,9 +5,56 @@ Java library for terminal UI: tables, rules, colors, prompts, menus, SelectList,
|
|||||||
[](https://github.com/jakubbbdev/terminal-ui/actions/workflows/ci.yml)
|
[](https://github.com/jakubbbdev/terminal-ui/actions/workflows/ci.yml)
|
||||||
[](https://openjdk.org/)
|
[](https://openjdk.org/)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
|
[](https://github.com/jakubbbdev/terminal-ui/releases)
|
||||||
|
|
||||||
[](https://codespaces.new/jakubbbdev/terminal-ui)
|
[](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
|
## Requirements
|
||||||
|
|
||||||
- **Java 21**
|
- **Java 21**
|
||||||
@@ -51,6 +98,12 @@ String choice = Terminal.menu()
|
|||||||
.select();
|
.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
|
## License
|
||||||
|
|
||||||
See [LICENSE](LICENSE).
|
See [LICENSE](LICENSE).
|
||||||
|
|||||||
@@ -2,15 +2,15 @@ plugins {
|
|||||||
id("java")
|
id("java")
|
||||||
id("java-library")
|
id("java-library")
|
||||||
id("application")
|
id("application")
|
||||||
|
id("maven-publish")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named<JavaExec>("run") {
|
tasks.named<JavaExec>("run") {
|
||||||
jvmArgs("-Ddev.jakub.terminal.ansi=true", "-Dfile.encoding=UTF-8")
|
jvmArgs("-Ddev.jakub.terminal.ansi=true", "-Dfile.encoding=UTF-8")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
group = "dev.jakub.terminal"
|
group = "dev.jakub.terminal"
|
||||||
version = "1.0-SNAPSHOT"
|
version = System.getenv("RELEASE_VERSION") ?: "1.0-SNAPSHOT"
|
||||||
|
|
||||||
java {
|
java {
|
||||||
sourceCompatibility = JavaVersion.VERSION_21
|
sourceCompatibility = JavaVersion.VERSION_21
|
||||||
@@ -29,4 +29,25 @@ dependencies {
|
|||||||
|
|
||||||
tasks.test {
|
tasks.test {
|
||||||
useJUnitPlatform()
|
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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user