-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Feat/new implementation cyclonedx bom #532
Feat/new implementation cyclonedx bom #532
Conversation
Signed-off-by: Gordon <[email protected]>
Signed-off-by: Gordon <[email protected]>
…for non existing file extensions Signed-off-by: Gordon <[email protected]>
Signed-off-by: Gordon <[email protected]>
Signed-off-by: Gordon <[email protected]>
487c48f
to
e016f01
Compare
I think this PR should resolve #528, @gordonrousselle can you please add test for it? |
Signed-off-by: Gordon <[email protected]>
Signed-off-by: Gordon <[email protected]>
Signed-off-by: Gordon <[email protected]>
src/main/java/org/cyclonedx/gradle/DependencyGraphTraverser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/cyclonedx/gradle/DependencyGraphTraverser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/cyclonedx/gradle/DependencyGraphTraverser.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Gordon <[email protected]>
…date sbom, missing nullables and remove duplicated code Signed-off-by: Gordon <[email protected]>
f235111
to
be08c09
Compare
…ackage:projectsAndScopes properties (adding back in later PR) Signed-off-by: Gordon <[email protected]>
…ovider package private Signed-off-by: Gordon <[email protected]>
Signed-off-by: Gordon <[email protected]>
Signed-off-by: Gordon <[email protected]>
…for non existing file extensions Signed-off-by: Gordon <[email protected]>
Signed-off-by: Gordon <[email protected]>
Signed-off-by: Gordon <[email protected]>
Signed-off-by: Gordon <[email protected]>
Signed-off-by: Gordon <[email protected]>
Signed-off-by: Gordon <[email protected]>
Signed-off-by: Gordon <[email protected]>
…date sbom, missing nullables and remove duplicated code Signed-off-by: Gordon <[email protected]>
…ackage:projectsAndScopes properties (adding back in later PR) Signed-off-by: Gordon <[email protected]>
…ovider package private Signed-off-by: Gordon <[email protected]>
a2c603f
to
7a81820
Compare
….com/gordonrousselle/cyclonedx-gradle-plugin into feat/new-implementation-cyclonedxBom
Signed-off-by: Gordon <[email protected]>
@stevespringett @DarthHater @nscuro @mr-zepol Do you have any concerns here? If not, I'll merge it tomorrow |
Somehow I missed this PR - I was about to submit a PR that migrates from
The (trimmed) exception is:
I'm looking into this more to see if I can provide a suggestion/workaround. |
.filter(configuration -> shouldIncludeConfiguration(configuration) | ||
&& !shouldSkipConfiguration(configuration) | ||
&& configuration.isCanBeResolved()) | ||
.flatMap(config -> config.getIncoming().getArtifacts().getArtifacts().stream()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add lenient artifactView
to avoid errors when selecting variants in Android projects:
.flatMap(config -> config.getIncoming().getArtifacts().getArtifacts().stream()) | |
.flatMap(config -> config.getIncoming().artifactView(view -> {view.lenient(true);}).getArtifacts().getArtifacts().stream()) |
Note that this suggestion will likely fail spotless
and this should be run through ./gradlew :spotlessApply
.
Hi @jeremylong, I'm very excited that such small change can fix Android issues. Can you please open a separate PR with this fix? Then we can properly test it and close related issues |
The "small" change - requires moving from I might have a minor fix I can propose to the current implementation. Let me test something. |
It turns out even using a lenient configuration using the legacy
As such, this PR - with the addition of the lenient artifact view appears to solve the android issues. |
dependencyNode.inScopeConfiguration(projectName, configName); | ||
graph.get(graphNode).add(dependencyNode); | ||
queue.add(dependencyNode); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we log any UnresolvedDependencyResult
?
} | |
} else if (dep instanceof UnresolvedDependencyResult) { | |
UnresolvedDependencyResult unresolved = (UnresolvedDependencyResult) dep; | |
logger.debug( | |
"Unable to resolve artifact `{}` because {}", | |
unresolved.getAttempted().getDisplayName(), | |
unresolved.getFailure().toString()); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion. I have added it in.
I could submit another PR that isn't as large, follows more of the code paths that were used previously, and solves the Android issues. But honestly, the code in this PR is really good and you should just go with this one. |
Signed-off-by: Gordon <[email protected]>
I'll submit another PR to add the lenient artifactView. |
This is a proposal implementation for the next major version of the cyclonedx gradle plugin. The reason for this is twofold. Firstly, this implementation will support Gradle's configuration cache which will be enforced by default in the near future. Secondly, it aims to resolve some of the open issues reported against the current implementation.
Most of the existing features are still supported, but a couple of points are worth noting: