This repository has been archived by the owner on May 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* gradle build jackson fix some more jackson testing testFixtures, version to project properties test build maven-publishing conventions remove jackson bom (not supported by old versions) pom polishing zstd dependency linting compose-provided support cleanup files jackson bla documentation remove jdbc + redis fix e2e-test simplify e2e test properties run full github workflow on gradle convention plugin cleanup drop jackson 2.6.x support, and test with latest library versions Jackson 2.6.x support was broken anyway, because fahrschein-typeresolver didn't compile. We shouldn't state we support a certain library version if only parts of our tool work with it. use provided gradle play with dependency reasoning README fix publishing setup from guide https://docs.gradle.org/current/userguide/publishing_maven.html publishing test polishing clean up maven pom.xml documentation and compatibility testing dependency report test coverage reporting CVE scanning don't discriminate eclipse * use xy.version property naming * Update buildSrc/src/main/groovy/fahrschein.maven-publishing-conventions.gradle Co-authored-by: Christoph Berg <[email protected]> * Update buildSrc/src/main/groovy/fahrschein.maven-publishing-conventions.gradle Co-authored-by: Christoph Berg <[email protected]> * Code review changes * fahrschein-http-jdk11/build.gradle: avoid escape for single quote * fahrschein-http-spring/build.gradle: follow naming pattern for module name * fahrschein/build.gradle b/fahrschein/build.gradle: add jackson-core as implementation dependency * gradle.properties: add newline * gradle/wrapper/gradle-wrapper.properties: add distributionSha256Sum * adds newline * add note about connection pool size * adds another newline * Document dependency baselines * make tasks.withType evaluation lazy * formatting, fixing testcontainers version string cleanup * obsolete dependency * use java toolchains to ensure JDK11 Co-authored-by: Christoph Berg <[email protected]>
- Loading branch information
1 parent
4d8f658
commit 68f1625
Showing
50 changed files
with
832 additions
and
1,253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: CVE scan | ||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt-hotspot' | ||
java-version: '11' | ||
- uses: gradle/gradle-build-action@v2 | ||
with: | ||
gradle-version: 7.4.1 | ||
arguments: dependencyCheckAggregate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,7 @@ target/ | |
.settings/ | ||
.vscode | ||
bin/ | ||
|
||
#gradle | ||
.gradle/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
plugins { | ||
id 'eclipse' | ||
id 'idea' | ||
id 'com.github.ben-manes.versions' version '0.42.0' | ||
id 'org.owasp.dependencycheck' version '7.1.0.1' | ||
} | ||
|
||
|
||
// CVE vulnerability scanning | ||
// run: ./gradlew dependencyCheckAggregate | ||
|
||
dependencyCheck { | ||
failBuildOnCVSS = '9' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
plugins { | ||
id 'groovy-gradle-plugin' | ||
} | ||
|
||
repositories { | ||
gradlePluginPortal() | ||
} |
63 changes: 63 additions & 0 deletions
63
buildSrc/src/main/groovy/fahrschein.java-conventions.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'jacoco' | ||
id 'org.owasp.dependencycheck' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
group = 'org.zalando' | ||
version = project.property('project.version') + (project.hasProperty('release') ? '' : '-SNAPSHOT') | ||
|
||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(11) | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.compilerArgs << '-parameters' | ||
options.compilerArgs << '-Xlint:all' | ||
options.encoding = 'UTF-8' | ||
options.release = 8 | ||
} | ||
|
||
dependencies { | ||
implementation("org.slf4j:slf4j-api:${property('slf4j.version')}") { | ||
because "we want slf4j-api to be available everywhere" | ||
} | ||
testRuntimeOnly("org.slf4j:slf4j-simple:${property('slf4j.version')}") { | ||
because "we want the slf4j-simple logger implementation available at test runtime" | ||
} | ||
testImplementation("org.mockito:mockito-core:${property('mockito.version')}") { | ||
because "we want mockito to be used in tests" | ||
} | ||
testImplementation("junit:junit:${property('junit.version')}") { | ||
because "we want a common version JUnit across all projects" | ||
} | ||
testImplementation('org.hamcrest:hamcrest:2.2') { | ||
because "we want to have hamcrest available for all testing" | ||
} | ||
compileOnly('com.google.code.findbugs:jsr305:2.0.1') { | ||
because "we want to have annotations like @Deprecated available at compilation time" | ||
} | ||
} | ||
|
||
configurations.all { | ||
resolutionStrategy.dependencySubstitution { | ||
substitute(platform(module('commons-logging:commons-logging'))). | ||
using module("org.slf4j:jcl-over-slf4j:${property('slf4j.version')}") | ||
substitute(platform(module('org.hamcrest:hamcrest-core'))). | ||
using module("org.hamcrest:hamcrest:2.2") | ||
} | ||
} | ||
|
||
test { | ||
finalizedBy jacocoTestReport // report is always generated after tests run | ||
} | ||
jacocoTestReport { | ||
dependsOn test // tests are required to run before generating the report | ||
} | ||
|
85 changes: 85 additions & 0 deletions
85
buildSrc/src/main/groovy/fahrschein.maven-publishing-conventions.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
plugins { | ||
id 'maven-publish' | ||
id 'signing' | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
from(components.java) | ||
versionMapping { | ||
usage('java-api') { | ||
fromResolutionOf('runtimeClasspath') | ||
} | ||
usage('java-runtime') { | ||
fromResolutionResult() | ||
} | ||
} | ||
pom { | ||
url = 'https://github.com/zalando-nakadi/fahrschein' | ||
inceptionYear = '2006' | ||
licenses { | ||
license { | ||
name = 'Apache License, Version 2.0' | ||
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
name = 'Othon Crelier' | ||
email = '[email protected]' | ||
organization = 'Zalando SE' | ||
organizationUrl = 'https://tech.zalando.com/' | ||
} | ||
developer { | ||
name = 'Malte Pickhan' | ||
email = '[email protected]' | ||
organization = 'Zalando Payments GmbH' | ||
organizationUrl = 'https://tech.zalando.com/' | ||
} | ||
developer { | ||
name = 'Oliver Trosien' | ||
email = '[email protected]' | ||
organization = 'Zalando SE' | ||
organizationUrl = 'https://tech.zalando.com/' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:[email protected]:zalando-nakadi/fahrschein.git' | ||
developerConnection = 'scm:git:[email protected]:zalando-nakadi/fahrschein.git' | ||
url = 'https://github.com/zalando-nakadi/fahrschein' | ||
} | ||
} | ||
repositories { | ||
maven { | ||
def snapshotsRepo = 'https://oss.sonatype.org/content/repositories/snapshots/' | ||
def releasesRepo ='https://oss.sonatype.org/service/local/staging/deploy/maven2/' | ||
url = version.endsWith('SNAPSHOT') ? snapshotsRepo : releasesRepo | ||
credentials { | ||
username = System.getenv("NEXUS_USERNAME") | ||
password = System.getenv("NEXUS_PASSWORD") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
signing { | ||
def signingKey = System.getenv("GPG_KEY") | ||
def signingPassword = System.getenv("GPG_PASSPHRASE") | ||
useInMemoryPgpKeys(signingKey, signingPassword) | ||
sign publishing.publications.maven | ||
} | ||
|
||
javadoc { | ||
if(JavaVersion.current().isJava9Compatible()) { | ||
options.addBooleanOption('html5', true) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.