That way we do not interfere with whatever Maven brings on its classpath without this change deployment might fail due to being unauthorized. with this change we're shading aether and maven in stub runner. Due to this there is no classpath clash any more fixes #325
139 lines
3.9 KiB
Groovy
139 lines
3.9 KiB
Groovy
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
mavenLocal()
|
|
maven { url 'https://repo.spring.io/plugins-release' }
|
|
if (project.hasProperty('fatJar')) jcenter()
|
|
}
|
|
dependencies {
|
|
classpath "com.bmuschko:gradle-nexus-plugin:2.3"
|
|
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3"
|
|
if (project.hasProperty('fatJar')) classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
|
|
}
|
|
}
|
|
|
|
ext {
|
|
repoUser = System.getenv('REPO_USERNAME') ?: project.findProperty('REPO_USERNAME') ?: ''
|
|
repoPass = System.getenv('REPO_PASSWORD') ?: project.findProperty('REPO_PASSWORD') ?: ''
|
|
|
|
contractVerifierGradlePluginLibsDir ="$buildDir/contractVerifier-gradle-plugin-libs"
|
|
testSystemProperties = [
|
|
'contract-gradle-plugin-libs-dir': contractVerifierGradlePluginLibsDir,
|
|
"WORK_OFFLINE" : gradle.startParameter.isOffline() ? 'TRUE' : 'FALSE'
|
|
]
|
|
}
|
|
|
|
project.version = findProperty('verifierVersion') ?: '1.5.4.RELEASE'
|
|
apply plugin: 'groovy'
|
|
apply from: "$rootDir/gradle/release.gradle"
|
|
apply plugin: 'eclipse'
|
|
apply plugin: "jacoco"
|
|
apply plugin: 'checkstyle'
|
|
|
|
group = 'org.springframework.cloud'
|
|
|
|
sourceCompatibility = 1.7
|
|
targetCompatibility = 1.7
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
mavenCentral()
|
|
jcenter()
|
|
maven { url "http://repo.spring.io/snapshot" }
|
|
maven { url "http://repo.spring.io/milestone" }
|
|
maven { url "http://repo.spring.io/libs-release-local" }
|
|
maven { url "http://repo.spring.io/libs-staging-local/" }
|
|
}
|
|
|
|
//Dependencies in all subprojects - http://solidsoft.wordpress.com/2014/11/13/gradle-tricks-display-dependencies-for-all-subprojects-in-multi-project-build/
|
|
task allDeps(type: DependencyReportTask) {}
|
|
task allInsight(type: DependencyInsightReportTask) {}
|
|
|
|
configurations {
|
|
// fixing the groovydoc issue http://stackoverflow.com/questions/20618857/gradle-task-groovydoc-failing-with-noclassdeffounderror
|
|
jansi.extendsFrom(runtime)
|
|
|
|
contractVerifierGradlePluginLibs
|
|
}
|
|
|
|
dependencies {
|
|
compile gradleApi()
|
|
compile localGroovy()
|
|
compile "org.eclipse.aether:aether-api:${aetherVersion}"
|
|
|
|
compile("org.springframework.cloud:spring-cloud-contract-converters:${project.version}") {
|
|
exclude(group: 'org.codehaus.groovy')
|
|
}
|
|
compile("org.springframework.cloud:spring-cloud-contract-stub-runner:${project.version}") {
|
|
exclude(group: 'org.codehaus.groovy')
|
|
}
|
|
compile("org.springframework.cloud:spring-cloud-starter-contract-verifier:${project.version}") {
|
|
exclude(group: 'org.codehaus.groovy')
|
|
}
|
|
testCompile('org.spockframework:spock-core:1.0-groovy-2.4') {
|
|
exclude(group: 'org.codehaus.groovy')
|
|
}
|
|
testCompile 'info.solidsoft.spock:spock-global-unroll:0.5.0'
|
|
testCompile gradleTestKit()
|
|
checkstyle 'org.springframework.cloud:spring-cloud-build:1.0.2.RELEASE'
|
|
|
|
}
|
|
|
|
task libtest() {
|
|
doLast{
|
|
configurations.testCompile.files.each { println it }
|
|
}
|
|
}
|
|
|
|
test {
|
|
testLogging {
|
|
exceptionFormat = 'full'
|
|
}
|
|
systemProperties = testSystemProperties
|
|
enabled = !project.hasProperty('fast')
|
|
}
|
|
|
|
groovydoc {
|
|
def title = "IPDS ${version}"
|
|
groovyClasspath = project.configurations.jansi
|
|
}
|
|
|
|
dependencies {
|
|
contractVerifierGradlePluginLibs project
|
|
jansi 'org.fusesource.jansi:jansi:1.11'
|
|
}
|
|
|
|
task archiveContractVerifierGradlePluginLibsDependencies(type: Sync) {
|
|
from configurations.contractVerifierGradlePluginLibs.resolvedConfiguration.resolvedArtifacts.collect { it.file }
|
|
into contractVerifierGradlePluginLibsDir
|
|
}
|
|
|
|
archiveContractVerifierGradlePluginLibsDependencies.dependsOn project.tasks.jar
|
|
test.dependsOn archiveContractVerifierGradlePluginLibsDependencies
|
|
|
|
jacoco {
|
|
toolVersion = "0.7.7.201606060606"
|
|
}
|
|
|
|
jacocoTestReport {
|
|
reports {
|
|
xml.enabled true
|
|
}
|
|
}
|
|
|
|
task resolveDependencies {
|
|
doLast {
|
|
project.rootProject.allprojects.each { subProject ->
|
|
subProject.buildscript.configurations.each { configuration ->
|
|
configuration.resolve()
|
|
}
|
|
subProject.configurations.each { configuration ->
|
|
configuration.resolve()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
task wrapper(type: Wrapper) {
|
|
gradleVersion = '3.4'
|
|
} |