Files
spring-cloud-contract/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/build.gradle
Marcin Grzejszczak 3842b4b57a Updated wrong versions
2022-04-19 15:57:58 +02:00

129 lines
3.8 KiB
Groovy

buildscript {
repositories {
mavenCentral()
mavenLocal()
//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.gradle.publish:plugin-publish-plugin:0.14.0'
}
}
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()
jgitVersion = "5.12.0.202106070339-r"
jschVersion = "0.0.9"
}
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/release" }
}
//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 {
compileOnly gradleApi()
// provide version alignment with project
implementation(platform("org.springframework.cloud:spring-cloud-contract-tools:${project.version}"))
// Need to set the versions manually cause otherwise Gradle will not publish a proper pom
implementation "org.apache.maven.resolver:maven-resolver-api:1.4.1"
implementation "org.eclipse.jgit:org.eclipse.jgit:${jgitVersion}"
implementation "org.eclipse.jgit:org.eclipse.jgit.ssh.jsch:${jgitVersion}"
implementation "com.jcraft:jsch.agentproxy.jsch:${jschVersion}"
implementation "com.jcraft:jsch.agentproxy.sshagent:${jschVersion}"
implementation "com.jcraft:jsch.agentproxy.usocket-jna:${jschVersion}"
implementation "com.fasterxml.jackson.core:jackson-databind:2.13.2.2"
implementation "org.springframework:spring-core:5.3.18"
implementation("org.springframework.cloud:spring-cloud-contract-shade:${project.version}")
api("org.springframework.cloud:spring-cloud-contract-stub-runner:${project.version}") {
exclude(group: '*')
}
api("org.springframework.cloud:spring-cloud-contract-verifier:${project.version}") {
exclude(group: '*')
}
testImplementation('org.spockframework:spock-core:2.0-M5-groovy-3.0') { // @releaser:version-check-off
exclude(group: 'org.codehaus.groovy')
}
testImplementation localGroovy()
testImplementation gradleTestKit()
}
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 {
jansi 'org.fusesource.jansi:jansi:1.11'
}
jar {
manifest {
attributes 'Implementation-Version': project.version
}
}
task resolveDependencies {
doLast {
project.rootProject.allprojects.each { subProject ->
subProject.buildscript.configurations.each { configuration ->
configuration.resolve()
}
subProject.configurations.each { configuration ->
configuration.resolve()
}
}
}
}