aboutsummaryrefslogtreecommitdiff
path: root/test_defs.bzl
AgeCommit message (Collapse)Author
2021-05-12Revert "Merge commit 'upstream/dagger-2.35.1^'"Aurimas Liutikas
This reverts commit 399f4f61132f363e9479e59c550a7bcf005922d8. Reason for revert: b/187908823 Change-Id: I81f7cd3672e65ce1f7e1fa846b6c3e2f87147a26
2021-02-22Enable remaining dagger.android and dagger.hilt tests.Brad Corso
Note: previously, dagger.android tests have existed in GitHub, but they were run as a noop in our GitHub Actions because robolectric tests were not enabled. This CL enables them. RELNOTES=N/A PiperOrigin-RevId: 358903809
2020-09-03Fix redundant memoization for scoped bindings in fastInit.Brad Corso
This is done by splitting the SwitchingProviders into separate classes based on scoping: 1. Unscoped: SwitchingProvider<T> implements Provider<T> 2. SingleCheck: SingleCheckSwitchingProvider extends SingleCheck<T> 3. DoubleCheck: DoubleCheckSwitchingProvider extends DoubleCheck<T> This allows SingleCheck and DoubleCheck to properly bypass memoization when it's not needed. RELNOTES=Fix redundant DCL for scoped bindings requested as Lazy PiperOrigin-RevId: 330015462
2020-09-01Internal changeDagger Team
PiperOrigin-RevId: 329394738
2020-08-04Add bzl_library rules for .bzl files without one.bcorso
RELNOTES=N/A ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=324646786
2020-02-27Prepare for external Bazel change --incompatible_load_java_rules_from_bzl.cpovirk
...by load()-ing java_library and other rules wherever we use them. Compare to CL 297412705 for Flogger. This CL includes updating to a new version of bazel_common to avoid --incompatible_load_java_rules_from_bzl errors in bazel_common. See https://github.com/google/bazel-common/pull/104. Note that this CL also changes the way we get zlib() (a dependency of protobuf) from bind() to http_archive(). http_archive() seems to be the more recommended pattern: - https://docs.bazel.build/versions/master/external.html#repository-rules - https://github.com/bazelbuild/bazel/issues/1952 But my immediate motivation was that bind() wasn't working with the new version of protobuf. (The new version of protobuf is necessary to avoid --incompatible_load_java_rules_from_bzl errors inside protobuf. It comes with the new version of bazel_common.) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=297608393
2019-06-19Remove experimentalAheadOfTimeSubcomponentsronshapiro
We haven't found this to be effective on any of our larger projects, and we are going to focus our efforts on other build performance improvements. RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=253668388
2019-04-10Serialize metadata about the binding graph in abstract component implementationsronshapiro
This allows us to reconstruct ComponentImplementation instances from types that have already been compiled, saving time during component proccessing. RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=242753707
2019-01-08Remove experimentalAndroidMode2 since we don't have any plans to investigate ↵ronshapiro
this mode in near-midterm future. It's simple enough to revert if we ever want to bring it back. I haven't gone ahead with merging InnerSwitchingProviders -> SwitchingProviders because I still want to get to doing Producers for fastInit, and SwitchingProviders may be benefitial for that. This is a partial rollback of cc739fe17cb9bd666e14b7bce2bca78d1c497585 RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=227772927 Signed-off-by: Ron Shapiro <ronshapiro@google.com>
2018-12-18Run hjar testing for all functional test coderonshapiro
In doing so, fix a bug where we had missed adding onProducerFutureCancelled(boolean) to the Hjar processing step. RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=225548921
2018-11-20Automated rollback of 57dfca7aba13330dc6554a62bded55396d5e5373 and ↵ronshapiro
94c28e7ae1310964d4960fd9aa13392b3f9764ef *** Reason for rollback *** All functional tests now pass in ahead-of-time mode, so no more need for duplicated macros! RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=222078128
2018-10-18Make the suffixes for _with_aot tests less duplicativeronshapiro
RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=217333772
2018-10-18[Ahead-of-time Subcomponents] Add a flag to gate running the AOT build ↵dstrasburg
variants for GenJavaTests and GenRoboelectricTests. Duplicate each call to the above with the flag set. This will allow us to add exceptions (in the srcs exclude glob) as we work through bugs exposed by functional tests. RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=215751328
2018-09-12Migrate to android_local_testronshapiro
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=211814342
2018-07-13Migrate android_* rules to use Skylark implementations.timpeut
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=204152825
2018-06-28[Ahead-of-time Subcomponents] Rename dagger.experimentalAheadOfTimeComponentsdstrasburg
to dagger.experimentalAheadOfTimeSubcomponents as that more accurately reflects the change to generated code. RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=201516630
2018-06-12Begin using github.com/google/bazel-common in Daggerronshapiro
RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=199741327
2018-06-12Rename "dagger.experimentalAndroidMode" to "dagger.fastInit"bcorso
RELNOTES=Rename experimentalAndroidMode to fastInit. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=199535162
2018-04-20Add androidExperimentalAndroidMode2bcorso
androidExperimentalAndroidMode2 is much more similar to default mode than the original androidExperimentalAndroidMode. In this new mode, virtually everything is the same as default mode except that the initialization of providers is done with a inner static switching provider class instead of separate *_Factory classes. RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=193520283
2018-04-19Pass variant javacopts to Dagger's functional tests.bcorso
We were only passing the variant javacopts to the libraries of those functional tests. However, that silently fails to apply the javacopts when the @Component is defined in the test class itself, since the javacopts were not applied to the test classes. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=193042437
2018-03-22Replace PACKAGE_NAME with package_name() in bzl files.laurentlb
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=189926134
2018-03-22Add a compiler options flag for "ahead-of-time components".dstrasburg
RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=189676820
2017-10-27Fix the way a few flags were passed to test targets to eliminate some stray ↵ronshapiro
javac warnings ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=173539568
2017-10-09Enable non-Instance DependencyRequests in PrivateMethodBindingExpression.bcorso
This adds private methods for requests other than INSTANCE (e.g. PROVIDER, LAZY, PROVIDER_OF_LAZY, etc.). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=171197859
2017-09-29Add a tag to all ExperimentalAndroidMode tests so they can be built/tested ↵ronshapiro
together (or ignored together) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=170376379
2017-09-18Add a compiler option for experimental inlining efforts designed for Android.bcorso
(If you're reading this CL description, please do not use this feature unless you've discussed with the Dagger team directly. It is very much experimental and not guaranteed yet.) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=168758665
2017-04-24Let users specify javacopts separately for the support library and the tests.dpb
For the functional tests, apply Java7 source, target, and type inference for the code under test. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=153867150
2017-04-19Move prod compiler code and guava/jdk Optional tests from their previous ↵ronshapiro
maven structure (src/{main,test}/) to the {java,javatest}/ model typical to bazel ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=153174049
2017-02-13Move Android code into java/ and javatests/ronshapiro
As we transition from Maven to Bazel, this moves our code into a more traditional Bazel structure and removes the need for duplicative src/{main,test,it}/java/ trees for each artifact that we have. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=146020680
2017-01-13Build Dagger with Bazelronshapiro
The Maven infrastructure is not being removed in this CL. We will build and test with both Maven and Bazel until we have a successful release to Maven Central using bazel-built artifacts and automated tools to generate poms/ship to Central. This CL does not address any of the scripts in util/ like publishing snapshots or generating javadoc. It also does not reorganize files into a more traditional bazel project structure. Open questions: - What should we do about shading? - Right now, only auto-common is shaded. If we shade it, should we remove it from the deps of the compiler POM, since other users don't need it to build? - How should we implement shading? One idea is to make a unified jar of the bazel-built compiler and auto-common, and then use jarjar to rename classes. - What should we do with dagger-gwt? I'm not a GWT expert but it seems that we could recreate that jar with a genrule + jarjar ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=144448160