12 Commits

Author SHA1 Message Date
1e8fdb52dd chore: fetch-depth 0 - all history for changelog
All checks were successful
Release / release (push) Successful in 55s
2025-07-06 15:17:28 +02:00
3d2cf37a17 chore: print debug msg
All checks were successful
Release / release (push) Successful in 55s
2025-07-06 15:06:41 +02:00
e2d08d7b70 chore: print body in workflow log
All checks were successful
Release / release (push) Successful in 55s
2025-07-06 15:01:41 +02:00
e8e6a24065 chore: release naming with defaults
All checks were successful
Release / release (push) Successful in 54s
2025-07-06 14:43:42 +02:00
ad8c2a6752 chore: release naming with defaults
Some checks failed
Release / release (push) Failing after 1m14s
2025-07-06 14:37:08 +02:00
c2c1e26a7c chore: release naming with defaults 2025-07-06 14:36:06 +02:00
5d8e533eff chore: simplify release naming in Gitea UI
All checks were successful
Release / release (push) Successful in 53s
2025-07-06 14:06:37 +02:00
432b705327 docs: guide in package javadoc; fix <
All checks were successful
Release / release (push) Successful in 1m24s
Signed-off-by: Leo Galambos <lg@hq.egothor.org>
2025-07-06 13:46:03 +02:00
4968cc516d fix: changelog without escape-on; javadoc was not published 2025-07-06 13:22:56 +02:00
02cd2acd6e chore: release tags with release@ prefix
All checks were successful
Release / release (push) Successful in 4m34s
2025-07-06 12:58:51 +02:00
90d4e063af gradle deps fixed
All checks were successful
Release / release (push) Successful in 52s
2025-07-05 23:18:12 +02:00
288fbfe0cc fix build without giteaToken defined
All checks were successful
Release / release (push) Successful in 3m42s
2025-07-05 23:06:07 +02:00
7 changed files with 112 additions and 44 deletions

View File

@@ -6,12 +6,6 @@
<attribute name="gradle_used_by_scope" value="main,test"/> <attribute name="gradle_used_by_scope" value="main,test"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="src" output="bin/main" path="src/main/resources">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/test" path="src/test/java"> <classpathentry kind="src" output="bin/test" path="src/test/java">
<attributes> <attributes>
<attribute name="gradle_scope" value="test"/> <attribute name="gradle_scope" value="test"/>
@@ -19,13 +13,6 @@
<attribute name="test" value="true"/> <attribute name="test" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="src" output="bin/test" path="src/test/resources">
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21/"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/> <classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/> <classpathentry kind="output" path="bin/default"/>

View File

@@ -3,7 +3,7 @@ name: Release
on: on:
push: push:
tags: tags:
- 'conflux@*' - 'release@*'
jobs: jobs:
release: release:
@@ -12,6 +12,8 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Java 21 - name: Set up Java 21
uses: actions/setup-java@v3 uses: actions/setup-java@v3
@@ -38,9 +40,50 @@ jobs:
name: conflux name: conflux
path: build/libs/*.jar path: build/libs/*.jar
- name: Generate release notes
id: notes
run: |
current_tag="${{ github.ref_name }}"
# strip the prefix for sorting, keep prefix for matching
prefix="release@"
# get all matching tags, strip prefix, sort them
all_versions=$(git tag --list "${prefix}*" | sed "s/^${prefix}//" | sort -V)
# find previous version
previous_tag=""
for v in $all_versions; do
if [[ "$prefix$v" == "$current_tag" ]]; then
break
fi
previous_tag="$prefix$v"
done
if [[ -z "$previous_tag" ]]; then
range=""
else
range="$previous_tag..$current_tag"
fi
echo "Comparing range: $range"
body="## What's New"
for category in "feat: Features" "fix: Bug Fixes" "docs: Documentation" "chore: Chores"; do
prefix="${category%%:*}"
title="${category##*: }"
entries=$(git log $range --pretty=format:"- %s" --grep="^$prefix" --no-merges)
# echo -e "Found:\n\n$entries\n\n"
if [[ -n "$entries" ]]; then
body="$body\n\n### $title\n$entries"
fi
done
echo -e "$body" > /tmp/release_notes.md
- name: Create Gitea Release - name: Create Gitea Release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
files: build/libs/*.jar files: build/libs/*.jar
tag_name: ${{ github.ref_name }} body_path: /tmp/release_notes.md
name: Release ${{ github.ref_name }}

View File

@@ -6,7 +6,7 @@ plugins {
} }
group 'org.egothor' group 'org.egothor'
version gitVersion(prefix:'conflux@') version gitVersion(prefix:'release@')
repositories { repositories {
// Use Maven Central for resolving dependencies. // Use Maven Central for resolving dependencies.
@@ -25,6 +25,9 @@ java {
toolchain { toolchain {
languageVersion = JavaLanguageVersion.of(21) languageVersion = JavaLanguageVersion.of(21)
} }
withJavadocJar()
withSourcesJar()
} }
javadoc { javadoc {
@@ -36,7 +39,12 @@ tasks.named('test') {
useJUnitPlatform() useJUnitPlatform()
} }
publishing { tasks.withType(Javadoc).configureEach {
options.bottom = "Copyright &copy; 2025 Egothor"
}
if (project.hasProperty('giteaToken') && project.giteaToken) {
publishing {
publications { publications {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {
from components.java from components.java
@@ -57,6 +65,9 @@ publishing {
} }
} }
} }
}
} else {
println "No giteaToken defined - skipping publishing configuration"
} }
gradle.taskGraph.whenReady { taskGraph -> gradle.taskGraph.whenReady { taskGraph ->

View File

@@ -1,12 +1,7 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format # https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
[versions] [versions]
commons-math3 = "3.6.1"
guava = "33.1.0-jre"
junit-jupiter = "5.10.2" junit-jupiter = "5.10.2"
[libraries] [libraries]
commons-math3 = { module = "org.apache.commons:commons-math3", version.ref = "commons-math3" }
guava = { module = "com.google.guava:guava", version.ref = "guava" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" } junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" }

View File

@@ -57,7 +57,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
* Usage: * Usage:
* *
* <pre> * <pre>
* Key<Integer> COUNT = Key.of("count", Integer.class); * Key&lt;Integer> COUNT = Key.of("count", Integer.class);
* Ctx.INSTANCE.put(COUNT, 42); * Ctx.INSTANCE.put(COUNT, 42);
* int v = Ctx.INSTANCE.get(COUNT); * int v = Ctx.INSTANCE.get(COUNT);
* </pre> * </pre>

View File

@@ -0,0 +1,32 @@
/**
* Provides a lightweight, type-safe, application-wide context mechanism for
* sharing strongly typed data among otherwise decoupled classes.
* <p>
* The {@link conflux.Ctx} class acts as a central, generic context storage
* supporting key-based put/get operations. Each {@link conflux.Key} defines a
* unique, strongly typed entry in the context, ensuring type consistency and
* preventing misuse. {@link conflux.Listener} interfaces allow clients to
* observe value changes for specific keys. Listeners are held with weak
* references to avoid memory leaks.
* <p>
* Typical usage involves defining {@link conflux.Key} instances with explicit
* types, storing values through {@code Ctx.INSTANCE.put()}, and retrieving them
* with {@code Ctx.INSTANCE.get()}. Listeners can be attached via
* {@code Ctx.INSTANCE.addListener()} to react to context changes in a decoupled
* and thread-safe manner. Values and listeners can be removed individually or
* the entire context can be cleared.
* <p>
* <b>Best Practices:</b>
* <ul>
* <li>Define keys as constants to maintain consistency and avoid
* collisions.</li>
* <li>Remove listeners when no longer needed (although weak references help
* prevent leaks).</li>
* <li>Use unique key names to ensure no accidental type conflicts.</li>
* </ul>
*
* @see conflux.Ctx
* @see conflux.Key
* @see conflux.Listener
*/
package conflux;