I followed the solution given here: upload artifact to artifactory using gradle, but it is not working for me.
Here is my code:
apply plugin: 'artifactory'
apply plugin: 'maven-publish'
/* Specify the repositories to be used for downloading artifacts */
repositories {
maven {
url = "${artifactory_contextUrl}/repo"
}
}
/* Define the repository (in artifactory) where artifactoryPublish task should publish */
artifactory {
contextUrl = "${artifactory_contextUrl}"
publish {
repository {
repoKey = "${artifactory_repoKey}"
username = "${artifactory_user}"
password = "${artifactory_password}"
}
}
defaults {
publications ('integTestPublish')
}
}
publishing {
publications {
integTestPublish(MavenPublication) {
setArtifactId(project.name + '-' + integTestJar.appendix)
artifact integTestJar.archivePath
}
}
}
The error is:
> Could not find method defaults() for arguments [build_3a14r6bjhcvi883gaucf1jd8f0$_run_closure1_closure5_closure9@71bc1581] on root project 'samples'.
GAV used for artifactory plugin is:
classpath group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.1.0'
What is wrong here ? can someone point me to DSL/API doc of artifactory plugin version 2.1.0 My gradle version is 1.11