Skip to content
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 on error_prone_annotations to objects projects #1450

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ private static void setupSubprojects(
private static void configureDependencies(Project project, ConjureExtension extension) {
project.getDependencies().add("api", Dependencies.CONJURE_JAVA_LIB);
project.getDependencies().add("api", Dependencies.JETBRAINS_ANNOTATIONS);
project.getDependencies().add("api", Dependencies.ERRORPRONE_ANNOTATIONS);
boolean useJakarta = Dependencies.isJakartaPackages(extension.getJava());
project.getDependencies()
.add(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ private static boolean shouldConfigureJavaServices(Project project) {
private static void setupObjectsProject(Project project, Supplier<GeneratorOptions> _optionsSupplier) {
project.getDependencies().add("api", Dependencies.CONJURE_JAVA_LIB);
project.getDependencies().add("api", Dependencies.JETBRAINS_ANNOTATIONS);
project.getDependencies().add("api", Dependencies.ERRORPRONE_ANNOTATIONS);
}

private static void setupDialogueProject(Project project, Supplier<GeneratorOptions> _optionsSupplier) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ final class Dependencies {
* have a minimum version rather than failing builds.
*/
static final String JETBRAINS_ANNOTATIONS = "org.jetbrains:annotations:23.0.0";
/**
* Starting with conjure-lib version 8.18.0, the build() method of generated builders
* add a @CheckReturnValue annotation from errorprone.
* See: https://github.com/palantir/conjure-java/pull/2282
*/
static final String ERRORPRONE_ANNOTATIONS = "com.google.errorprone:error_prone_annotations";

private static final String JAKARTA_PACKAGES = "jakartaPackages";
private static final String JERSEY = "jersey";
Expand Down