Stefano Zanella
08/26/2024, 1:48 PM// plugin's apply() method
val buildPythonPackage = project.tasks.register("buildPythonPackage", PythonTask::class.java) {
...
it.outputs.file(
"build/libs/python/${projectConfiguration.name.get()}-${projectConfiguration.version.get()}-py3-none-any.whl"
)
}
project.artifacts {
it.add(CONSUMABLE_CONFIGURATION_NAME, buildPythonPackage)
}
I'd like to do something like:
val dynamicPackagePath = packageOutputDir.map { it.asFileTree.matching { it.include("*.whl") }.singleFile }
val buildPythonPackage = project.tasks.register("buildPythonPackage", PythonTask::class.java) {
...
it.outputs.file(dynamicPackagePath)
}
project.artifacts {
it.add(CONSUMABLE_CONFIGURATION_NAME, buildPythonPackage)
}
But apparently the path provider is resolved already during the configuration phaseVampire
08/26/2024, 2:40 PMStefano Zanella
08/26/2024, 7:10 PMVampire
08/26/2024, 8:30 PMVampire
08/26/2024, 8:31 PMStefano Zanella
08/26/2024, 9:01 PMVampire
08/26/2024, 9:35 PMStefano Zanella
08/27/2024, 5:46 AM