Files
spring-cloud-contract/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/build.gradle
Shannon Pamperl 9ad51a58d9 Remove eclipse plugin since it's not necessary to apply it
Both Eclipse, via Buildship, and Intellij automatically add in init
scripts that run with the Gradle execution. In these they add in the
eclipse or idea plugins, so that those ide's get associated
configurations and tasks necessary for them.
2019-09-02 15:23:33 -05:00

140 lines
3.8 KiB
Groovy

buildscript {
repositories {
mavenCentral()
mavenLocal()
maven { url 'https://repo.spring.io/plugins-release' }
if (project.hasProperty('fatJar')) {
jcenter()
}
//For plugin-publish-plugin. Could be limited only to that dependency with Gradle 5.1+ - https://docs.gradle.org/5.1.1/release-notes.html#repository-to-dependency-matching
gradlePluginPortal()
}
dependencies {
classpath "com.bmuschko:gradle-nexus-plugin:2.3"
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3"
classpath 'com.gradle.publish:plugin-publish-plugin:0.9.10'
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') ?: ''
testSystemProperties = [
"WORK_OFFLINE" : gradle.startParameter.isOffline() ? 'TRUE' : 'FALSE'
]
JavaVersion javaVer = JavaVersion.current()
println "Current Java version equal to [${javaVer}]"
javaVersionNumber = javaVer.toString()
incompatibleJdk = javaVer.ordinal() > 8
}
project.version = findProperty('verifierVersion')
apply plugin: 'groovy'
apply plugin: "java-gradle-plugin"
apply from: "$rootDir/gradle/release.gradle"
//apply plugin: "jacoco"
group = 'org.springframework.cloud'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
maven { url "https://repo.spring.io/libs-release-local" }
maven { url "https://repo.spring.io/libs-staging-local/" }
}
//Dependencies in all subprojects - https://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 https://stackoverflow.com/questions/20618857/gradle-task-groovydoc-failing-with-noclassdeffounderror
jansi.extendsFrom(runtime)
}
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.3-groovy-2.5') {
exclude(group: 'org.codehaus.groovy')
}
testCompile 'info.solidsoft.spock:spock-global-unroll:0.5.0'
testCompile gradleTestKit()
}
task libtest() {
doLast {
configurations.testCompile.files.each { println it }
}
}
task checkJdkVersion {
doLast {
if (incompatibleJdk) {
logger.warn("Java Version is equal to [${javaVersionNumber}]. The tests will be disabled (due to issues with compilation)")
}
}
}
test {
testLogging {
exceptionFormat = 'full'
}
systemProperties = testSystemProperties
dependsOn(checkJdkVersion)
enabled = !project.hasProperty('fast') && !incompatibleJdk
}
groovydoc {
def title = "IPDS ${version}"
groovyClasspath = project.configurations.jansi
}
dependencies {
jansi 'org.fusesource.jansi:jansi:1.11'
}
/*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()
}
}
}
}