Closed stefanleh closed 5 years ago
Thanks for your contribution. I'll hopefully try it out soon and push out a release for you.
Cheers, Lance
I built and published version 0.2 of this plugin to the plugin portal. Apparently it can take up to 24 hours to be approved.
Thanks. I appreciate your effort for releasing.
I made a couple of changes and release version 0.3
defaultConfigurations.findAll { it.canBeResolved }
logic. If you need a custom collection of configurations, please manually set the configurations (see readme)systemProperties
Map to the task (defaults to System.getProperties()) which can be customized.Great News. Will send a PR soon for the logging and comments in english.
I just saw that you left the defaultConfugurations handling in place. The defaults dont work with current gradle relaeses, thats the cause i added defaultConfigurations.findAll { it.canBeResolved }. All configuraitons considered have the resolvable. The current default handling will break all the time and is therefore useless. I suggest to remove it completely and rely on proper configuration by the user.
The test case works perfectly with default configurations. Can you tell me a bit more about these unresolvable configurations you have?
I'd prefer my build to fail if it can't export a dependency rather than skipping it silently only for something else to fail building offline.
On Sun, 24 Feb 2019, 6:56 pm Stefan, notifications@github.com wrote:
I just saw that you left the defaultConfugurations handling in place. The defaults dont work with current gradle relaeses, thats the cause i added defaultConfigurations.findAll { it.canBeResolved }. All configuraitons considered have the resolvable. The current default handling will break all the time and is therefore useless. I suggest to remove it completely and rely on propert configuration by the user.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/uklance/gradle-dependency-export/pull/2#issuecomment-466805082, or mute the thread https://github.com/notifications/unsubscribe-auth/ABW1JC1iwYAec_IRGDw8HUgUlRrlOWsaks5vQuBfgaJpZM4bJMxd .
For me it was:
FAILURE: Build failed with an exception.
Resolving configuration 'testRuntimeOnly' directly is not allowed
Guess you dont have testRuntimeOnly in you testcase?
Whoops, I was wrong
The test sets a configuration which means the default logic doesn't fire
On Sun, 24 Feb 2019, 7:10 pm Stefan, notifications@github.com wrote:
For me it was:
FAILURE: Build failed with an exception.
- What went wrong: Could not determine the dependencies of task ':mavenDependencyExport'.
Resolving configuration 'testRuntimeOnly' directly is not allowed
Guess you dont have testRuntimeOnly in you testcase?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/uklance/gradle-dependency-export/pull/2#issuecomment-466806544, or mute the thread https://github.com/notifications/unsubscribe-auth/ABW1JFqYzBv429VdFGTXdptLfsGAD4Xcks5vQuOagaJpZM4bJMxd .
Currently i have to use:
mavenDependencyExport {
for (Configuration conf : project.buildscript.configurations.findAll{ it.canBeResolved }) {
configuration conf
}
for (Configuration conf : project.configurations.findAll{ it.canBeResolved }) {
configuration conf
}
}
to make it work. Maybe making the configurations non private would be fine? Then i can remove at least the foreach loops.
I didn't make configurations public/settable because it might get confused with project.configurations (people often use "configurations" in a gradle script without qualifying it)
Let me do some research on canBeResolved flag. Perhaps your logic is more sensible.
On Sun, 24 Feb 2019, 7:17 pm Stefan, notifications@github.com wrote:
Currently i have to use:
mavenDependencyExport {
for (Configuration conf : project.buildscript.configurations.findAll{ it.canBeResolved }) { configuration conf } for (Configuration conf : project.configurations.findAll{ it.canBeResolved }) { configuration conf }
}
to make it work. Maybe making the configurations non private would be fine? Then i can remove at least the foreach loops.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/uklance/gradle-dependency-export/pull/2#issuecomment-466807248, or mute the thread https://github.com/notifications/unsubscribe-auth/ABW1JAbbllq73bpzuMPXUPi8u2yEI4hQks5vQuVYgaJpZM4bJMxd .
I see following approaches:
Ok, looking at the javadocs
https://docs.gradle.org/current/javadoc/org/gradle/api/artifacts/Configuration.html#isCanBeResolved--
"Returns true if it is allowed to query or resolve this configuration. Defaults to true."
I'm happy to put your logic back in the default method. I agree that showing this exclusion in the logs is a good idea.
I'm also happy to log the configuration name and also the filenames via the Gradle logger. This would need to be in English rather than German.
On Sun, 24 Feb 2019, 7:40 pm Stefan, notifications@github.com wrote:
I see following approaches:
- removing default handling and adding some hints to documentation
- filtering the defaults with the canBeResolved and add logging about which configs are considered (and also maybe which were dropped)
- removing default handling and provide an allResolvableConfigurations method which can be used in the plugin configuration in the mavenDependencyExport closure
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/uklance/gradle-dependency-export/pull/2#issuecomment-466809401, or mute the thread https://github.com/notifications/unsubscribe-auth/ABW1JHfp9iFE5VnXhP6Gy2DGWn0lroaOks5vQuqygaJpZM4bJMxd .
Sorry for the german comments. Will fix that in 0.3 ...