-
Notifications
You must be signed in to change notification settings - Fork 14
Update to Gradle 8 with higher JDK Support #439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
xeruf
wants to merge
53
commits into
main
Choose a base branch
from
chore/gradle7
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 48 commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
9711ce8
chore(gradle): remove xmlpull and document update issues
xeruf ad02e05
chore(gradle): update to gradle 7
xeruf 1f83f6e
build: some fixes
xeruf 29351f4
build(gradle): update gradle, kotlin, dokka
xeruf 367bc9c
docs: suppress companion objects in javadoc
xeruf 976ae1a
docs(gradle): proper module naming
xeruf b521dbb
docs(gradle): also generate dokka html
xeruf 12b0102
docs(plugin26): add and translate user documentation
xeruf 6f6421f
build(gradle): simplify custom dokka publication config
xeruf 1582ab3
docs(gradle): fix dokka sidebar links and standardize output directories
xeruf 88382aa
docs(plugin26): document all classes and methods
xeruf 7dbfe73
docs(plugin26): document all enums
xeruf 7dfa541
refactor: create consistent plugins folder structure as games
xeruf 6dc5e8b
build(gradle): extract shared test-config module
xeruf 3ff416b
build(gradle): use runtimeClasspath and task inputs
xeruf 19b43a2
test(server): handle mixed messages in listener
xeruf f964cb9
fix(plugin26): avoid transient hash checks for observers
xeruf a3fcfd8
build: fix sdk javadoc publish and assert java+kotlin docs
xeruf 73e6417
build: split integration and release workflows into gradle scripts
xeruf 3ab73e7
docs(contributing): Add AGENTS cleanup planning and ignore plans dire…
xeruf b5cd7f5
docs(contributing): restore agent formatting and maintenance policies
xeruf 536bd2c
build: move jvm conventions to separate gradle script
xeruf d72a7ce
build: eliminate gradle and kotlin warning sources
xeruf 467c137
test: deduplicate await helpers and restore fibonacci backoff
xeruf afa8a4b
build(ci): update github actions gradle workflow
add7020
docs(agents): clarify gradle home and commit hook rules
598090c
build(ci): restore matrix and upload diagnostics artifacts
5353232
build(gradle): rename and simplify docs aggregation tasks
ed3dc70
build(gradle): align integration outputs with build/reports
fa5b5ad
docs(gradle): add kotlin dsl alternative and maintenance comparison
c00ec0b
build(server): move test-client flag handling to configuration phase
9a35172
build(gradle): migrate jvm conventions to kotlin dsl
4989429
docs(readme): update markdown docs for current layout
93668b0
fix(server): avoid eager cross-project task lookup in bundle
1ed7e62
fix(gradle): enforce kotlin jdk release for runtime compatibility
29263ad
build(gradle): simplify jdk target config
3f39b09
docs: fix tiny leftover artifacts
48f20a6
fix(server): stabilize network tests on windows
48cd09d
fix(gradle): redirect testTestClient process logs
aea2df7
fix(server): allow longer async message waits
ba2a1a8
fix(plugin24): reset violations before regular result assertion
648358e
refactor(server): centralize admin auth wait in test helper
c390729
build(gradle): revert to gradle 8 to preserve jdk 8 support
186accd
build(gradle): fix gradle config for gradle 8
87b8715
build(gradle): fix task output collisions
e4214d4
style: fix code warnings
9985618
build(ci): use highest supported jdk 24
d5ae974
build(gradle): upgrade logback to 1.5
a328c41
build(player): downgrade player shadow plugin to 8.3.10
1167bbd
build(ci): run pipeline with supported lts jdk versions
4727126
refactor: correct folder name for old hive from blokus
d41ec23
build(gradle): small dependency version unifications
8ab0c05
fix(server): correctly assert violation if a player did not join
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| # docs | ||
| readme | ||
| contributing | ||
| agents | ||
| # chore | ||
| git | ||
| gradle | ||
|
|
@@ -25,4 +26,4 @@ network | |
| logging | ||
|
|
||
| Game | ||
| Board | ||
| Board | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,54 +1,76 @@ | ||
| on: [push, pull_request, create] | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ${{ matrix.os }} | ||
| permissions: | ||
| contents: read | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| # https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs | ||
| os: [ubuntu-latest] #, windows-latest, macos-latest] | ||
| jdk: [8] | ||
| os: [ubuntu-latest, windows-latest, macos-latest] | ||
| jdk: [11, 24] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up JDK ${{ matrix.jdk }} | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: ${{ matrix.jdk }} | ||
| cache: 'gradle' | ||
| #- name: Cache Gradle packages | ||
| # uses: actions/cache@v4 | ||
| # with: | ||
| # path: [~/.gradle/caches, ~/.gradle/wrapper] | ||
| # key: ${{ matrix.os }}-gradle-jdk${{ matrix.jdk }}-${{ hashFiles('**/*.gradle.kts') }} | ||
| # restore-keys: ${{ matrix.os }}-gradle-jdk${{ matrix.jdk }} | ||
| - name: Grant execute permission for gradlew | ||
| run: chmod +x gradlew | ||
| - name: List Files | ||
| run: find -maxdepth 1 -type d | ||
| - name: Execute tests | ||
| run: ./gradlew clean check || ( exitcode=$?; find build/tests -name '*.log' -type f | while read f; do echo -e "\033[4m$f\033[0m"; cat $f; done && exit $exitcode; ) | ||
| - name: Bundle Artifacts | ||
| run: ./gradlew bundle | ||
| - name: Upload Artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: software-challenge-backend-${{ github.sha }} | ||
| path: | | ||
| build/bundle/*.zip | ||
| build/bundle/*.jar | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up JDK ${{ matrix.jdk }} | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: temurin | ||
| java-version: ${{ matrix.jdk }} | ||
| - name: Set up Gradle | ||
| uses: gradle/actions/setup-gradle@v4 | ||
| - name: Build, verify and bundle | ||
| run: ./gradlew --no-daemon clean check bundle | ||
| - name: Prepare CI diagnostics artifact | ||
| if: always() | ||
| shell: bash | ||
| run: | | ||
| { | ||
| echo "Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
| echo "Job: ${{ github.job }}" | ||
| echo "OS: ${{ matrix.os }}" | ||
| echo "JDK: ${{ matrix.jdk }}" | ||
| echo "SHA: ${{ github.sha }}" | ||
| } > ./build/reports/ci-info.txt | ||
| - name: Upload test reports | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: test-reports-${{ matrix.os }}-jdk${{ matrix.jdk }}-${{ github.sha }} | ||
| if-no-files-found: warn | ||
| path: | | ||
| ./build/reports/ci-info.txt | ||
| **/build/reports/**/* | ||
| **/build/test-results/**/* | ||
| - name: Upload bundle artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: software-challenge-backend-${{ matrix.os }}-jdk${{ matrix.jdk }}-${{ github.sha }} | ||
| path: | | ||
| build/bundle/*.zip | ||
| build/bundle/*.jar | ||
|
|
||
| release: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/download-artifact@v4 # https://github.com/actions/download-artifact | ||
| with: | ||
| name: software-challenge-backend-${{ github.sha }} | ||
| path: artifacts | ||
| - name: Release ${{ github.ref }} | ||
| uses: softprops/action-gh-release@v1 # https://github.com/softprops/action-gh-release | ||
| with: | ||
| files: artifacts/* | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| pattern: software-challenge-backend-*-${{ github.sha }} | ||
| path: artifacts | ||
| merge-multiple: true | ||
| - name: Release ${{ github.ref }} | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: artifacts/* | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,4 +11,5 @@ out/ | |
| # Artifacts from test runs | ||
| logs/ | ||
| log/ | ||
| replays/ | ||
| replays/ | ||
| plans/ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was ist in plans?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. das ist für agentic coding |
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,168 @@ | ||
| # Repository Guidelines | ||
|
|
||
| ## Project Specifics | ||
| ### Structure & Modules | ||
| This repository is a multi-module Gradle project for the Software Challenge backend. | ||
|
|
||
| - `sdk/`: shared protocol, framework, networking, and player/server API classes. | ||
| - `server/`: game server application (`sc.server.Application`). | ||
| - `player/`: default player template and packaging tasks. | ||
| - `games/`: yearly plugins mapped as modules (`plugin2023`..`plugin2026`). | ||
| - `helpers/test-client` and `helpers/test-config`: integration tooling and shared test setup. | ||
| - `gradle/` and `gradlew`: build logic and wrapper. | ||
|
|
||
| ### Build, Test & Development Commands | ||
| Use the Gradle wrapper from repo root. | ||
| Always use the default Gradle user home from the environment; do not pass a custom home (no `-g ...`, no overridden `GRADLE_USER_HOME`). | ||
|
|
||
| - `./gradlew build`: compile, test, and create distribution bundles. | ||
| - `./gradlew check`: run verification tasks across modules. | ||
| - `./gradlew test`: run unit tests. | ||
| - `./gradlew integrationTest`: run end-to-end game/test-client checks. | ||
| - `./gradlew :server:run`: start server from source. | ||
| - `./gradlew :player:run`: start default player. | ||
| - `./gradlew bundle`: assemble release ZIP artifacts. | ||
|
|
||
| For module-scoped work, use qualified tasks (example: `./gradlew :plugin2026:test`). | ||
|
|
||
| ### Coding Style & Naming | ||
| Primary languages are Kotlin and Java, but all new code must be written in Kotlin. | ||
|
|
||
| - Follow existing module style and keep changes consistent with surrounding code. | ||
| - Use clear domain names (`GameState`, `Move`, `...Request`, `...Response`). | ||
| - Keep package naming aligned with module/year conventions (example: `sc.plugin2026`). | ||
| - Prefer descriptive test names ending in `Test` (example: `GameRuleLogicTest.kt`). | ||
| - No repository-wide formatter is enforced in Gradle; run IDE reformat with project defaults. | ||
|
|
||
| ## General Workflow Policies | ||
| - Follow commit/changelog/test/lint/refactor/process rules in this file for all AI-assisted changes. | ||
| - Keep edits focused, reviewable, and behavior-safe unless intentional behavioral changes are requested. | ||
|
|
||
| ### Testing & Verification | ||
| - Tests are mainly Kotest (`WordSpec` preferred, `FunSpec` for algorithmic cases) on JUnit 5; some legacy JUnit 5 tests remain. | ||
| - Place new tests under `src/test/kotlin`. | ||
| - Name test files `*Test.kt`. | ||
| - Write tests before each change except minor cosmetic-only changes. | ||
| - Verify tests after each change. | ||
| - For server-player interaction or protocol changes, run `./gradlew integrationTest`. | ||
| - Before adjusting failing tests, evaluate whether failures indicate regressions versus intentional behavior changes. | ||
| - Prefer behavior/outcome tests over implementation-detail tests. | ||
|
|
||
| ### Commit & PR Discipline | ||
| - Always commit every completed change. | ||
| - Use commit messages in format `type(scope): summary` (example: `fix(plugin26): avoid transient hash checks for observers`). | ||
| - Enable local hooks: `git config core.hooksPath .dev/githooks`. | ||
| - Commit format is enforced by hook: `type(scope): summary`. | ||
| - Allowed types are: `fix`, `feat`, `enhance`, `docs`, `style`, `refactor`, `test`, `build`, `rework`, `release`, `revert`. | ||
| - Prefer branch names like `feat/server/login` or `chore/gradle/release-fix`. | ||
| - For PRs, include: concise description, linked issue(s), test evidence (commands/results), and logs/screenshots when behavior/output changed. | ||
| - Use rebase merge when commits are independently valid; otherwise squash merge with PR title matching final commit message. | ||
| - Make atomic commits; if a commit only fixes the previous local commit, squash before handoff. | ||
|
|
||
| ### Changelog & Refactoring | ||
| - Keep `CHANGELOG.md` updated for notable user-visible behavior changes. | ||
| - Keep an `Unreleased` section at top; move entries into versioned section on release. | ||
| - Use semantic version sections and ISO dates (`YYYY-MM-DD`). | ||
| - After major milestones, run a focused refactor pass for duplication, consistency, and complexity. | ||
| - Prefer separate `refactor:` commits for cleanup when functionality does not depend on refactor changes. | ||
|
|
||
| ## Agent-Specific Instructions | ||
| ### Machine-Readable Policy | ||
| ```yaml | ||
| agent_policy: | ||
| source_of_truth: | ||
| - CONTRIBUTING.md | ||
| - GUIDELINES.md | ||
| - settings.gradle.kts | ||
| setup: | ||
| git_hooks: "git config core.hooksPath .dev/githooks" | ||
| project: | ||
| build_system: gradle | ||
| new_code_language: kotlin | ||
| modules: | ||
| - sdk | ||
| - server | ||
| - player | ||
| - plugin2023 | ||
| - plugin2024 | ||
| - plugin2025 | ||
| - plugin2026 | ||
| - test-client | ||
| - test-config | ||
| verification: | ||
| default: "./gradlew test" | ||
| interaction_or_protocol: "./gradlew integrationTest" | ||
| test_file_patterns: | ||
| - "src/test/kotlin/**/*Test.kt" | ||
| commit: | ||
| format: "type(scope): summary" | ||
| scopes_file: ".dev/scopes.txt" | ||
| merge: | ||
| rebase_if_independent: true | ||
| squash_if_experimental: true | ||
| constraints: | ||
| - "Do not create new Java source files." | ||
| - "Do not create new Java test files." | ||
| ``` | ||
|
|
||
| ### Prompt Effort Modes | ||
| ```yaml | ||
| prompt_effort: | ||
| quick: | ||
| - "Minimize testing/refactoring; run focused checks only." | ||
| - "Defer broader cleanup unless explicitly requested." | ||
| long: | ||
| - "Run thorough workflow with broader verification and edge-case checks." | ||
| - "Include refactor/debt review where appropriate." | ||
| default: | ||
| - "Choose balanced effort based on task complexity and risk." | ||
| ``` | ||
|
|
||
| ### Special Commands | ||
| ```yaml | ||
| special_commands: | ||
| squash: | ||
| - "Inspect recent commits and propose sensible squashes for repetitive fixups." | ||
| - "Do not squash unrelated functional changes." | ||
| - "Rewrite only unpushed local history unless explicitly instructed." | ||
| push: | ||
| - "List unpushed commits: git log origin/<branch>..HEAD --oneline" | ||
| - "Provide one high-level summary across unpushed commits." | ||
| - "Update changelog/version/tag only when explicitly requested." | ||
| - "Ask explicit confirmation before pushing branch or tags." | ||
| ``` | ||
|
|
||
| ### Assistant Response Formatting | ||
| ```yaml | ||
| assistant_response_formatting: | ||
| summary: | ||
| - "Keep summaries compact and scannable." | ||
| - "Prefer single-line status items when content fits." | ||
| - "Avoid repetitive progress boilerplate." | ||
| commit_reporting_format: "✅ <hash> <type>: <message>" | ||
| status_indicators: | ||
| success: "✅" | ||
| warning: "⚠️" | ||
| failure: "❌" | ||
| diagnostics: "🔍" | ||
| verification: "🧪" | ||
| style: | ||
| - "Prefer concise bullets over verbose prose." | ||
| - "Use status indicators consistently." | ||
| ``` | ||
|
|
||
| ### Plans & Artifacts | ||
| ```yaml | ||
| planning: | ||
| when_user_requests_plan: | ||
| - "Write plan files to plans/ at repo root." | ||
| - "Use descriptive kebab-case filenames." | ||
| - "Do not commit plan files unless explicitly requested." | ||
| after_implementation: | ||
| - "Delete the corresponding plan file after implementation is complete." | ||
| - "Before deleting untracked text artifacts (for example files in plans/), run git add on them once without committing so they are recoverable via index/reflog if deletion was a mistake." | ||
| ``` | ||
|
|
||
| ### AGENTS Maintenance | ||
| - When the user gives new standing workflow/process instructions, update `AGENTS.md` in the same session. | ||
| - Keep updates concise and place them in the most relevant existing section (create a new section only when needed). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.