Sergey Chernov
08/19/2024, 9:13 AMCONFIGURING phase, not EXECUTING like e.g. regular compilation dependency.
The problem is that the artifact is quite big and it's resolved in a single-thread CONFIGURING phase (while potentially it could be multi-thread EXECUTING).
I tried this approach:
configurations {
remoteApp {
attributes {
attribute(ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE, "unzipped")
}
}
}
dependencies {
// example from <https://docs.gradle.org/current/userguide/artifact_transforms.html#artifact_transforms_without_parameters>
// public abstract class Unzip implements TransformAction<TransformParameters.None> {
registerTransform(Unzip) {
from.attribute(ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE, "jar")
to.attribute(ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE, "unzipped")
}
// libs is toml version catalog
remoteApp libs.remoteApp
}
def unpackRemoteAppTask = tasks.register('unpackRemoteApp', Copy.class) {
from({ configurations.remoteApp })
into layout.buildDirectory.dir("remoteapp/x86")
fileMode = 0755
dirMode = 0755
}Sergey Chernov
08/19/2024, 9:16 AMSergey Chernov
08/19/2024, 9:18 AMVampire
08/19/2024, 9:22 AMVampire
08/19/2024, 9:25 AMSergey Chernov
08/19/2024, 9:30 AM