100 Commits
Author SHA1 Message Date
Guice TeamandGuice Team 1561d4a52c Add load() statements for the Bazel builtin top-level java symbols
Loads are being added in preparation for moving the symbols out of Bazel and into `rules_java`.

PiperOrigin-RevId: 624858712
2024-04-15 00:38:24 -07:00
Guice TeamandGuice Team 631e8e015e Add load() statements for the builtin Bazel java rules
Loads are being added in preparation for moving the rules out of Bazel and into `rules_java`.

PiperOrigin-RevId: 621873514
2024-04-04 08:55:43 -07:00
Guice TeamandGuice Team 2d4a3952ee Automated Code Change
PiperOrigin-RevId: 619545649
2024-03-27 08:52:52 -07:00
Guice TeamandGuice Team 21d26cfc65 Change RealMultibinder#doProvision to use ImmutableSet#buildWithExpectedSize, and avoid an extra T[] array allocation when permitDuplicates==true.
Since the normal usage should be that the items in the values array are all unique, and ImmutableSet#copyOf will create an initial list of max(4, sqrt(length)) if length>4, but then grows that list to length (or larger) if the array was all unique (and then resize is back down during build()).

While here, the T[] values array is also only needed to be filled in when permitDuplicates==false (for the error message if duplicates were detected).

PiperOrigin-RevId: 597244931
2024-01-10 07:34:13 -08:00
Guice TeamandGuice Team e23d3b4369 Internal change.
PiperOrigin-RevId: 581989087
2023-11-13 09:27:34 -08:00
Guice TeamandGuice Team 87d262c4d7 Remove stale comment
PiperOrigin-RevId: 578574921
2023-11-01 11:06:46 -07:00
Guice TeamandGuice Team cf435821de Move exports to public target
PiperOrigin-RevId: 578306054
2023-10-31 14:38:10 -07:00
Guice TeamandGuice Team cd19219013 Internal change
PiperOrigin-RevId: 577308018
2023-10-30 13:27:06 -07:00
Guice TeamandGuice Team 1ab911ad26 Internal change
PiperOrigin-RevId: 576885259
2023-10-30 13:05:04 -07:00
Guice TeamandGuice Team 73dc9f3b8a Add a workaround to unbreak the gen_maven_artifact invocation.
PiperOrigin-RevId: 573252178
2023-10-13 10:13:19 -07:00
Guice TeamandGuice Team 6e9176dce0 Fix some typos in Guice comments.
PiperOrigin-RevId: 571969961
2023-10-09 10:08:32 -07:00
Guice TeamandGuice Team db5bcc20f9 Make AbstractModule.binder private, for a hair more encapsulation.
PiperOrigin-RevId: 555492476
2023-08-10 08:01:45 -07:00
Guice TeamandGuice Team ddb6315362 Fixup for a common typo.
PiperOrigin-RevId: 547836342
2023-07-13 10:10:21 -07:00
Guice TeamandGuice Team 6412858fca Internal change.
PiperOrigin-RevId: 538300298
2023-06-06 15:00:05 -07:00
Guice TeamandGuice Team 06e8bb1ea1 Clarify that Multibinder elements need not be distinct if permitDuplicates() is specified.
PiperOrigin-RevId: 517978849
2023-03-20 08:43:58 -07:00
Guice TeamandGuice Team f26a731e3d Fix typo in jdoc.
PiperOrigin-RevId: 516590803
2023-03-14 11:54:26 -07:00
Guice TeamandGuice Team 4a8965a899 Automated visibility attribute cleanup.
PiperOrigin-RevId: 505840946
2023-01-30 17:17:48 -08:00
Guice TeamandGuice Team 9ed45ab2c6 Open-source @Keep on Guice annotations.
PiperOrigin-RevId: 503916049
2023-01-23 01:19:00 -08:00
Guice TeamandGuice Team 294065ccc1 All testing uses Mockito instead of EasyMock.
PiperOrigin-RevId: 498600399
2022-12-30 09:45:27 -08:00
Guice TeamandAndrew Han 7014486812 Internal change
PiperOrigin-RevId: 457864874
2022-06-29 11:16:41 -07:00
Guice TeamandGuice Team c7a74a108b Create a separate target for ProvidedBy.
PiperOrigin-RevId: 448523332
2022-05-13 10:18:34 -07:00
Guice TeamandGuice Team 2098d6ad4e no visible change.
PiperOrigin-RevId: 436491064
2022-05-02 18:55:18 -07:00
Guice TeamandGuice Team 8405f90aa9 no visible change.
PiperOrigin-RevId: 435724165
2022-03-18 13:41:21 -07:00
Guice TeamandGuice Team b32439cc99 no visible change
PiperOrigin-RevId: 435193059
2022-03-16 16:38:54 -07:00
Guice TeamandGuice Team 7eddc637b6 no visible change.
PiperOrigin-RevId: 433299107
2022-03-08 13:41:20 -08:00
Guice TeamandGuice Team d65df48ba5 Exclude Kotlin extensions for now since the build setup does not support it yet.
PiperOrigin-RevId: 432524021
2022-03-04 13:50:22 -08:00
Guice TeamandGuice Team bb59fbfe99 no visible change.
PiperOrigin-RevId: 432517529
2022-03-04 13:19:12 -08:00
Guice TeamandGuice Team 86e7ab75b3 Add osgi_jar bazel rule to generate OSGi bundle.
PiperOrigin-RevId: 432496763
2022-03-04 11:42:28 -08:00
Guice TeamandGuice Team b2554223cc LSC: Fix or suppress ignored return values from instance methods on an Object.
PiperOrigin-RevId: 429675699
2022-02-18 16:54:46 -08:00
Guice TeamandGuice Team a565b63eae Validate that the transitively exported targets matches what is set in gen_maven_artifact.
PiperOrigin-RevId: 428634587
2022-02-14 16:20:43 -08:00
Guice TeamandGuice Team e44c218056 Remove reference to deleted service extension target.
PiperOrigin-RevId: 427067619
2022-02-07 18:00:18 -08:00
Guice TeamandGuice Team 37635c29f3 link to latest javadoc on README page.
PiperOrigin-RevId: 427057238
2022-02-07 17:04:41 -08:00
Guice TeamandGuice Team 08b7893356 Fix publish-latest-docs script.
Need to check if the latest api directory exists before deleting it, otherwise git complains about non-existing path: fatal: pathspec 'api-docs/latest' did not match any files.

PiperOrigin-RevId: 427042438
2022-02-07 16:04:18 -08:00
Guice TeamandGuice Team ad77056d77 Fix Javadoc that fails when running with Java 9+.
Also:

- configure bazel and maven to use the same -Xdoclint option
- skip maven tests when generating javadoc and API diffs
- fix shell script to fail when any command returned non-zero exit code
- fix issue with the script that errors when trying to generate API diffs for module that does not contain Java doc (e.g extensions-parent)

PiperOrigin-RevId: 427018267
2022-02-07 14:31:32 -08:00
Guice TeamandGuice Team c118f26385 Add steps in the ci workflow to build and test local artifacts.
Also:

- cache more bazel files to speed up executation
- use java version as part of the cache key since it is part of the input bazel uses
- fix maven_gen_artfiacts for libries that export other libries

PiperOrigin-RevId: 426955192
2022-02-07 10:35:41 -08:00
Guice TeamandGuice Team d83603377b Fix publish-snapshot action by passing secrets as env variables.
PiperOrigin-RevId: 426488409
2022-02-04 14:10:10 -08:00
Guice TeamandGuice Team ab0ae07c58 Fix publish-snapshot action.
PiperOrigin-RevId: 426443027
2022-02-04 10:57:16 -08:00
Guice TeamandGuice Team d291cdd942 generate artifact for guice-bom.
PiperOrigin-RevId: 426426988
2022-02-04 09:55:01 -08:00
Guice TeamandGuice Team 0b0d6975c7 Fix publish-snapshot action path.
PiperOrigin-RevId: 426424508
2022-02-04 09:44:01 -08:00
Guice TeamandGuice Team 65b2fdff04 Split workflow into composite actions so that they can be reused for the new release workflow.
PiperOrigin-RevId: 426195026
2022-02-03 11:23:32 -08:00
Guice TeamandGuice Team 3cd3868b65 Add a simple example maven project that uses Guice.
A follow up change will add a test that uses the local published artifact to verify that a project can use the built artifacts.

