aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-04-10Upgrade dagger2 to dagger-2.51HEADmastermainSadaf Ebrahimi
This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update dagger2 For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md Test: TreeHugger Change-Id: I6a876e5d65cdd1d83ad3db931a09c349bdfa17cd
2024-03-06Merge Android 14 QPR2 to AOSP mainXin Li
Bug: 319669529 Merged-In: Ia62f84416a138e3ff84a153e6aa8a7b753ecbb68 Change-Id: I411135e165ef8690f3b402c4c5fe2d78b34688b8
2024-02-26Allow obfuscating @HiltViewModel annotated ViewModel name with r8.Wanying Ding
RELNOTES=Allow obfuscating @HiltViewModel annotated ViewModel name with r8. PiperOrigin-RevId: 610474363
2024-02-23Remove kitkat-specific test.Dagger Team
PiperOrigin-RevId: 609862242
2024-02-20Add a SkipTestInjection annotation to disable injecting the test class. This ↵Eric Chang
may be useful for outside rules that wants to inject the test class from some other Hilt component. This annotation may be used directly on the test class or on some other annotation, as typically outside rules would have some other code generators on their own to generate needed entry points. RELNOTES=Add @SkipTestInjection PiperOrigin-RevId: 608724405
2024-02-12Replace `processingEnv.requireTypeElement()` with ↵Brad Corso
`DaggerSuperficialValidation.requireTypeElement()`. I found a case when using `--dagger.pluginsVisitFullBindingGraphs` where `BindingGraphFactory` is triggered from the `ModuleProcessingStep`. In this case, we can't guarantee that the monitoring module has been generated yet so we need to wrap in `DaggerSuperficialValidation.requireTypeElement` to ensure that processing will get delayed if the modules doesn't exist yet. RELNOTES=N/A PiperOrigin-RevId: 606341195
2024-02-08Improve Dagger error messages to give more information and be more consistent.Brad Corso
RELNOTES=Improve Dagger error messages to give more information and be more consistent. PiperOrigin-RevId: 605450793
2024-02-08Internal changesBrad Corso
RELNOTES=N/A PiperOrigin-RevId: 605384714
2024-02-08Include proguard rules in dagger core artifact so that LazyClassKeyMap's ↵Wanying Ding
string keys can be obfuscated. RELNOTES=n/a PiperOrigin-RevId: 605381957
2024-02-07Rename proguard_specs attribute for gen_maven_artifact to reflect how it ↵Wanying Ding
will be used. RELNOTES=n/a PiperOrigin-RevId: 605055941
2024-02-06Migrate usages of `Truth8.assertThat` to equivalent usages of ↵cpovirk
`Truth.assertThat`. The `Truth8` methods will be deprecated (or hidden) in the future. Callers should move to `Truth`. PiperOrigin-RevId: 604763576
2024-02-06Migrate usages of `Truth8.assertThat` to equivalent usages of ↵cpovirk
`Truth.assertThat`. The `Truth8` methods will be deprecated (or hidden) in the future. Callers should move to `Truth`. Some (but not all) of the CLs in this batch require Truth [1.4.0](https://github.com/google/truth/releases/tag/v1.4.0). I submitted a CL earlier today to (I hope) perform that upgrade for your project. PiperOrigin-RevId: 604740587
2024-02-06Update to [Truth 1.4.0](https://github.com/google/truth/releases/tag/v1.4.0).cpovirk
This makes available the rest of the Truth APIs that were recently added in Google's monorepo. It may be worth also updating to the _following_ version of Truth after it's released, but the purpose of that release will mostly be to deprecate `Truth8`. So, if you just avoid using `Truth8` now (starting by approving any migration CLs that I send your way), then there will be little need for that upgrade. Or, more to the point: I don't expect to keep sending you weekly upgrade CLs after this one :) PiperOrigin-RevId: 604717194
2024-01-31Automated Code Changecpovirk
PiperOrigin-RevId: 603130434
2024-01-31Update bazel-common to pick up Guava 33.0.0 and Truth to 1.3.0.cpovirk
New commit: https://github.com/google/bazel-common/commit/2a6b6406e12208e02b2060df0631fb30919080f3 This helps with https://github.com/google/truth/issues/746. PiperOrigin-RevId: 603081634
2024-01-30Automated Code Changecpovirk
PiperOrigin-RevId: 602843262
2024-01-30Automated Code Changecpovirk
PiperOrigin-RevId: 602836841
2024-01-29Use gen_maven_artifact for dagger core libraryWanying Ding
RELNOTES=n/a PiperOrigin-RevId: 602450093
2024-01-22Add Ksp Processor for Dagger Android ProguardProcessor.Wanying Ding
RELNOTES=Add Ksp Processor for Dagger Android ProguardProcessor. PiperOrigin-RevId: 600594616
2024-01-22reorganize Dagger Android jars with gen_maven_artifact rule.Wanying Ding
RELNOTES=n/a PiperOrigin-RevId: 600579650
2024-01-19Suppress unnecessary casts.Eric Chang
These were introduced in a previous change that introduced the `dagger.internal.Provider` type. They are difficult to avoid with Map Providers. Fixes #4201. RELNOTES=Fixes #4201. PiperOrigin-RevId: 599885719
2024-01-18Remove `@Deprecated` from javax version of DoubleCheck.lazy() as this can stillEric Chang
be used by the factory classes. A future change will re-add this `@Deprecated` once the factory classes have been switched to use `dagger.internal.Provider` Fixes #4203. RELNOTES=Fixes #4203. Removes `@Deprecated` annotation causing warnings PiperOrigin-RevId: 599667182
2024-01-18Update build tool version for examples/bazel.Wanying Ding
RELNOTES=n/a PiperOrigin-RevId: 599569187
2024-01-17Merge Android 24Q1 Release (ab/11220357)temp_319669529Xin Li
Bug: 319669529 Merged-In: I53121b8969480f0165d88ead52e207fcb714fcd5 Change-Id: Ia62f84416a138e3ff84a153e6aa8a7b753ecbb68
2024-01-16Update Dagger shade rules to match latests deploy-dagger.sh am: 31b7925193Daniel Santiago Rivera
Original change: https://android-review.googlesource.com/c/platform/external/dagger2/+/2899027 Change-Id: I27fbca1ccf1182b5fca9acdc93668edf80783bdc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-11Add error message if user make onCreate and onDestroy in base class final.Wanying Ding
RELNOTES=n/a PiperOrigin-RevId: 597600148
2024-01-10Fix github build failure caused by missing android.jarWanying Ding
RELNOTES=n/a PiperOrigin-RevId: 597429059
2024-01-09Update Dagger XProcessing jars.Brad Corso
The fix for https://github.com/google/dagger/issues/4199 is included in the new XProcessing jars (aosp/2891694), so this CL also adds a regression test for that issue. Fixes #4199 RELNOTES=Fixed #4199 PiperOrigin-RevId: 597054515
2024-01-08Add `@LazyClassKey` for injecting class keyed map and doesn't load class ↵Wanying Ding
when unused. RELNOTES=n/a PiperOrigin-RevId: 596634724
2024-01-04Update Dagger shade rules to match latests deploy-dagger.shDaniel Santiago Rivera
Bug: 316004274 Change-Id: I335e8076c577d81dd879e2f298b03e3fdc392db6 Test: m checkbuild
2024-01-04Ban @Inject protected field.Wanying Ding
RELNOTES=Ban @Inject protected field. PiperOrigin-RevId: 595746282
2023-12-27Minor clean up in BindingGraphFactory.Brad Corso
* We no longer need to wrap the call to get the generated MonitoringModule in `DaggerSuperficialValidation#requireTypeElement()` after CL/591092232 since we now wait until the next round before running `ComponentProcessingStep`. * Inlined `descriptorForMonitoringModule` and `descriptorForProductionExecutorModule`. * Simplified the logic in `shouldIncludeImplicitProductionModules` to avoid multiple nested parenthesis. RELNOTES=N/A PiperOrigin-RevId: 594050374
2023-12-19Update Dagger yml and README with new latest version number.Eric Chang
RELNOTES=N/A PiperOrigin-RevId: 592408487
2023-12-19DisableCachingByDefault for CopyTransformNelson Osacky
The CopyTransform is simply copying files and does not benefit from caching. It is faster to re-execute the transform. Closes https://github.com/google/dagger/pull/4194 RELNOTES=N/A PiperOrigin-RevId: 592308544
2023-12-18Fix error message for an `@Binds @IntoSet` implementation with duplicate ↵Brad Corso
bindings. This CL fixes a case where an `@Binds @IntoSet` that delegates to an implementation with duplicate bindings was throwing an `IllegalArgumentException` rather than reporting an error properly. An example of the problematic code is shown below: ```java @Module interface FooModule { @Binds @IntoSet Foo bindFoo(FooImpl impl); @Provides static FooImpl provideFooImpl1() { ... } @Provides static FooImpl provideFooImpl2() { ... } } ``` The above code now reports the duplicate binding rather than throwing an `IllegalArgumentException`. RELNOTES=Fixed error message for an `@Binds @IntoSet` implementation with duplicate bindings. PiperOrigin-RevId: 591976664
2023-12-14Dagger build performance optimizations.Brad Corso
This CL: 1. Adds state to keep track of any generated monitoring modules that Dagger generates, and uses this state to eagerly defer processing of components to the next round. This is useful to avoid doing work in the current round which will likely end up getting deferred anyway due to referencing the monitoring module. 2. Adds a cache for ComponentDescriptors similar to our caches for other descriptors to avoid recomputing these descriptors. RELNOTES=N/A PiperOrigin-RevId: 591092232
2023-12-14Flip the default for explicitBindingConflictsWithInject to enabled.Eric Chang
RELNOTES=Flip the default for explicitBindingConflictsWithInject to enabled. PiperOrigin-RevId: 591064440
2023-12-14Internal changesEric Chang
RELNOTES=n/a PiperOrigin-RevId: 591015561
2023-12-12Optimize `InjectionSiteFactory#getInjectionSites()`.Brad Corso
RELNOTES=N/A PiperOrigin-RevId: 590323796
2023-12-07[automerger skipped] Bumped dagger2 version 14 to 19 am: 2ffe0be709 -s ours ↵Anvesh Renikindi
am: 86700d6756 -s ours am: c712ab0f7b -s ours am skip reason: Merged-In I53121b8969480f0165d88ead52e207fcb714fcd5 with SHA-1 6102e8c7d9 is already in history Original change: https://android-review.googlesource.com/c/platform/external/dagger2/+/2852566 Change-Id: Ifc1a87d73dcf438ccc748a1562736bba8bbedf88 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-07Increase timeout for emulator tests from 25min to 35min in CI.Brad Corso
RELNOTES=N/A PiperOrigin-RevId: 588931824
2023-12-07[automerger skipped] Bumped dagger2 version 14 to 19 am: 2ffe0be709 -s ours ↵Anvesh Renikindi
am: 86700d6756 -s ours am skip reason: Merged-In I53121b8969480f0165d88ead52e207fcb714fcd5 with SHA-1 6102e8c7d9 is already in history Original change: https://android-review.googlesource.com/c/platform/external/dagger2/+/2852566 Change-Id: I8517ae7cddec60f66d1caf0cae9159bd6b74d09a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-07[automerger skipped] Bumped dagger2 version 14 to 19 am: 2ffe0be709 -s oursAnvesh Renikindi
am skip reason: Merged-In I53121b8969480f0165d88ead52e207fcb714fcd5 with SHA-1 6102e8c7d9 is already in history Original change: https://android-review.googlesource.com/c/platform/external/dagger2/+/2852566 Change-Id: Ife9a96b9d29a6613ccf7c2d062bfa38840f42711 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-07Make `minSdk` and `targetSdk` versions consistent across Gradle tests.Brad Corso
The `minSdk` is set to `16` since we test some of our artifacts on API 16. RELNOTES=N/A PiperOrigin-RevId: 588910365
2023-12-07Internal changesBrad Corso
RELNOTES=N/A PiperOrigin-RevId: 588861836
2023-12-06Configure Bazel and Gradle to avoid spurious flakes.Brad Corso
This CL updates the global `bazelrc` file to enable `--incompatible_sandbox_hermetic_tmp` to avoid tmp file collision issues between actions. This CL also updates the `gradle.properties` to give more memory to avoid Java Heap OOM issues. RELNOTES=N/A PiperOrigin-RevId: 588547788
2023-12-06[automerger skipped] Bumped version 14 to 19 am: 6102e8c7d9 -s ours am: ↵Anvesh Renikindi
0ca7ec5d69 -s ours am skip reason: Merged-In I53121b8969480f0165d88ead52e207fcb714fcd5 with SHA-1 5579a645c8 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/external/dagger2/+/25563409 Change-Id: I334e1a8781196a7bd1b760f8bc88d27f4b50d711 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06[automerger skipped] Bumped version 14 to 19 am: 6102e8c7d9 -s oursAnvesh Renikindi
am skip reason: Merged-In I53121b8969480f0165d88ead52e207fcb714fcd5 with SHA-1 5579a645c8 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/external/dagger2/+/25563409 Change-Id: I08092a5ffc945dd3e354ceb5681721eb1425becd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06Add a dagger.internal.Provider in order to in the future help with adding ↵Eric Chang
support for jakarta.inject.Provider. RELNOTES=Unavoidable breaking change for AssistedInject factories built at a previous version PiperOrigin-RevId: 588500546
2023-12-06Update hjar generators to output valid method bodies for methods and ↵Brad Corso
constructors. This CL updates Dagger's hjar generators to have valid return statements for methods with non-`void` return types and valid super calls for constructors. For example: ``` // Example of hjar generated class with valid constructor and method bodies. class Foo extends FooSuper { Foo() { super(null, 0, null); } String stringMethod() { return null; } int intMethod() { return 0; } } ``` Note that this isn't required when compiling with Turbine, but is necessary when compiling the Hjar stubs in Javac. RELNOTES=N/A PiperOrigin-RevId: 588456719