apply plugin: 'java' apply plugin: 'maven' //Setup Artifactory so we get our jars through it. We must pass in artifactory_user, artifactory_password, and artifactory_contextUrl (http://media:8081/artifactory). buildscript { repositories { maven { url 'http://media:8081/artifactory/plugins-release' credentials { username = "${artifactory_user}" password = "${artifactory_password}" } } } dependencies { classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.9') } } allprojects { apply plugin: 'artifactory' } artifactory { contextUrl = "${artifactory_contextUrl}" //The base Artifactory URL if not overridden by the publisher/resolver publish { repository { repoKey = 'libs-release-local' username = "${artifactory_user}" password = "${artifactory_password}" maven = true } } resolve { repository { repoKey = 'libs-release' username = "${artifactory_user}" password = "${artifactory_password}" maven = true } } } //Set a default task.// project.defaultTasks("releaseLibs"); configurations { releaseLibs { description = 'Deploys the libraries previously generated in the Archives project subfolders.' transitive = true } } dependencies { // packageApp group:'commons-collections', name:'commons-collections', version:'3.2' } def rb_foundation = file('Release Binaries/DE Application Foundation.jar') def b_foundation = file('Binaries/DE Application Foundation.jar') def s_foundation = file('Source/DE Application Foundation.zip'); artifacts { archives rb_foundation archives b_foundation archives s_foundation } uploadArchives { repositories { mavenDeployer { setRepository project.repositories.maven pom.groupId = 'com.de22.foundation' pom.version = '' pom.packaging = '' //Link the name of the artifact with the pom name used below.// addFilter('rb-foundation') {artifact, file -> artifact.name == 'rb-foundation' } addFilter('b-foundation') {artifact, file -> artifact.name == 'b-foundation' } addFilter('s-foundation') {artifact, file -> artifact.name == 's-foundation' } pom('rb-foundation').artifactId = 'foundation.bin.release' pom('b-foundation').artifactId = 'foundation.bin.debug' pom('s-foundation').artifactId = 'foundation.src' pom('rb-foundation').packaging = 'jar' pom('b-foundation').packaging = 'jar' //TODO: Convert the zip's to jars. pom('s-foundation').packaging = 'jar' } } } task releaseLibs << { uploadArchives() }