Slackbot
08/29/2023, 4:43 PMAdam
08/29/2023, 5:28 PMReferencing dependency resolution results is also disallowed (e.g. ArtifactResolutionQuery, ResolvedArtifact, ArtifactResult etc…).
Thomas Broyer
08/29/2023, 5:30 PMVampire
08/29/2023, 7:18 PMVampire
08/29/2023, 7:18 PMVampire
08/29/2023, 7:19 PMVampire
08/29/2023, 7:20 PMgetDependencyHandler()
is internal API. At least I only find it on internal classes.Vampire
08/29/2023, 7:22 PMproject
, i.e. project.dependencies.createArtifactResolutionQuery()....
, then we are back at not CC compliant as you must not access project
at execution time and I doutb that it is acceptable to have project.dependencies
as task property value either.Eli Graber
08/29/2023, 7:36 PMgetDependencyHandler
is annotated with @Inject
in the task:
public abstract class SpdxSbomTask extends DefaultTask {
@Inject
protected abstract DependencyHandler getDependencyHandler();
...
}
Vampire
08/29/2023, 8:12 PMVampire
08/29/2023, 8:13 PMthis was the only way I could get it to workYeah, because it completely ignores attributes. So you might get "something", but maybe not the "right thing". 🙂
Eli Graber
08/29/2023, 9:01 PMVampire
08/29/2023, 9:03 PMEli Graber
08/30/2023, 11:00 AMDependencyHandler
and using ArtifactResolutionQuery
?Justin Van Dort
08/31/2023, 12:17 PMJustin Van Dort
08/31/2023, 12:18 PMJustin Van Dort
08/31/2023, 1:25 PMEli Graber
08/31/2023, 1:43 PMResolvedComponentResult
from the configuration when configuring the task, and this is the only way I could get the POMs I need at task execution time.
It seems to be working with CC though, at least I haven't noticed any issues.Eli Graber
08/31/2023, 1:46 PMJustin Van Dort
08/31/2023, 1:46 PMEli Graber
08/31/2023, 1:47 PMEli Graber
08/31/2023, 1:48 PMJustin Van Dort
08/31/2023, 1:48 PMDoes CC get disabled automatically when using ARQ?
Justin Van Dort
08/31/2023, 1:48 PMEli Graber
08/31/2023, 1:49 PMJustin Van Dort
08/31/2023, 1:49 PMJustin Van Dort
08/31/2023, 1:50 PMPhilip W
09/03/2023, 7:10 AMEli Graber
09/03/2023, 4:34 PMVampire
09/07/2023, 11:14 PMI'm using it because a configuration can't be stored as a task input.That's not fully correct. If you declare the property
FileCollection
and set it to a configuration, it works fine.Eli Graber
09/07/2023, 11:16 PMEli Graber
11/01/2023, 6:30 PMJustin Van Dort
11/01/2023, 6:36 PMJustin Van Dort
11/01/2023, 10:19 PMJustin Van Dort
11/01/2023, 10:20 PMProperty
, and then configure the value of that property with the result of your ARQ? That way, the ARQ is executed during serialization-time, in between configuration time and execution timeJustin Van Dort
11/01/2023, 10:23 PMabstract class MyTask {
@Input
abstract MapProperty<String, PomInfo> getPoms()
}
tasks.register("doStuff", MyTask) {
poms = project.provider(() -> {
// Do ARQ and effective POM calculations here
})
}
Vampire
11/01/2023, 10:44 PMIs that a recent change? I remember trying that a while ago and it didn't work
Sorry, missed that question. No, it is not a recent change. It was always like that.
Eli Graber
11/02/2023, 5:50 AMJustin Van Dort
11/03/2023, 3:27 AM