PiperOrigin-RevId: 426172762
2022-02-03 10:01:24 -08:00
Guice TeamandGuice Team 909558ec1a Remove outdated example.
PiperOrigin-RevId: 425983060
2022-02-02 14:47:50 -08:00
Guice TeamandXiaoming Jia 757d472e6c Add support to build maven artifacts using bazel.
The setup is mostly based on Dagger's setup and simplified. Further changes might be required to ensure that we are actually deploying the same artifacts as existing maven setup.

PiperOrigin-RevId: 425912979
2022-02-02 10:22:39 -08:00
Guice TeamandGuice Team 155bc42345 Remove service and mini extensions.
PiperOrigin-RevId: 424972746
2022-01-28 15:37:29 -08:00
Guice TeamandGuice Team a7822f7237 Update how javadoc is built.
- enable groups to follow current maven setup
- exclude internal packages and service package since the code isn't actually published
- update external doc links

PiperOrigin-RevId: 424912814
2022-01-28 11:12:48 -08:00
Guice TeamandGuice Team 2a4df0a72e Bump Spring dependency version to 5.3.14.
PiperOrigin-RevId: 424761764
2022-01-27 19:10:21 -08:00
Guice TeamandGuice Team 3761753f4f specific the source and target level in javac options to target Java 8.
PiperOrigin-RevId: 424661645
2022-01-27 11:19:31 -08:00
Guice TeamandGuice Team 6ff6e6d88c update readme to link to latest release.
PiperOrigin-RevId: 423950848
2022-01-24 17:27:08 -08:00
Guice TeamandGuice Team 6925c5c253 bump snapshot version, update README & prior API xml after 5.1.0 release.
closes #1536

PiperOrigin-RevId: 423946861
2022-01-24 17:05:16 -08:00
Guice TeamandGuice Team 6d503098ff upgrade easy mock versions and enable tests against Java 17.
PiperOrigin-RevId: 423400922
2022-01-21 14:01:55 -08:00
Guice TeamandGuice Team c4854d5cf5 Fix tests that break with Java 17 base on suggestions from @mcculls https://github.com/google/guice/issues/1536#issuecomment-1017894441
- skip reflection fallback test that only works for java version < 17
- add required jvm flags to mirror maven setup
- upgrade mockito version

PiperOrigin-RevId: 423389524
2022-01-21 13:07:56 -08:00
Guice TeamandGuice Team bc960c5c05 Generate test suite to run tests under a package.
This reduces the test time from ~9 minutes to ~3 minutes.

PiperOrigin-RevId: 423146320
2022-01-20 13:34:54 -08:00
Guice TeamandGuice Team 1acb91cfff Run bazel test in ci workflow.
Also update gitignore file to ingore bazel generated output and skip the deploy doc/snapshot job if not the main repo.

PiperOrigin-RevId: 422908745
2022-01-19 14:45:44 -08:00
Guice TeamandGuice Team 1c57d16158 Add javadoc targets for Guice libraries.
PiperOrigin-RevId: 422867497
2022-01-19 11:48:30 -08:00
Guice TeamandGuice Team f7abab4bb3 fix java-version property for publish workflow.
PiperOrigin-RevId: 422652617
2022-01-18 14:47:38 -08:00
Guice TeamandXiaoming Jia dea06c1087 Make Guice builds with bazel.
This change only makes it possible to build with bazel and no changes to existing maven setup yet.

PiperOrigin-RevId: 422630465
2022-01-18 13:31:43 -08:00
Guice TeamandGuice Team bbd2f0d384 Remove jdk8-tests module since Guice now targets Java 8 and above by default.
PiperOrigin-RevId: 421354790
2022-01-12 11:40:38 -08:00
Guice TeamandGuice Team b7e5e331d2 Internal change.
PiperOrigin-RevId: 421158735
2022-01-12 11:40:14 -08:00
Guice TeamandGuice Team d88175a45b Delete a few classes that are not actually tests.
PiperOrigin-RevId: 420898057
2022-01-10 17:37:17 -08:00
Guice TeamandGuice Team 240406ceaf Internal change.
PiperOrigin-RevId: 420766497
2022-01-10 08:21:35 -08:00
Guice TeamandGuice Team 60fddb2c28 Provide a non-empty name for the test cookie.
PiperOrigin-RevId: 410290707
2021-11-16 10:32:16 -08:00
Guice TeamandGuice Team 0ce94279a1 Upgrade struct2 dependency version to 2.3.37.
PiperOrigin-RevId: 409001068
2021-11-10 16:07:13 -08:00
Guice TeamandGuice Team 34eca95f9e Make ServletScopes final.
PiperOrigin-RevId: 408431479
2021-11-08 13:46:29 -08:00
Guice TeamandGuice Team 2aefd54946 Remove COMPLETE option for flag guice_include_stack_traces.
This option does not provide much benefits and doesn't even work correctly in some cases.

