* Attempt to keep Kotlin totally off the classpath * Add version header for new class * Fix a few bugs with the samples and provide better debugging output for javaexec * Use main consistently * Fix Gradle's published pom and use maven-publish plugin consistently throughout plugin and samples * Re-add groovydoc jar * Have assemble create the groovydoc jar * Switch to publishToMavenLocal * Sync dependencies with pom.xml and fix null provider for Gradle versions less than 6.2 * Perform quoting conditionally for Windows only * Add jsch, aether, and shaded libraries to round out compatibility * Ensure contract tests are generated before kotlin compile task
67 lines
1.8 KiB
Groovy
67 lines
1.8 KiB
Groovy
plugins {
|
|
id "groovy"
|
|
id "org.springframework.boot"
|
|
id "io.spring.dependency-management"
|
|
id "maven-publish"
|
|
}
|
|
|
|
group = 'com.example'
|
|
version = '0.0.1'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
mavenLocal()
|
|
maven { url "https://repo.spring.io/snapshot" }
|
|
maven { url "https://repo.spring.io/milestone" }
|
|
maven { url "https://repo.spring.io/release" }
|
|
}
|
|
|
|
dependencyManagement {
|
|
imports {
|
|
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${BOM_VERSION}"
|
|
mavenBom "org.springframework.cloud:spring-cloud-contract-dependencies:${verifierVersion}"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("org.springframework.boot:spring-boot-starter-web")
|
|
implementation("org.springframework.boot:spring-boot-starter-actuator")
|
|
|
|
testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock'
|
|
testImplementation 'org.springframework.cloud:spring-cloud-starter-contract-stub-runner'
|
|
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
|
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
|
}
|
|
testImplementation "com.example:http-server-webclient:0.0.1:stubs"
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
include '**/*GradleTests*'
|
|
systemProperty 'spring.profiles.active', 'gradle'
|
|
testLogging {
|
|
exceptionFormat = 'full'
|
|
}
|
|
afterSuite { desc, result ->
|
|
if (!desc.parent) {
|
|
println "Results: (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
|
|
if (result.testCount == 0) {
|
|
throw new IllegalStateException("No tests were found. Failing the build")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
task resolveDependencies {
|
|
doLast {
|
|
project.rootProject.allprojects.each { subProject ->
|
|
subProject.buildscript.configurations.each { configuration ->
|
|
configuration.resolve()
|
|
}
|
|
subProject.configurations.each { configuration ->
|
|
configuration.resolve()
|
|
}
|
|
}
|
|
}
|
|
}
|