Skip to content

Commit

Permalink
fix: explicitly exclude annotation processors from dep-analysis (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed Nov 18, 2022
1 parent f190f7f commit bd8ca4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void afterResolve(ResolvableDependencies dependencies) {
private boolean addDependency(Project project, String dependencyName) {
var apConfig = project.getConfigurations().findByName(ANNOTATION_PROCESSOR);
if (apConfig != null) {
project.getLogger().debug("autodoc: Add dependency annotationProcessor(\"{}\") to project {}", dependencyName, project.getName());
project.getLogger().debug("autodoc: Add dependency {}(\"{}\") to project {}", ANNOTATION_PROCESSOR, dependencyName, project.getName());
return apConfig.getDependencies().add(project.getDependencies().create(dependencyName));
}
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ public void apply(Project target) {
"com.fasterxml.jackson.core:jackson-annotations",
"com.fasterxml.jackson.core:jackson-databind");
});
a.onUnusedAnnotationProcessors(i -> i.exclude(
"org.eclipse.edc:autodoc-processor"
));
a.onUnusedDependencies(i -> i.exclude(
// dependencies declared at the root level for all modules
"org.assertj:assertj-core",
"org.junit.jupiter:junit-jupiter-api",
"org.junit.jupiter:junit-jupiter-params",
"org.mockito:mockito-core",
"org.eclipse.edc:runtime-metamodel",
"org.eclipse.edc:autodoc-processor"
"org.eclipse.edc:runtime-metamodel"
));
a.onIncorrectConfiguration(i -> i.exclude(
// some common dependencies are intentionally exported by core:common:connector-core for simplicity
Expand Down

0 comments on commit bd8ca4d

Please sign in to comment.