Fixed build

This commit is contained in:
Marcin Grzejszczak
2016-08-09 14:28:57 +02:00
parent 10293f4ad9
commit 01cfa8dcf9
13 changed files with 188 additions and 10 deletions

View File

@@ -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 ->

View File

@@ -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>

View File

@@ -1 +1 @@
rootProject.name = 'http-server'
rootProject.name = 'http-server-restdocs'