58 lines
1.2 KiB
Groovy
58 lines
1.2 KiB
Groovy
description = 'Spring-Cloud Cloud Foundry Connector'
|
|
|
|
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
dependencies {
|
|
classpath 'com.github.jengelman.gradle.plugins:shadow:0.8'
|
|
}
|
|
}
|
|
|
|
apply plugin: 'shadow'
|
|
apply from: "publish-maven.gradle"
|
|
|
|
dependencies {
|
|
compile project(':spring-cloud-core')
|
|
compile("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
|
|
compile("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
|
|
}
|
|
|
|
shadow {
|
|
artifactSet {
|
|
include 'com.fasterxml.jackson.core:jackson-*'
|
|
}
|
|
relocation {
|
|
pattern = 'com.fasterxml.jackson'
|
|
shadedPattern = 'org.springframework.cloud.cloudfoundry.com.fasterxml.jackson'
|
|
}
|
|
}
|
|
|
|
task moveShadowJar(type: Copy) {
|
|
from "$buildDir/distributions/${archivesBaseName}-${version}-shadow.jar"
|
|
into "$buildDir/libs"
|
|
rename { String fileName ->
|
|
fileName.replace('-shadow', '')
|
|
}
|
|
}
|
|
|
|
moveShadowJar.dependsOn shadowJar
|
|
assemble.dependsOn moveShadowJar
|
|
install.dependsOn moveShadowJar
|
|
|
|
configurations {
|
|
tests
|
|
}
|
|
|
|
task testJar(type: Jar) {
|
|
classifier = 'tests'
|
|
from sourceSets.test.output
|
|
}
|
|
|
|
build.dependsOn testJar
|
|
|
|
artifacts {
|
|
tests testJar
|
|
archives testJar
|
|
}
|