Skip to content

Wire central catalog refresh#1

Merged
riccardobl merged 5 commits into
masterfrom
codex/catalog-refresh-202605291929
May 29, 2026
Merged

Wire central catalog refresh#1
riccardobl merged 5 commits into
masterfrom
codex/catalog-refresh-202605291929

Conversation

@riccardobl

Copy link
Copy Markdown
Member

Summary

  • Replace the local Gradle version catalog with the centralized NostrGameEngine catalog.
  • Add a refreshCatalog Gradle task that downloads NostrGameEngine/libs.catalog.
  • Add a manual refresh-catalog.yml workflow that opens a PR only when the refreshed catalog changes.
  • Add or update the existing snapshot publishing workflow schedule where this repository publishes snapshots.

Verification

  • Parsed all updated TOML catalogs with tomllib.
  • Parsed updated workflow YAML with Ruby YAML.load_file.
  • Ran ./gradlew --no-daemon -q refreshCatalog successfully in bech32 as the representative Groovy Gradle task.

Note: local Kotlin-task execution in cap-cache-generator was blocked before task execution because the machine ran out of disk space while the Gradle wrapper tried to install Gradle 8.4.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request registers a new Gradle task refreshCatalog to download and update the central NostrGameEngine Gradle version catalog, and significantly expands gradle/libs.versions.toml with a comprehensive list of dependencies, versions, bundles, and plugins. Feedback on the refreshCatalog task suggests removing the output declaration to prevent Gradle from incorrectly skipping the task as UP-TO-DATE, and adding connection and read timeouts to the network request to prevent the build from hanging indefinitely.

Comment thread build.gradle
Comment on lines +291 to +297
outputs.file(outputFile)

doLast {
def target = outputFile.asFile
target.parentFile.mkdirs()
target.text = new URI(catalogUrl.get()).toURL().getText('UTF-8')
println "Refreshed ${target}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Declaring outputs.file(outputFile) without any corresponding inputs or outputs.upToDateWhen { false } will cause Gradle to skip this task as UP-TO-DATE if the gradle/libs.versions.toml file already exists. Since this is a utility task meant to fetch the latest catalog from a remote source, it should always run when invoked. Removing the output declaration will ensure it always executes.

Additionally, using new URI(...).toURL().getText() without connection and read timeouts can cause the Gradle build to hang indefinitely if the network is unstable or the remote server is unresponsive. It is safer to configure timeouts on the connection.

    doLast {
        def target = outputFile.asFile
        target.parentFile.mkdirs()
        def connection = new URI(catalogUrl.get()).toURL().openConnection()
        connection.connectTimeout = 10000
        connection.readTimeout = 10000
        target.text = connection.inputStream.getText('UTF-8')
        println "Refreshed ${target}"

@riccardobl
riccardobl merged commit 628a1be into master May 29, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant