Previously, the project provided a Gradle plugin and was only really intended for use with Gradle. This had influenced a number of design choices that have proven to be less than ideal when attempting to use the project with Maven. This commit backs off from a number of design decisions that worked well with Gradle but less so with Maven. Part of this is that the Gradle plugin is (temporarily?) no more. It's been removed in favour of configuring things directly in build.gradle. While this slightly increases the amount of configuration required it makes things far more flexible. Both samples have been updated with modified Gradle configuration and new Maven configuration. The README has also been updated to reflect these changes.
48 lines
888 B
Groovy
48 lines
888 B
Groovy
allprojects {
|
|
ext {
|
|
springVersion = '4.1.1.RELEASE'
|
|
}
|
|
group = 'org.springframework.restdocs'
|
|
}
|
|
|
|
project(':spring-restdocs-core') {
|
|
apply plugin: 'java'
|
|
|
|
sourceCompatibility = 1.7
|
|
targetCompatibility = 1.7
|
|
|
|
dependencies {
|
|
compile 'junit:junit:4.11'
|
|
compile "org.springframework:spring-test:$springVersion"
|
|
compile "org.springframework:spring-web:$springVersion"
|
|
compile 'javax.servlet:javax.servlet-api:3.1.0'
|
|
compile 'com.fasterxml.jackson.core:jackson-databind:2.3.4'
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
|
|
apply plugin: 'eclipse'
|
|
apply plugin: 'maven'
|
|
|
|
task sourcesJar(type: Jar) {
|
|
classifier = 'sources'
|
|
from project.sourceSets.main.allSource
|
|
}
|
|
|
|
task javadocJar(type: Jar) {
|
|
classifier = "javadoc"
|
|
from javadoc
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
archives javadocJar
|
|
}
|
|
|
|
eclipseJdt.onlyIf { false }
|
|
cleanEclipseJdt.onlyIf { false }
|
|
} |