How to define "exe" artifacts for artifactory


Hi all !

I’m working on gradle project which will help me to produce setup (with innosetup).
The script download the dependencies from an JFrog’s artifactory server and compile all dependencies to build a setup.
This gradle script is used into Jenkins and the generated setup is send to artifactory, into a generic repository.

How can i define the produced setup as an artifact into my gradle script ?

(in order to send it by jenkins into artifactory with the pattern : [org]/[module]/baseRev/[module]-baseRev(-[classifier]).[ext])


// in order to use Inno Setup
apply plugin: 'distribution’
apply plugin: “com.jfrog.artifactory”

// Definition of the current project
version = '3.2.0’
description = ‘Setup builder module’

// package definition object

configurations { setupCfg }

// defininition of the repository used
repositories {
maven {
url ""
credentials {
username = "${artifactory_user}"
password = “${artifactory_password}”

// definition of the content of the setup recovered from the repositories

dependencies {
// core applicationDistribution
setupCfg(group: ‘app-artifacts.sp-tools’, name: ‘myapp’, version: project.version, ext: ‘exe’)

// common libs
setupCfg(group: '', name: 'MSVCP71', version: '7.10.3077.0', ext: 'DLL')


// Main task to build the setup

task buildsetup(dependsOn :[“installDist”]) << {
println "Package Initsrvpdt dependencies found : "
// manage build directory

def innoSetupDir = new File("${buildDir}/innosetup")
def innoSetupDirArtifacts = new File("${innoSetupDir}/artifacts")

delete fileTree(dir: innoSetupDir)

// Copying resolved artifacts
configurations.setupCfg.resolvedConfiguration.resolvedArtifacts.each { artifact ->
	project.copy {
		from artifact.file
		into innoSetupDirArtifacts
		rename { "${}.${artifact.extension}" }
// Copying Inno setup source file	
copy {
	rename("setup.iss.skel", "setup.iss")

println "${innoSetupDir}\\setup.iss"
//launch the build of setup
exec {
	workingDir rootProject.projectDir
	commandLine "ISCC ${innoSetupDir}/setup.iss".split()

copy {
delete fileTree(dir: innoSetupDir)