Skip to content

Fix non-deterministic UUID-based configuration name in getApiJars()#1943

Closed
Copilot wants to merge 2 commits intog/20250110/isolated-projectsfrom
copilot/sub-pr-1139
Closed

Fix non-deterministic UUID-based configuration name in getApiJars()#1943
Copilot wants to merge 2 commits intog/20250110/isolated-projectsfrom
copilot/sub-pr-1139

Conversation

Copy link
Contributor

Copilot AI commented Mar 1, 2026

getApiJars() was registering a new Gradle configuration with a random UUID suffix (e.g., shadowMinimizeApi_a1b2c3d4) on every invocation, breaking build model determinism, preventing configuration-cache reuse, and leaking configurations on repeated calls.

Changes

  • Stable name: Replaced the UUID-based configuration name with a constant shadowMinimizeApi
  • Idempotent registration: Use configurations.findByName() to reuse an existing configuration instead of always registering a new one
  • Cleanup: Removed kotlin.uuid imports
// Before
configurations.register("shadowMinimizeApi_${Uuid.random().toString().substring(0, 8)}") { ... }

// After
configurations.findByName(SHADOW_MINIMIZE_API_CONFIGURATION_NAME)?.let { provider { it } }
  ?: configurations.register(SHADOW_MINIMIZE_API_CONFIGURATION_NAME) { ... }

  • CHANGELOG's "Unreleased" section has been updated, if applicable.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 1, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx4g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)
  • scans-in.gradle.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx4g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] WIP address feedback on Support Isolated Projects PR Fix non-deterministic UUID-based configuration name in getApiJars() Mar 1, 2026
configurations.named(configName)
} else {
configurations.register(configName) {
configurations.findByName(SHADOW_MINIMIZE_API_CONFIGURATION_NAME)?.let { provider { it } }
Copy link
Member

Choose a reason for hiding this comment

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

@Goooler Goooler closed this Mar 1, 2026
@Goooler Goooler deleted the copilot/sub-pr-1139 branch March 1, 2026 14:39
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.

2 participants