diff --git a/build.gradle b/build.gradle index af424c7..2a6a193 100644 --- a/build.gradle +++ b/build.gradle @@ -1,27 +1,54 @@ -allprojects { - // this is just to check if stuff is working - task hello << { task -> - println "I'm $task.project.name" - } +buildscript { + repositories { + jcenter() + } + dependencies { + classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.0.1" + } +} +allprojects { } subprojects { apply plugin: 'java' + apply plugin: 'maven-publish' + apply plugin: 'com.jfrog.artifactory' - repositories { - jcenter() + repositories { + jcenter() + } + publishing { + publications { + main(MavenPublication) { + from components.java + } + } } } -task explodedDist << { - File explodedDist = mkdir("$buildDir/allJars") - subprojects.each { project -> - project.tasks.withType(Jar).each {archiveTask -> - copy { - from archiveTask.archivePath - into explodedDist - } - } - } +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 + + } + defaults { + publications 'main' + } + } + resolve { + repository { + repoKey = 'libs-release' + username = "${artifactory_user}" + password = "${artifactory_password}" + maven = true + + } + } } + diff --git a/core/build.gradle b/core/build.gradle index 40cc634..4aa5baa 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -1,4 +1,9 @@ +group = 'com.nexmo' +version = '1.0' + dependencies { compile 'org.apache.commons:commons-lang3:3.3.2' testCompile 'junit:junit:4.12' } + + diff --git a/frontend/build.gradle b/frontend/build.gradle index 247e77d..44acf25 100644 --- a/frontend/build.gradle +++ b/frontend/build.gradle @@ -3,7 +3,8 @@ apply plugin: 'application' mainClassName = "frontend.FrontEndApplication" dependencies { - compile project(':core'), project(':client') + compile 'com.nexmo:core:1.0' + compile project(':client') compile 'io.dropwizard:dropwizard-core:0.7.1' testCompile 'junit:junit:4.12' diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..c47746f --- /dev/null +++ b/gradle.properties @@ -0,0 +1,3 @@ +artifactory_user=admin +artifactory_password=password +artifactory_contextUrl=http://172.16.16.80:8081/artifactory