How to upload a bunch of artifacts to artifactory using Gradle?

These artifacts are not generated by gradle ,they are generated by Ant .Also pls post code which downloads from artifactory for compilation.Please give a working code snippet

to downloading artifacts you can use this way:

apply plugin: ‘java’ group = ‘com.cordys’ version = ‘4.3’

repositories {

maven {

url “http://buildrepos.vanenburg.com/bop” // for custom artifacts

}

}

dependencies {

compile group:‘com.cordys’, name: ‘esbclient’, version: ‘4.3.0-SECUREOUTBOUND-WIP-SNAPSHOT’

// custom artifact yours

} sourceSets {

main {

java {

srcDir ‘src’

//setting custom source, by default convention is ‘src/java’ by gradle java plugin

}

} }

/***********************************************************/

for publishing artifacts, you should mention the location of artifacts in artifacts closure which are built by the ant tool.

artifacts {

archives file(‘build/lib/custom.jar’)

}

uploadArchives {

repositories {

ivy {

credentials {

username “username”

password “pw”

}

url “http://repo.mycompany.com

//mention your custom repository is ivy specific like that otherwise go to maven specific url srtucture.

}

} }