Fixed build
This commit is contained in:
@@ -29,6 +29,7 @@ repositories {
|
||||
apply plugin: 'groovy'
|
||||
apply plugin: 'spring-boot'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'maven'
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
@@ -57,6 +58,38 @@ task wrapper(type: Wrapper) {
|
||||
gradleVersion = '2.14'
|
||||
}
|
||||
|
||||
task stubsJar(type: Jar, dependsOn: ['copySnippets', 'copySources', 'copyClasses']) {
|
||||
baseName = project.name
|
||||
classifier = 'stubs'
|
||||
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"
|
||||
}
|
||||
|
||||
task copySources(type: Copy) {
|
||||
from "src/main/java"
|
||||
include '**/model/Fraud*.*'
|
||||
into "${project.buildDir}/stubs/"
|
||||
}
|
||||
|
||||
task copyClasses(type: Copy) {
|
||||
from "${project.buildDir}/classes/main/"
|
||||
include '**/model/Fraud*.*'
|
||||
into "${project.buildDir}/stubs/"
|
||||
}
|
||||
|
||||
clean.doFirst {
|
||||
delete 'target/snippets/stubs'
|
||||
delete "~/.m2/repository/com/example/"
|
||||
}
|
||||
|
||||
task resolveDependencies {
|
||||
doLast {
|
||||
project.rootProject.allprojects.each { subProject ->
|
||||
|
||||
@@ -178,12 +178,14 @@
|
||||
<executions>
|
||||
<execution>
|
||||
<id>gradle</id>
|
||||
<phase>install</phase>
|
||||
<phase>test</phase>
|
||||
<configuration>
|
||||
<executable>./gradlew</executable>
|
||||
<arguments>
|
||||
<argument>clean</argument>
|
||||
<argument>build</argument>
|
||||
<argument>publishToMavenLocal</argument>
|
||||
<!-- For some reason publishToMavenLocal doesn't work... Please don't troll Gradle ;)-->
|
||||
<argument>install</argument>
|
||||
<argument>-PverifierVersion=${spring-cloud-contract.version}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
|
||||
@@ -1 +1 @@
|
||||
rootProject.name = 'http-server'
|
||||
rootProject.name = 'http-server-restdocs'
|
||||
|
||||
Reference in New Issue
Block a user