Skip to content

Commit

Permalink
Add missing javax.annotation dependency
Browse files Browse the repository at this point in the history
Fixes bazelbuild#321.

Bazel/Dagger integration requires javax.annotation to be on the
classpath to generate @generated annotation.

Recent ErrorProne releases (started from 2.3.3) added new bug pattern:
RefersToDaggerCodegen that is flagging the code as invalid, as it
doesn't realized that the code is generated.

Due to this problem, a previous attemt to bump EP version in Bazel was
reverted. Fixing it would allow us to make another attempt to update
EP version in Bazel.
  • Loading branch information
davido committed May 1, 2020
1 parent dbf68b5 commit a5edcfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions kotlin/internal/repositories/setup.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def kt_configure():
"com.google.dagger:dagger:2.26",
"com.google.dagger:dagger-compiler:2.26",
"com.google.dagger:dagger-producers:2.26",
"javax.annotation:javax.annotation-api:1.3.2",
"javax.inject:javax.inject:1",
"org.pantsbuild:jarjar:1.7.2",
],
Expand Down
1 change: 1 addition & 0 deletions src/main/kotlin/io/bazel/kotlin/builder/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ java_library(
"//third_party:dagger",
"@com_github_jetbrains_kotlin//:annotations",
"@com_github_jetbrains_kotlin//:kotlin-stdlib",
"@kotlin_rules_maven//:javax_annotation_javax_annotation_api",
"@kotlin_rules_maven//:javax_inject_javax_inject",
],
)

0 comments on commit a5edcfc

Please sign in to comment.