:tada: Gradle 8.13-rc-1 is out! <https://docs.grad...
# releases
c
🎉 6
r
FYI. it breaks the nebula os packaging plugin (not sureprised as this plugin uses a lot of gradle internals ¯\_(ツ)_/¯
AAAND fixed
🎉 1
We see a regression in our dependency resolution. Running the elasticsearch build with
./gradlew :distribution:processIntegTestOutputs
we see different variants are picked if using 8.13-rc-1. 8.13-rc-1:
8.12.1:
I'll dig deeper into this but seems maybe a change in behavour for detached configurations?
j
As this seems to be test data related. Maybe there is a relationship to the removal of the "testType" property of TestSuites (and the changes around that https://github.com/gradle/gradle/pull/31706).
r
no its not just test data related
it just happens to occur there first
👍 1
running outgoingVariants on the providing project shows no difference between 8.13-rc-1 and 8.12.1:
Copy code
--------------------------------------------------	
Variant explodedBundleZip	
--------------------------------------------------	
Capabilities	
    - org.elasticsearch.plugin:security:9.1.0-SNAPSHOT (default capability)	
Attributes	
    - artifactType = directory	
Artifacts	
    - build/explodedBundle/x-pack-security
and the declaration of the detachedConfiguration is pretty straight forward: https://github.com/elastic/elasticsearch/blob/a59c182f9f7e9d1bf3d6eecbc0e44f24ff91[…]e/internal/distribution/ElasticsearchDistributionExtension.java I think, we didnt do anything wrong here and this should work 😇
j
Do you have a reproducer I could run? (Link to elasticsearch repo and a cmdline that resolves the configuration should be enough)
r
the repo and branch: https://github.com/breskeby/elasticsearch/tree/update-gradle-wrapper-813 then run
./gradlew :distribution:processIntegTestOutputs
should give you the issue
j
Do I somehow need to enable repositories on the build? Running the task complains there are no repos defined
r
that is exactly a side effect of that problem
because with 8.13-rc-1 it tries to resolve transient dependencies. that should not be the case
if you just run it with 8.12.1 you'll see it will just work
j
The first suspicious thing to me is there are no attributes on your detached configuration
Why would you expect the configuration to resolve to the exploded zip variant?
The 8.13 behavior seems correct imo
I haven’t yet ran with 8.12 to see why it’s resolving to the exploded zip there
(by name)
j
I see
Okay will get back
r
thank you!
j
Confirmed this is indeed a bug -- specifically related to using explicit configurations on dependencies added to detached configurations.
You should be able to workaround this by creating the detached configuration first, and then adding the dependency to the detached configuration, instead of passing the dependency to the
detachedConfiguration(Dependency...)
method
r
let me try that
how would i do that actually?
j
Instead of
Copy code
var moduleConfigurationCoords = Map.of("path", module.getPath(), "configuration", EXPLODED_BUNDLE_CONFIG);
        var dep = project.getDependencies().project(moduleConfigurationCoords);
        return project.getConfigurations().detachedConfiguration(dep);
Do
Copy code
var moduleConfigurationCoords = Map.of("path", module.getPath(), "configuration", EXPLODED_BUNDLE_CONFIG);
        var dep = project.getDependencies().project(moduleConfigurationCoords);
        var conf = project.getConfigurations().detachedConfiguration();
        conf.getDependencies().add(dep)
        conf
r
🤦‍♂️ of course
did not see getDependencies somehow 😄
@Justin Van Dort awesome. that works
j
Sweet. Can you please submit an issue so we can resolve this for 8.13 GA?
👍 1
r
j
Thank you
n
unrelated to the above, the bullet points under "Fixed issues" seem really big: