Skip to content

Commit

Permalink
Merge pull request #56 from hexagontk/develop
Browse files Browse the repository at this point in the history
Minor updates
  • Loading branch information
jaguililla authored Apr 24, 2024
2 parents 7d79223 + 17e1c66 commit 2f45492
Show file tree
Hide file tree
Showing 43 changed files with 1,334 additions and 50 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
os: [ ubuntu-latest, windows-latest, macos-latest ]

name: build (${{ matrix.os }})
uses: hexagonkt/.github/.github/workflows/graalvm_gradle.yml@master
uses: hexagontk/.github/.github/workflows/graalvm_gradle.yml@master
with:
os: ${{ matrix.os }}
check_directory: args/build
Expand All @@ -42,7 +42,7 @@ jobs:
os: [ ubuntu-latest, windows-latest, macos-latest ]

name: native_test (${{ matrix.os }})
uses: hexagonkt/.github/.github/workflows/graalvm_gradle.yml@master
uses: hexagontk/.github/.github/workflows/graalvm_gradle.yml@master
with:
os: ${{ matrix.os }}
ref: develop
Expand All @@ -55,7 +55,7 @@ jobs:
os: [ ubuntu-latest, windows-latest, macos-latest ]

name: test_publishing (${{ matrix.os }})
uses: hexagonkt/.github/.github/workflows/graalvm_gradle.yml@master
uses: hexagontk/.github/.github/workflows/graalvm_gradle.yml@master
with:
os: ${{ matrix.os }}
ref: develop
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ permissions:
jobs:
build:
name: Build
uses: hexagonkt/.github/.github/workflows/graalvm_gradle.yml@master
uses: hexagontk/.github/.github/workflows/graalvm_gradle.yml@master
with:
check_directory: args/build

native_test:
name: Native Test
uses: hexagonkt/.github/.github/workflows/graalvm_gradle.yml@master
uses: hexagontk/.github/.github/workflows/graalvm_gradle.yml@master
with:
check_directory: args/build
tasks: nativeTest

test_publishing:
name: Test Publishing
uses: hexagonkt/.github/.github/workflows/graalvm_gradle.yml@master
uses: hexagontk/.github/.github/workflows/graalvm_gradle.yml@master
with:
check_directory: args/build
tasks: publishToMavenLocal -x test
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ permissions:
jobs:
build:
name: Build
uses: hexagonkt/.github/.github/workflows/graalvm_gradle.yml@master
uses: hexagontk/.github/.github/workflows/graalvm_gradle.yml@master
with:
check_directory: args/build
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ hs_err_pid*
# Other Tools
kotlin-js-store/
node_modules/
package-lock.json
.env

# System Files
.DS_Store
Thumbs.db

3 changes: 3 additions & 0 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=21.0.2-graalce
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<h3 align="center">
<a href="https://hexagonkt.com">
<img alt="Hexagon" src="https://hexagonkt.com/tile-small.png" />
<a href="https://hexagontk.com">
<img alt="Hexagon" src="https://hexagontk.com/tile-small.png" />
</a>
<br>
Hexagon
Expand All @@ -10,22 +10,22 @@
<h4 align="center">The atoms of your platform</h4>

<p align="center">
<a href="https://github.com/hexagonkt/hexagon/actions">
<a href="https://github.com/hexagontk/hexagon/actions">
<img
alt="GitHub Actions"
src="https://github.com/hexagonkt/hexagon/workflows/Release/badge.svg" />
src="https://github.com/hexagontk/hexagon/workflows/Release/badge.svg" />
</a>
<a href="https://hexagonkt.com/jacoco">
<img src="https://hexagonkt.com/img/coverage.svg" alt="Coverage" />
<a href="https://hexagontk.com/jacoco">
<img src="https://hexagontk.com/img/coverage.svg" alt="Coverage" />
</a>
<a href="https://search.maven.org/search?q=g:com.hexagonkt">
<img src="https://hexagonkt.com/img/download.svg" alt="Maven Central Repository" />
<img src="https://hexagontk.com/img/download.svg" alt="Maven Central Repository" />
</a>
</p>

<p align="center">
<a href="https://hexagonkt.com">Home Site</a> |
<a href="https://hexagonkt.com/quick_start">Quick Start</a> |
<a href="https://hexagontk.com">Home Site</a> |
<a href="https://hexagontk.com/quick_start">Quick Start</a> |
</p>

---
Expand All @@ -50,7 +50,7 @@ This project is supported by:
<a href="https://www.jetbrains.com/?from=Hexagon-Toolkit">
<img
height="96px"
src="https://hexagonkt.com/img/sponsors/jetbrains-variant-4.svg">
src="https://hexagontk.com/img/sponsors/jetbrains-variant-4.svg">
</a>

## License
Expand Down
10 changes: 10 additions & 0 deletions args/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ Check:
* Control rendering with flags on `ArgsManager`
* Check documentation rendering of `http` (httpie) and `sdk` (sdkman)
* Allow interactive commands and options when something is missing
* Add command aliases (convert name to a list)
* Set default command on program definition (as a list or names to resolve the command)
* Add a parameter to fetch parameters from System Properties on missing parameters
* Loading of options from files (see below) must be done outside cli processing
* '--' stops parsing options and threat everything from that point as positional parameters
* Tags can be used to define groups (i.e.: of mutually exclusive options)
* Add files and environment variables documentation on the program arguments
* Add examples to program documentation
* When an option can pick the value from an environment variable, manually load that env into System
properties and let the program pick values from there (see above)