PiperOrigin-RevId: 407408634
2021-11-03 13:12:03 -07:00
Guice TeamandGuice Team 0477f05101 Disable support for injection into local Kotlin classes.
PiperOrigin-RevId: 395992007
2021-09-10 13:10:33 -07:00
Guice TeamandGuice Team 7d7e3da20c No visible change.
PiperOrigin-RevId: 382141204
2021-06-29 12:31:41 -07:00
Guice TeamandGuice Team c1c1a763d0 Remove unneeded Thread.yield() statement from test.
PiperOrigin-RevId: 373631407
2021-05-13 12:23:10 -07:00
Guice TeamandGuice Team 738d317387 Fix bug in UriEncoder that interpreted and stripped numeric prefixes.
RELNOTES=Fix bug in UriEncoder that interpreted and stripped numeric prefixes.
PiperOrigin-RevId: 373550033
2021-05-13 03:53:56 -07:00
Guice TeamandGuice Team 1dbfbce488 Explain why ErrorsException is ignored in createJustInTimeBindingRecursive internal method.
PiperOrigin-RevId: 373157192
2021-05-11 08:33:09 -07:00
Guice TeamandGuice Team e960b66d3d Handle kotlin object declaration with permit annotations.
If the permit annotation is placed before the object keyword then the annotation will be present on the anonymous class. So this change update BoundFieldModule.WithPermits to also check annotations on the anonymous class itself.

PiperOrigin-RevId: 367707010
2021-04-09 14:42:59 -07:00
Guice TeamandGuice Team 053d0a5f29 Update workflow to cancel previous runs and upgrade to setup-java@v2.
PiperOrigin-RevId: 367692521
2021-04-09 13:23:53 -07:00
Guice TeamandGuice Team 6fc8ad454a no visible change.
PiperOrigin-RevId: 367246328
2021-04-07 10:25:08 -07:00
Guice TeamandGuice Team dc7f4858f9 Support TYPE_USE type Nullable annotations.
This change only add support for top level annotation like `@Nullable List<String>` and not `List<@Nullable String>`.

PiperOrigin-RevId: 361592529
2021-03-08 10:00:47 -08:00
Guice TeamandGuice Team 27ae45775c Add a script to diff release jars with new release to do a quick check before approving the new release in maven central.
PiperOrigin-RevId: 360546122
2021-03-02 16:54:50 -08:00
Guice TeamandGuice Team 54cccd3406 bump snapshot version, update README & prior API xml
PiperOrigin-RevId: 360302867
2021-03-01 16:23:20 -08:00
Guice TeamandGuice Team e09d1eebd0 Add back build.properties files that were still used.
PiperOrigin-RevId: 359826559
2021-02-26 13:28:21 -08:00
Guice TeamandGuice Team 2872237b01 Throw an error if there is no MapKey annotation on @IntoMap dagger provider methods.
PiperOrigin-RevId: 359792774
2021-02-26 10:53:57 -08:00
Guice TeamandGuice Team 9dc98cb7c7 Add a test to verify that failure in scanning one key doesn't effect other bindings that depends on the key.
PiperOrigin-RevId: 359786415
2021-02-26 10:25:14 -08:00
Guice TeamandGuice Team 6fa83e476a Add missing @since methods
PiperOrigin-RevId: 359326331
2021-02-24 11:11:23 -08:00
Guice TeamandGuice Team 96e835f098 Update @since tags
PiperOrigin-RevId: 359195197
2021-02-23 20:12:19 -08:00
Guice TeamandGuice Team df622abf7c Fixing javadoc, map bindings were actually implemented some time ago
PiperOrigin-RevId: 356987382
2021-02-11 09:08:19 -08:00
Guice TeamandGuice Team 826a97fced Update the description for Key class.
PiperOrigin-RevId: 356859347
2021-02-10 16:51:38 -08:00
Guice TeamandGuice Team 015ed75b5c Restore the default method log message to WARNING level.
The test failures due to unexpected log messages are now resolved.

