-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dependency-analysis-gradle-plugin #3158
Changes from all commits
957666e
dd2ffbb
99d6d1e
c0f9949
ec16bff
da9279b
e2f3f27
600772a
0ea6bed
fed2da9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,8 +42,40 @@ if (!repositories) { | |
print("This machine already has some pre-configured repositories, will use: ${repositories*.name.join(", ")}") | ||
} | ||
|
||
buildscript { | ||
if (!repositories) { | ||
repositories { | ||
gradlePluginPortal() | ||
} | ||
} | ||
dependencies { | ||
if (JavaVersion.current().isJava11Compatible()) { | ||
classpath("com.autonomousapps:dependency-analysis-gradle-plugin:$dependencyAnalysisPluginVersion") | ||
} | ||
} | ||
} | ||
|
||
apply plugin: "io.servicetalk.servicetalk-gradle-plugin-internal-root" | ||
|
||
// Unfortunately, we can not make this validation part of our servicetalk-gradle-plugin-internal because it requires | ||
// JDK11 while we build and package out plugin with JDK8. | ||
if (JavaVersion.current().isJava11Compatible()) { | ||
apply plugin: "com.autonomousapps.dependency-analysis" | ||
|
||
dependencyAnalysis { | ||
issues { | ||
all { | ||
onAny { | ||
severity("warn") // FIXME: switch to "fail" when all issues are addressed | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will change after all issues are resolved, will require a few follow-up PRs |
||
exclude("com.google.code.findbugs:jsr305") | ||
} | ||
} | ||
} | ||
} | ||
|
||
quality.dependsOn buildHealth | ||
} | ||
|
||
task validateLocalDocSite(type: Exec) { | ||
group 'Documentation' | ||
description 'Generate and validate servicetalk.io site documentation' | ||
|
@@ -56,6 +88,8 @@ subprojects { | |
// mockito 5 only supports jdk11+ | ||
if (JavaVersion.current() < JavaVersion.VERSION_11) { | ||
project.setProperty("mockitoCoreVersion", mockitoCorePreJdk11Version) | ||
} else { | ||
apply plugin: "com.autonomousapps.dependency-analysis" | ||
} | ||
// Used by ci-release.yaml to determine which modules need to be built/released with JDK11. | ||
task printJavaTargetCompatibility { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,6 +68,13 @@ tasks.sourcesJar.dependsOn(copySourcesForJersey3) | |
tasks.compileJava.dependsOn(copySourcesForJersey3) | ||
tasks.processTestResources.dependsOn(copySourcesForJersey3) | ||
tasks.compileTestJava.dependsOn(copySourcesForJersey3) | ||
afterEvaluate { | ||
if (tasks.findByName("projectHealth")) { | ||
tasks.withType(com.autonomousapps.tasks.CodeSourceExploderTask) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried many different ways to avoid this duplication. Unfortunately, nothing worked without bringing more problems. My gradle-foo is exhausted at this point 😢 |
||
dependsOn(copySourcesForJersey3) | ||
} | ||
} | ||
} | ||
|
||
def actualJerseyVersion = "${jersey3VersionEE10}" | ||
def actualJaxRsVersion = "${jaxRsVersionEE10}" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/out/our