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
9 changes: 9 additions & 0 deletions .opencode/skills/cryptad-build-test/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ When running ./gradlew test via OpenCode bash, set timeout ≥ 15 minutes (≥ 9
- Compile only:
- `./gradlew compileJava`

## Run tasks
- Run daemon entrypoint (`NodeStarter`):
- `./gradlew run`
- Pass daemon CLI args:
- `./gradlew run --args="--help"`
- `./gradlew run --args="--version"`
- Run Swing launcher entrypoint (`LauncherKt`):
- `./gradlew runLauncher`

## Run your build (manual deployment)
1. Build: `./gradlew buildJar`
2. Stop the running node
Expand Down
4 changes: 4 additions & 0 deletions .opencode/skills/cryptad-launcher-ui/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ If `script` exists, the launcher may wrap the process to reduce buffering.
- `build/cryptad-dist/bin/cryptad-launcher`
- `build/cryptad-dist/bin/cryptad-launcher.bat`

## Local launcher entrypoint
- For local development without packaging, start the launcher directly with:
- `./gradlew runLauncher`

## Local testing aid
- `-PuseDummyCryptad=true` replaces `bin/cryptad` with `tools/cryptad-dummy.sh` in the dist for local testing.

Expand Down
27 changes: 26 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,33 @@ tasks.register("printVersion") {
// Application entrypoint (used by jpackage). This does not change how we build the wrapper
// distribution; it's only to inform launchers that invoke the Kotlin main directly.
// Align with actual top-level entry in Launcher.kt
application {
application { mainClass.set("network.crypta.launcher.LauncherKt") }

val nodeRuntimeJvmArgs =
listOf(
"-Dnetworkaddress.cache.ttl=0",
"-Dnetworkaddress.cache.negative.ttl=0",
"-Djava.net.preferIPv4Stack=false",
"--enable-native-access=ALL-UNNAMED",
"--add-opens=java.base/java.lang=ALL-UNNAMED",
"--add-opens=java.base/java.util=ALL-UNNAMED",
"--add-opens=java.base/java.io=ALL-UNNAMED",
"--add-opens=java.base/sun.nio.ch=ALL-UNNAMED",
"-enableassertions:freenet",
)

tasks.named<JavaExec>("run") {
description = "Runs Cryptad daemon via NodeStarter"
mainClass.set("network.crypta.node.NodeStarter")
jvmArgs(nodeRuntimeJvmArgs)
}

tasks.register<JavaExec>("runLauncher") {
group = "application"
description = "Runs the Cryptad Swing launcher"
javaLauncher.set(javaToolchains.launcherFor { languageVersion.set(JavaLanguageVersion.of(25)) })
mainClass.set("network.crypta.launcher.LauncherKt")
classpath = sourceSets.main.get().runtimeClasspath
}

// Sonar configuration is applied via the build-logic convention plugin 'cryptad.sonar'
Loading