You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Gradle composites to build a set of projects. Some, but not all, of the projects use the Reckon plugin. (Gradle 7.4.2, Reckon 0.16.0 )
This setup works very well for development. My issue arises when I try to use this approach to create a release version of one of the Reckon-enabled projects.
When working with the project on its own, generating a release is simple: my_project_dir% gradle build -Preckon.stage=final
I would like to be able to do the same with the composite:
This doesn't produce a release. I reviewed the issues (#74) and it looks like this is intentional: The intended behavior is not clear. I understand and agree. But is there a (sane) way for me to get my use-case to work? Creating a release from one of the sub-projects seems like a valid use-case. I would like to get it to work without editing files, if possible. I think my ask can be summarized as:
"Given that at least one sub-project in a Gradle composite is Reckon-aware, how can I configure the build so that specific project is configured with reckon.stage=final?"
This would allow me to use composite builds in my CICD system.
I've tried some casual experiments just to see how/if reckon.scope was being propagated in the composite.
Setting reckon.stage=final in my global gradle.properties --> Ignored
Setting reckon.stage=final in the specific sub-projects gradle.properties -> Ignored (Standalone project complains that the version was evaluated before reckon was configured)
These failures led me to think I'm missing something basic, which is why I'm here :-)
The text was updated successfully, but these errors were encountered:
In the version of reckon that I'm using (0.16.0), the fix referenced above is implemented differently. The providers for stage and scope are modified with 'forUseAtConfigurationTime()'
This means that I can override this in my project:
// WARNING: Subtle and brittle
stage.set(project.getProviders().gradleProperty('reckon.stage'))
scope.set(project.getProviders().gradleProperty('reckon.scope'))
}
`
This has the effect of re-enabling the providers, even if we are in a composite.
This workaround is good enough for my narrow case (only one reckon-enabled project in a composite). But I don't consider it a real solution, especially since forUseAtConfigurationTime is deprecated.
I am using Gradle composites to build a set of projects. Some, but not all, of the projects use the Reckon plugin. (Gradle 7.4.2, Reckon 0.16.0 )
This setup works very well for development. My issue arises when I try to use this approach to create a release version of one of the Reckon-enabled projects.
When working with the project on its own, generating a release is simple:
my_project_dir% gradle build -Preckon.stage=final
I would like to be able to do the same with the composite:
composite_dir% gradle :my_project:build -Preckon.stage=final
This doesn't produce a release. I reviewed the issues (#74) and it looks like this is intentional: The intended behavior is not clear. I understand and agree. But is there a (sane) way for me to get my use-case to work? Creating a release from one of the sub-projects seems like a valid use-case. I would like to get it to work without editing files, if possible. I think my ask can be summarized as:
"Given that at least one sub-project in a Gradle composite is Reckon-aware, how can I configure the build so that specific project is configured with reckon.stage=final?"
This would allow me to use composite builds in my CICD system.
I've tried some casual experiments just to see how/if reckon.scope was being propagated in the composite.
These failures led me to think I'm missing something basic, which is why I'm here :-)
The text was updated successfully, but these errors were encountered: