Attempt to keep Kotlin totally off the classpath (#1558)
* 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
This commit is contained in:
@@ -26,8 +26,8 @@ repositories {
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "org.springframework.cloud:spring-cloud-dependencies:$BOM_VERSION"
|
||||
mavenBom "org.springframework.cloud:spring-cloud-contract-dependencies:${project.findProperty('verifierVersion') ?: verifierVersion}"
|
||||
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${BOM_VERSION}"
|
||||
mavenBom "org.springframework.cloud:spring-cloud-contract-dependencies:${verifierVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,8 @@ contracts {
|
||||
failOnNoContracts = false
|
||||
}
|
||||
|
||||
generateClientStubs.enabled = false
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
systemProperty 'spring.profiles.active', 'gradle'
|
||||
@@ -68,10 +70,6 @@ task stubsJar(type: Jar, dependsOn: ['copySnippets', 'copySources', 'copyClasses
|
||||
from project.file("${project.buildDir}/stubs")
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives stubsJar
|
||||
}
|
||||
|
||||
task copySnippets(type: Copy, dependsOn: test) {
|
||||
from "target/snippets/stubs"
|
||||
into "${project.buildDir}/stubs/META-INF/${project.group}/${project.name}/${project.version}/mappings"
|
||||
@@ -110,7 +108,7 @@ publishing {
|
||||
|
||||
clean.doFirst {
|
||||
delete 'target/snippets/stubs'
|
||||
delete "~/.m2/repository/com/example/http-server-restdocs-gradle"
|
||||
delete "~/.m2/repository/com/example/http-server-webclient-gradle"
|
||||
}
|
||||
|
||||
task resolveDependencies {
|
||||
|
||||
@@ -196,8 +196,7 @@
|
||||
<arguments>
|
||||
<argument>clean</argument>
|
||||
<argument>build</argument>
|
||||
<!-- For some reason publishToMavenLocal doesn't work... Please don't troll Gradle ;)-->
|
||||
<argument>install</argument>
|
||||
<argument>publishToMavenLocal</argument>
|
||||
<argument>
|
||||
-PverifierVersion=${spring-cloud-contract.version}
|
||||
</argument>
|
||||
|
||||
@@ -1,26 +1,22 @@
|
||||
pluginManagement {
|
||||
plugins {
|
||||
id 'org.springframework.boot'
|
||||
id "org.springframework.cloud.contract" version "${verifierVersion}"
|
||||
id "io.spring.dependency-management" version "1.0.8.RELEASE"
|
||||
}
|
||||
repositories {
|
||||
// to pick from local .m2
|
||||
mavenLocal()
|
||||
// for snapshots
|
||||
maven { url "https://repo.spring.io/libs-snapshot-local" }
|
||||
// for milestones
|
||||
maven { url "https://repo.spring.io/libs-milestone-local" }
|
||||
// for GA versions
|
||||
maven { url "https://repo.spring.io/snapshot" }
|
||||
maven { url "https://repo.spring.io/milestone" }
|
||||
gradlePluginPortal()
|
||||
}
|
||||
plugins {
|
||||
id 'org.springframework.boot' version "${bootVersion}"
|
||||
id "io.spring.dependency-management" version "1.0.10.RELEASE"
|
||||
}
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.id == 'org.springframework.boot') {
|
||||
useModule("org.springframework.boot:spring-boot-gradle-plugin:${bootVersion}")
|
||||
// protects us in case the gradle-portal-plugin hasn't yet been published by Maven
|
||||
if (requested.id.id == 'org.springframework.cloud.contract') {
|
||||
useModule("org.springframework.cloud:spring-cloud-contract-gradle-plugin:${verifierVersion}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
rootProject.name = 'http-server-webclient'
|
||||
|
||||
rootProject.name = 'http-server-webclient-gradle'
|
||||
|
||||
Reference in New Issue
Block a user