Closed stegeto22 closed 10 months ago
Looks like a change to the behavior of the Gradle API there. I'm afraid I don't have time to look into this in the foreseeable future, but I will gladly test and review any PRs.
It works if fetchSources is disabled:
platform {
bundle('some-group:some-artifact:some-version')
fetchSources = false
}
Runinng the script with Gradle 6.5 I get the following message:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bundles'.
> Cannot add artifact if target configuration has been set
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
1 actionable task: 1 executed
Here is my build file, works fine with Gradle 5.6.4:
plugins {
id "org.standardout.bnd-platform" version "1.7.0"
}
repositories {
mavenCentral()
}
platform {
// add pegdown as dependency to the platform configuration
bundle 'org.pegdown:pegdown:1.4.2'
}
@vogella @ibauersachs's solution worked for me, give it a try.
Disabling fetchSources
does work around the problem for me, too.
I'd really prefer to have the sources available, though. Has anyone successfully applied the fix from in #73 - that is, is there a patched artificat published somewhere?
@yohoe how did you proceed, are you using a privately published artifact?
Looks as if the new releases are not being published, the latest version in the Plugin Portal is still 1.7.0: https://plugins.gradle.org/plugin/org.standardout.bnd-platform
@jochenberger Yes, right now it is only available via Maven Central (see instructions in README) and not via the Plugin Portal.
I added a ticket on adding the new releases to the Plugin Portal as well: https://github.com/stempler/bnd-platform/issues/77
Sorry, I didn't notice that. Thanks for the clarification.
Using the example
with gradle version 6.0.1 I get the error:
It is working with gradle 5.6.4!