Polish build file and ensure module sources and javadocs jars are published
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -14,4 +14,7 @@
|
||||
bin
|
||||
build
|
||||
out
|
||||
target
|
||||
target
|
||||
|
||||
credhub-server/config/*.pem
|
||||
credhub-server/uaa.yml
|
||||
@@ -1,8 +1,6 @@
|
||||
image::https://build.spring.io/plugins/servlet/wittified/build-status/SPRINGCREDHUB-CORE[Build Status,link=https://build.spring.io/browse/SPRINGCREDHUB-CORE]
|
||||
|
||||
image::https://spring.io/badges/spring-credhub/snapshot.svg[link=https://projects.spring.io/spring-credhub#quick-start]
|
||||
|
||||
= Spring CredHub
|
||||
== Spring CredHub
|
||||
|
||||
Spring CredHub provides client-side support for storing, retrieving, and deleting credentials from a https://github.com/cloudfoundry-incubator/credhub[CredHub] server running in a https://www.cloudfoundry.org/[Cloud Foundry] platform.
|
||||
|
||||
|
||||
63
build.gradle
63
build.gradle
@@ -17,7 +17,7 @@
|
||||
plugins {
|
||||
id 'checkstyle'
|
||||
id 'io.spring.nohttp' version '0.0.10'
|
||||
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
|
||||
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
|
||||
id 'io.spring.javaformat' version '0.0.29'
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ configure(allprojects) {
|
||||
}
|
||||
}
|
||||
|
||||
configure(allprojects - [project(':spring-credhub-docs')]) {
|
||||
configure(allprojects) {
|
||||
apply plugin: 'checkstyle'
|
||||
apply plugin: 'io.spring.nohttp'
|
||||
apply plugin: 'io.spring.javaformat'
|
||||
@@ -86,10 +86,35 @@ configure(allprojects - [project(':spring-credhub-docs')]) {
|
||||
}
|
||||
}
|
||||
|
||||
configure(allprojects - [project(':spring-credhub-docs'),
|
||||
project(':spring-credhub-integration-tests'),
|
||||
project(':spring-credhub-reactive-integration-tests')]) {
|
||||
configure(libraryProjects) {
|
||||
apply plugin: 'java-library'
|
||||
|
||||
java {
|
||||
withJavadocJar()
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
javadoc {
|
||||
options.encoding = 'UTF-8'
|
||||
options.memberLevel = JavadocMemberLevel.PROTECTED
|
||||
options.author = true
|
||||
options.header = project.name
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
archiveClassifier.set "sources"
|
||||
from sourceSets.main.allJava
|
||||
}
|
||||
|
||||
javadocJar {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
archiveClassifier.set "javadoc"
|
||||
from javadoc
|
||||
}
|
||||
}
|
||||
|
||||
configure(publishedProjects) {
|
||||
apply from: "${rootProject.projectDir}/publish-maven.gradle"
|
||||
}
|
||||
|
||||
@@ -119,13 +144,6 @@ subprojects {
|
||||
}
|
||||
}
|
||||
|
||||
javadoc {
|
||||
options.encoding = 'UTF-8'
|
||||
options.memberLevel = JavadocMemberLevel.PROTECTED
|
||||
options.author = true
|
||||
options.header = project.name
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile("junit:junit:$junitVersion")
|
||||
testCompile("org.mockito:mockito-core:$mockitoVersion")
|
||||
@@ -201,3 +219,24 @@ configure(rootProject) {
|
||||
description = "Builds -dist and -docs distribution archives."
|
||||
}
|
||||
}
|
||||
|
||||
def getDocumentationProjects() {
|
||||
[project(":spring-credhub-docs")] as Set
|
||||
}
|
||||
|
||||
def getTestProjects() {
|
||||
[project(":spring-credhub-integration-tests"),
|
||||
project(":spring-credhub-reactive-integration-tests")] as Set
|
||||
}
|
||||
|
||||
def getJavaProjects() {
|
||||
subprojects
|
||||
}
|
||||
|
||||
def getLibraryProjects() {
|
||||
javaProjects - documentationProjects - testProjects
|
||||
}
|
||||
|
||||
def getPublishedProjects() {
|
||||
libraryProjects + rootProject
|
||||
}
|
||||
|
||||
@@ -41,15 +41,15 @@ dependencies {
|
||||
compile("org.springframework.security:spring-security-oauth2-client")
|
||||
|
||||
if (project.hasProperty("useOkHttp3")) {
|
||||
compile("com.squareup.okhttp3:okhttp:${okHttp3Version}")
|
||||
compile("com.squareup.okhttp3:okhttp")
|
||||
} else if (project.hasProperty("useNetty")) {
|
||||
compile("io.netty:netty-all:${nettyVersion}")
|
||||
compile("io.netty:netty-all")
|
||||
} else {
|
||||
compile("org.apache.httpcomponents:httpclient:${httpClientVersion}")
|
||||
compile("org.apache.httpcomponents:httpclient")
|
||||
}
|
||||
|
||||
testCompile("org.springframework.boot:spring-boot-starter-test")
|
||||
testCompile("org.assertj:assertj-core:${assertJVersion}")
|
||||
testCompile("org.assertj:assertj-core")
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
@@ -43,7 +43,7 @@ dependencies {
|
||||
|
||||
testCompile("org.springframework.boot:spring-boot-starter-test")
|
||||
testCompile("io.projectreactor:reactor-test")
|
||||
testCompile("org.assertj:assertj-core:${assertJVersion}")
|
||||
testCompile("org.assertj:assertj-core")
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
@@ -96,13 +96,13 @@ public class ReactiveCredentialIntegrationTests extends ReactiveCredHubIntegrati
|
||||
}).verifyComplete();
|
||||
|
||||
StepVerifier.create(this.credentials.findByName(new SimpleCredentialName("/test")))
|
||||
.assertNext((response) -> assertThat(response).extracting("name").extracting("name")
|
||||
.containsExactly(CREDENTIAL_NAME.getName()))
|
||||
.assertNext((response) -> assertThat(response).extracting("name").extracting("name").asString()
|
||||
.contains(CREDENTIAL_NAME.getName()))
|
||||
.verifyComplete();
|
||||
|
||||
StepVerifier.create(this.credentials.findByPath("/spring-credhub/integration-test"))
|
||||
.assertNext((response) -> assertThat(response).extracting("name").extracting("name")
|
||||
.containsExactly(CREDENTIAL_NAME.getName()))
|
||||
.assertNext((response) -> assertThat(response).extracting("name").extracting("name").asString()
|
||||
.contains(CREDENTIAL_NAME.getName()))
|
||||
.verifyComplete();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user