Hi,
I have a custom task that uploads a custom wrapper to our binary repo (downloads a gradle version, fiddles around with some init.d stuff and then zips the whole thing and uploads it to a custom location in artifactory.
Here is how it looks (and works) in gradle 6.x
task makeGradleDistribution(type: Zip, dependsOn: updateGradleDistroInit) {
def distroVersion = "gradle-internal-${basedOnGradleVersion}.${wrapperSubVersion}.zip"
archiveName distroVersion
from "${buildDir}/$gradleBuildDir/gradle-${basedOnGradleVersion}"
into "gradle-${basedOnGradleVersion}"
outputs.file distroVersion
}
artifacts {
archives makeGradleDistribution
}
task publishWrapper( type: Upload ) {
configuration = configurations.archives
repositories {
ivy {
url "${artifactory_url}/third-party-apps/gradle"
credentials {
username "${artifactory_user}"
password "${artifactory_password}"
}
layout 'pattern' , {
//hack. i cant figure out why the "artifact" is called as the project...
artifact 'gradle-drwp-[revision](.[ext])'
}
}
....
So maybe my qeustion is really “howto give custom names to uploaded artifacts”