Skip to content

Commit

Permalink
Remove erroneously added JSR250 deps from the Hilt runtime.
Browse files Browse the repository at this point in the history
RELNOTES=Remove the erroneous JSR250 dep from the Hilt runtime.
PiperOrigin-RevId: 343393037
  • Loading branch information
Chang-Eric authored and Dagger Team committed Nov 20, 2020
1 parent 6313cbd commit 8dca74b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 14 deletions.
5 changes: 1 addition & 4 deletions java/dagger/hilt/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ java_library(
],
exports = [
"//java/dagger/hilt/processor/internal/aggregateddeps:annotation",
"@google_bazel_common//third_party/java/jsr250_annotations",
],
deps = [
":generates_root_input",
Expand Down Expand Up @@ -66,7 +65,6 @@ java_library(
],
exports = [
"//java/dagger/hilt/internal/generatesrootinput",
"@google_bazel_common//third_party/java/jsr250_annotations",
],
deps = [
":package_info",
Expand All @@ -83,7 +81,6 @@ java_library(
],
exports = [
"//java/dagger/hilt/internal/definecomponent",
"@google_bazel_common//third_party/java/jsr250_annotations",
],
deps = [
":generates_root_input",
Expand Down Expand Up @@ -215,11 +212,11 @@ gen_maven_artifact(
artifact_target_maven_deps = [
"com.google.code.findbugs:jsr305",
"com.google.dagger:dagger",
"javax.annotation:jsr250-api",
"javax.inject:javax.inject",
],
artifact_target_maven_deps_banned = [
"com.google.guava:guava",
"javax.annotation:jsr250-api",
],
javadoc_exclude_packages = [
"dagger.hilt.internal",
Expand Down
2 changes: 1 addition & 1 deletion java/dagger/hilt/android/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ gen_maven_artifact(
"com.google.dagger:dagger-lint-aar",
"com.google.dagger:dagger",
"com.google.dagger:hilt-core",
"javax.annotation:jsr250-api",
"javax.inject:javax.inject",
],
artifact_target_maven_deps_banned = [
"com.google.guava:guava",
"javax.annotation:jsr250-api",
],
javadoc_android_api_level = 29,
javadoc_exclude_packages = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import dagger.multibindings.IntoMap;
import dagger.multibindings.IntoSet;
import java.io.IOException;
import javax.annotation.Generated;
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.Modifier;

Expand Down Expand Up @@ -71,16 +70,14 @@ void generate() throws IOException {
.addOriginatingElement(metadata.testElement())
.addAnnotation(Processors.getOriginatingElementAnnotation(metadata.testElement()))
.addModifiers(Modifier.PUBLIC, Modifier.FINAL)
.addAnnotation(
AnnotationSpec.builder(Generated.class)
.addMember("value", "$S", getClass().getName())
.build())
.addAnnotation(Module.class)
.addAnnotation(
Components.getInstallInAnnotationSpec(
ImmutableSet.of(ClassNames.APPLICATION_COMPONENT)))
.addMethod(providesTestMethod());

Processors.addGeneratedAnnotation(builder, env, getClass());

metadata.bindValueElements().stream()
.map(this::providesMethod)
.sorted(comparing(MethodSpec::toString))
Expand Down
3 changes: 1 addition & 2 deletions java/dagger/hilt/android/testing/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ android_library(
"//java/dagger/hilt/android/internal/testing:test_application_component_manager",
"//java/dagger/hilt/android/internal/testing:test_application_component_manager_holder",
"//java/dagger/hilt/internal:component_manager",
"@google_bazel_common//third_party/java/jsr250_annotations",
],
deps = [
":package_info",
Expand Down Expand Up @@ -205,12 +204,12 @@ gen_maven_artifact(
"com.google.code.findbugs:jsr305",
"com.google.dagger:dagger",
"com.google.dagger:hilt-android",
"javax.annotation:jsr250-api",
"javax.inject:javax.inject",
"junit:junit",
],
artifact_target_maven_deps_banned = [
"com.google.guava:guava",
"javax.annotation:jsr250-api",
],
javadoc_android_api_level = 29,
javadoc_exclude_packages = [
Expand Down
2 changes: 0 additions & 2 deletions java/dagger/hilt/migration/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ android_library(
],
exports = [
"//java/dagger/hilt/internal/aliasof",
"@google_bazel_common//third_party/java/jsr250_annotations",
],
deps = [
":package_info",
Expand All @@ -41,7 +40,6 @@ java_library(
"//java/dagger/hilt/processor/internal/disableinstallincheck:processor",
],
exports = [
"@google_bazel_common//third_party/java/jsr250_annotations",
],
deps = [
":package_info",
Expand Down

0 comments on commit 8dca74b

Please sign in to comment.