Allows to load a parameter from command line, environment variable or a set of files with a
priority:
Expand Down
6 changes: 3 additions & 3 deletions args/src/main/kotlin/com/hexagonkt/args/Command.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import com.hexagonkt.core.requireNotBlank

/**
* A program can have multiple commands with their own set of options and positional parameters.
*
* TODO Support aliases
*/
data class Command(
val name: String,
Expand All @@ -23,9 +25,7 @@ data class Command(

val propertiesMap: Map<String, Property<*>> =
properties
.flatMap { p ->
p.names.map { it to p }
}
.flatMap { p -> p.names.map { it to p } }
.toMap()

val optionsMap: Map<String, Option<*>> =
Expand Down
2 changes: 2 additions & 0 deletions args/src/main/kotlin/com/hexagonkt/args/Program.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ data class Program(
val version: String? = null,
val command: Command,
val formatter: Formatter = DefaultFormatter(),
val systemSetting: Boolean = false,
val defaultCommand: List<String> = emptyList(),
) {
constructor(
name: String,
Expand Down
14 changes: 7 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ import org.gradle.api.tasks.wrapper.Wrapper.DistributionType.ALL
*/

plugins {
kotlin("jvm") version("1.9.22") apply(false)
kotlin("jvm") version("1.9.23") apply(false)

id("idea")
id("eclipse")
id("org.jetbrains.dokka") version("1.9.10")
id("org.graalvm.buildtools.native") version("0.9.28") apply(false)
id("io.gitlab.arturbosch.detekt") version("1.23.4") apply(false)
id("org.jetbrains.dokka") version("1.9.20")
id("org.graalvm.buildtools.native") version("0.10.1") apply(false)
id("io.gitlab.arturbosch.detekt") version("1.23.6") apply(false)
}

ext.set("gradleScripts", "https://raw.githubusercontent.com/hexagonkt/hexagon/$version/gradle")
ext.set("gradleScripts", "https://raw.githubusercontent.com/hexagontk/hexagon/$version/gradle")

defaultTasks("build")

Expand All @@ -37,7 +37,7 @@ task("setUp") {
doLast {
exec { commandLine("docker version".split(" ")) }

val dotfiles = "https://raw.githubusercontent.com/hexagonkt/.github/master"
val dotfiles = "https://raw.githubusercontent.com/hexagontk/.github/master"
exec { commandLine("curl $dotfiles/.gitignore -o .gitignore".split(" ")) }
exec { commandLine("curl $dotfiles/commit_template.txt -o .git/message".split(" ")) }
exec { commandLine("curl $dotfiles/.editorconfig -o .editorconfig".split(" ")) }
Expand Down Expand Up @@ -69,6 +69,6 @@ task("release") {
}

tasks.wrapper {
gradleVersion = "8.5"
gradleVersion = "8.7"
distributionType = ALL
}
18 changes: 11 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,31 @@ org.gradle.console=plain

# Gradle
# Version synchronized with Hexagon release (master)
version=3.4.6
version=3.5.3
group=com.hexagonkt.extra
description=The atoms of your platform

# Publish
licenses=MIT
vcsUrl=https://github.com/hexagonkt/hexagon_extra.git
vcsUrl=https://github.com/hexagontk/hexagon_extra.git

# Site
siteHost=https://hexagonkt.com
siteHost=https://hexagontk.com

# VERSIONS
dokkaVersion=1.9.10
testcontainersVersion=1.19.3
dockerJavaVersion=3.3.4
dokkaVersion=1.9.20
testcontainersVersion=1.19.7
dockerJavaVersion=3.3.6

# messaging_rabbitmq
rabbitVersion=5.21.0
metricsJmxVersion=4.2.25

# scheduler
cronutilsVersion=9.2.1

# store_mongodb
mongodbVersion=4.11.1
mongodbVersion=5.0.1

# models
jakartaMailVersion=2.0.1
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ 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.
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

Expand All @@ -57,11 +57,11 @@ 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.
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

Expand Down
24 changes: 24 additions & 0 deletions jul/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

# Module jul
Contains logging utilities for the Java Util Logging package.

### Install the Dependency

=== "build.gradle"

```groovy
implementation("com.hexagonkt.extra:jul:$hexagonVersion")
```

=== "pom.xml"

```xml
<dependency>
<groupId>com.hexagonkt.extra</groupId>
<artifactId>jul</artifactId>
<version>$hexagonVersion</version>
</dependency>
```

# Package com.hexagonkt.jul
Provides helpers for the Java Util Logging library.
18 changes: 18 additions & 0 deletions jul/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

plugins {
id("java-library")
}

val gradleScripts = properties["gradleScripts"]

apply(from = "$gradleScripts/kotlin.gradle")
apply(from = "$gradleScripts/publish.gradle")
apply(from = "$gradleScripts/dokka.gradle")
apply(from = "$gradleScripts/native.gradle")
apply(from = "$gradleScripts/detekt.gradle")

description = "Java Util Logging utilities."

dependencies {
"api"("com.hexagonkt:core:$version")
}
Loading

0 comments on commit 2f45492

Please sign in to comment.