-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update implementation #2
Conversation
* filtering of configurations * catching exceptions of pom resolve logic * copy system properties important for pom resolving to context * update README.md * update Gradle Wrapper to 5.2.1 * set fixed project name to avoid different named artifact
Thanks for your contribution. I'll hopefully try it out soon and push out a release for you. Cheers, |
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
|
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, ***@***.***> 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
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABW1JC1iwYAec_IRGDw8HUgUlRrlOWsaks5vQuBfgaJpZM4bJMxd>
.
|
For me it was: FAILURE: Build failed with an exception.
Guess you dont have testRuntimeOnly in you testcase? |
Whoops, I was wrong
https://github.com/uklance/gradle-dependency-export/blob/master/src/test/groovy/com/lazan/dependency/export/MavenDependencyExportTest.groovy#L52
The test sets a configuration which means the default logic doesn't fire
…On Sun, 24 Feb 2019, 7:10 pm Stefan, ***@***.***> 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
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABW1JFqYzBv429VdFGTXdptLfsGAD4Xcks5vQuOagaJpZM4bJMxd>
.
|
Currently i have to use:
to make it work. |
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, ***@***.***> 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
<#2 (comment)>,
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, ***@***.***> 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
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABW1JHfp9iFE5VnXhP6Gy2DGWn0lroaOks5vQuqygaJpZM4bJMxd>
.
|
Sorry for the german comments. Will fix that in 0.3 ...