PiperOrigin-RevId: 355880552
2021-02-05 10:39:38 -08:00
Guice TeamandGuice Team f78f7cfb3b Temporarily down grade the warning to INFO level.
The warning is causing some test failures due to unexpected log messages.

PiperOrigin-RevId: 355507369
2021-02-03 16:25:41 -08:00
Guice TeamandGuice Team e292838c89 Add a CI status badge.
PiperOrigin-RevId: 354580188
2021-01-29 11:57:18 -08:00
Guice TeamandGuice Team a26bb0100b Update workflow to cache maven packages.
PiperOrigin-RevId: 354555203
2021-01-29 10:06:13 -08:00
Guice TeamandGuice Team 62276f87be Configure github actions to publish latest javadoc and snapshot after a success test run.
PiperOrigin-RevId: 354360420
2021-01-28 11:51:21 -08:00
Guice TeamandXiaoming Jia 345316ace8 Initial setup for migrating from Travis to Github Actions.
Closes #1456

ORIGINAL_AUTHOR=Carl Dea <carl.dea@gmail.com>
PiperOrigin-RevId: 353906843
2021-01-26 15:02:06 -08:00
Guice TeamandGuice Team 2157fa9f12 revert support for TYPE_USE Nullable annotation.
PiperOrigin-RevId: 353872238
2021-01-26 08:29:20 -08:00
Guice TeamandGuice Team 1a410a8bef Support TYPE_USE type Nullable annotations.
This change only add support for top level annotation like `@Nullable List<String>` and not `List<@Nullable String>`.

PiperOrigin-RevId: 353053953
2021-01-21 10:52:18 -08:00
Guice TeamandGuice Team a81072df06 Add an error when an injected constructor parameter's binding annotation's @Target does not include AnnotationTarget.PARAMETER.
PiperOrigin-RevId: 351170781
2021-01-11 09:33:42 -08:00
Guice TeamandGuice Team 5ea05c3ede Handle binding and injecting nullable kotlin properties.
PiperOrigin-RevId: 350666094
2021-01-07 17:02:53 -08:00
Guice TeamandGuice Team fdfc81cde4 Refactor conditional support for Kotlin features.
PiperOrigin-RevId: 350358874
2021-01-06 08:36:48 -08:00
Guice TeamandGuice Team dc5a782524 Add support for reading annotations on Kotlin properties.
PiperOrigin-RevId: 347864065
2020-12-16 11:40:52 -08:00
Guice TeamandGuice Team 15ce8eb669 Avoid defensive clone() in ParameterizedType.getActualTypeArguments() when possible.
PiperOrigin-RevId: 347701829
2020-12-15 15:12:54 -08:00
Guice TeamandGuice Team 363f568b6d Fix quadratic behavior of AbstractProcessor.process() observed in profiles.
The received lists are always ArrayList, for which removing items one-by-one
from the left is inefficient.

This changes the behavior on exception.  Unlike std::remove_if,
ArrayList.removeIf() buffers all filter results before shifting any elements.

PiperOrigin-RevId: 347469725
2020-12-14 14:27:57 -08:00
Guice TeamandGuice Team 2712230640 Fix formatting of source with module stack. Add NullInjectedIntoNonNullable tests.
PiperOrigin-RevId: 346890324
2020-12-10 16:30:51 -08:00
Guice TeamandGuice Team e399b21ab8 Split generate-latest-docs.sh script into two script: one generates the docs and one generates and publishes them.
This will allow us to generate the released version of the api docs as  part of release process.

PiperOrigin-RevId: 345773223
2020-12-04 15:50:59 -08:00
Guice TeamandGuice Team ed6993aa14 Delete ant related build files.
PiperOrigin-RevId: 345749534
2020-12-04 13:51:03 -08:00
Guice TeamandGuice Team 79660ea0f5 Update github access token used for publishing api docs.
PiperOrigin-RevId: 345726340
2020-12-04 11:57:27 -08:00