Skip to content

Wire central catalog refresh#21

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

Wire central catalog refresh#21
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
Contributor

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 in build.gradle to download and update the central NostrGameEngine version catalog, and significantly expands gradle/libs.versions.toml with numerous new versions, libraries, bundles, and plugins. A review comment suggests adding explicit connection and read timeouts to the network request in the refreshCatalog task to prevent the build or CI/CD pipelines from hanging indefinitely on unstable connections.

Comment thread build.gradle
Comment on lines +454 to +459
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
Contributor

Choose a reason for hiding this comment

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

medium

The refreshCatalog task downloads the central catalog using URL.getText(), which does not have any connection or read timeouts configured by default. If the network connection is unstable or the remote server is unresponsive, this can cause the Gradle build (and CI/CD pipelines) to hang indefinitely.

It is highly recommended to configure explicit connect and read 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.getInputStream().getText('UTF-8')
        println "Refreshed ${target}"
    }

@riccardobl riccardobl merged commit c184ca4 into master May 29, 2026
3 of 15 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