Commit Graph

74 Commits

Author SHA1 Message Date
Yanming Zhou
ac18e3015c Use .isEmpty() where feasible
See gh-38739
2023-12-19 22:38:05 -08:00
Andy Wilkinson
931584f8af Merge branch '2.7.x' into 3.0.x
Closes gh-37659
2023-10-03 10:28:51 +01:00
Phillip Webb
c4de86c244 Merge branch '2.7.x' into 3.0.x 2023-02-21 23:17:57 -08:00
Phillip Webb
df5898a146 Reformat code following spring-javaformat upgrade 2023-02-21 22:53:27 -08:00
Andy Wilkinson
99edda735e Polish 2022-10-25 12:57:58 +01:00
Scott Frederick
d25a99692f Replace Spring Boot TestCompiler with Spring Framework's version
See gh-31266
2022-09-30 15:58:11 -05:00
Scott Frederick
f9c341c75a Revert "Generate the AutoConfiguration.imports file from annotations"
This reverts commit da4de7d67d.
2022-09-21 14:50:15 -05:00
Scott Frederick
d62d7ca75d Revert "Generate ManagementContextConfiguration.imports file from annotations"
This reverts commit 6b3b0dd3a6.
2022-09-21 14:50:15 -05:00
Scott Frederick
1f53eb7df9 Revert "Sort the contents of generated imports files"
This reverts commit 95e62b7ff8.
2022-09-21 14:50:15 -05:00
Scott Frederick
910e9c9fcc Revert "Fix windows build"
This reverts commit 9fe24fe692.
2022-09-21 14:50:15 -05:00
Stephane Nicoll
9fe24fe692 Fix windows build
This commit makes sure that files that are generated in a temporary
directory are closed once the related test completes.
2022-09-10 16:24:29 +02:00
Scott Frederick
95e62b7ff8 Sort the contents of generated imports files
The list of class names generated by annotation processors should be
sorted before being written to `AutoConfiguration.imports` and
`ManagementContextConfiguration.imports` files to make the build more
deterministic.

See gh-31228
2022-09-02 17:26:15 -05:00
Scott Frederick
6b3b0dd3a6 Generate ManagementContextConfiguration.imports file from annotations
This commit adds the
`ManagementContextConfigurationImportsAnnotationProcessor` to
the `spring-boot-autoconfigure-processor` annotation processor
module.

Closes gh-32222
2022-09-02 16:27:59 -05:00
Scott Frederick
da4de7d67d Generate the AutoConfiguration.imports file from annotations
This commit adds the `AutoConfigurationImportsAnnotationProcessor` to
the `spring-boot-autoconfigure-processor` annotation processor
module. When added to a project build, the annotation processor will
generate the
`org.springframework.boot.autoconfigure.AutoConfiguration.imports`
file automatically from `@AutoConfiguration`-annotated classes. It
also applies the annotation processor to the Spring Boot build.

Closes gh-31228
2022-09-02 15:10:22 -05:00
dreis2211
5db04da275 Use pattern matching for instanceof where appropriate
See gh-31475
2022-06-20 17:55:36 +01:00
Phillip Webb
9f00c3acf5 Polish 2022-02-23 21:44:43 -08:00
Moritz Halbritter
fd36215d72 Omit empty values for AutoConfigureAfter and AutoConfigureBefore
As @AutoConfiguration is now meta-annotated with @AutoConfigureAfter
and @AutoConfigureBefore, the generated property files have a lot of
superfluous lines in the format <class>.AutoConfigureAfter= and
<class>.AutoConfigureBefore=.

One can now configure in the annotation processor for each property key
if empty values should be omitted. This is currently only activated for
AutoConfigureAfter and AutoConfigureBefore

See gh-29907
2022-02-23 15:39:46 +01:00
Moritz Halbritter
7872f61bfc Add @AutoConfiguration annotation support to the autoconfigure-processor
See gh-29907
2022-02-23 15:39:46 +01:00
Andy Wilkinson
788a42d694 Merge branch '2.3.x' into 2.4.x
See gh-25076
2021-02-02 15:12:27 +00:00
Andy Wilkinson
67479b6380 Add junit-platform-launcher dependency by convention
Closes gh-25074
2021-02-02 13:03:21 +00:00
Phillip Webb
257608a3a3 Merge branch '2.3.x' into 2.4.x
Closes gh-25076
2021-02-01 16:03:43 -08:00
Phillip Webb
939b5dfc26 Add junit-platform-launcher dependency
Update `build.gradle` files to ensure that `junit-platform-launcher` is
a `testRuntimeOnly` dependency. This ensures that tests can be run from
Eclipse.

Closes gh-25074
2021-02-01 15:31:28 -08:00
dreis2211
be56cac2bb Note starters' and annotation processors' jar type in their manifest
See gh-22203
2020-09-10 14:37:06 +01:00
Andy Wilkinson
62aa8ce107 Support incremental annotation processing with Gradle
Closes gh-22150
2020-06-30 11:27:32 +01:00
Phillip Webb
038ae93406 Update copyright year of changed files 2020-05-13 16:48:51 -07:00
Stephane Nicoll
6921fdacac Expand configuration class eager filtering to imports
Previously, only root auto-configuration classes could be excluded
eagerly via an AutoConfigurationImportFilter. Any configuration class
loaded as a result of processing a particular auto-configuration were
parsed and checked as usual.

This commit makes use of the `getExclusionFilter` callback to expand
this filter to all candidates that are considered. The annotation
processor has also be expanded to generate metadata for non-root
configuration classes.

Closes gh-12157
2020-04-29 10:45:28 +02:00
Phillip Webb
e0013454b5 Use parentheses when declaring dependencies
Update all dependencies declarations to use the form `scope(reference)`
rather than `scope reference`.

Prior to this commit we declared dependencies without parentheses unless
we were forced to add them due to an `exclude`.
2020-01-22 16:02:38 -08:00
Phillip Webb
0209cd3e4c Polish quote form used in Gradle scripts
Replace Gradle single quote strings with the double quote form
whenever possible. The change helps to being consistency to the
dependencies section where mostly single quotes were used, but
occasionally double quotes were required due to `${}` references.
2020-01-22 15:49:52 -08:00
Andy Wilkinson
ce99db1902 Port the build to Gradle
Closes gh-19609
Closes gh-19608
2020-01-10 14:15:35 +00:00
Phillip Webb
1b1c61a2ed Make processor output fully reproducible
Update `AutoConfigureAnnotationProcessor` to ensure that the generated
properties file is fully repeatable. Properties are now sorted and
written out directly to ensure that the timestamp comment is not
present.

Closes gh-19370
2019-12-13 13:04:49 -08:00
Phillip Webb
61873fbf42 Don't generate @Configuration metadata
Update `AutoConfigureAnnotationProcessor` to no longer store
`@Configuration.value` in the meta-data JSON since we never actually
read it.

Closes gh-16608
2019-10-02 21:41:31 -07:00
Andy Wilkinson
46c30d6bb0 Merge branch '2.1.x'
Closes gh-18476
2019-10-02 10:48:57 +01:00
Andy Wilkinson
3d4157ad6d Correct SCM URLs in published poms
Previously, Maven's default behaviour was relied up which resulted
in the artifact ID being appended to each URL as it was inherited.
This behaviour can only be disabled in Maven 3.6 and later, a version
that we cannot use due to an incompatibility with the Flatten Plugin.

This commit works around Maven's default behaviour by defining
properties for the SCM URL, connection, and developer connection and
then explicitly defining the settings in each pom using these
properties. The explicit definition of the properties in each pom
prevents them being inherited from the parent, thereby disabling the
unwanted appending of the artifact ID to the URL.

Fixes gh-18328
2019-10-02 10:48:30 +01:00
thelproad
9c1f503e46 Simplify if statements
See gh-17884
2019-08-17 06:50:32 +02:00
Phillip Webb
8bc780762a Merge branch '2.1.x' 2019-07-24 11:42:48 +01:00
Phillip Webb
fb1dd8fe93 Merge branch '2.0.x' into 2.1.x 2019-07-24 11:41:32 +01:00
Phillip Webb
913e831f4e Merge '1.5.x' into 2.0.x 2019-07-24 11:39:58 +01:00
Phillip Webb
01933f9b06 Merge previously split strings
Merge some string lines that were previously split because of the
90 chars wide formatting.
2019-07-15 00:24:19 +01:00
Phillip Webb
a66c4d3096 Unify method visibility of private classes
Apply checkstyle rule to ensure that private and package private
classes do not have unnecessary public methods. Test classes have
also been unified as much as possible to use default scoped
inner-classes.

Closes gh-7316
2019-07-03 11:39:47 -07:00
Phillip Webb
605599138e Merge branch '2.1.x' 2019-06-28 23:56:02 -07:00
Phillip Webb
92bff3c328 Merge branch '2.0.x' into 2.1.x 2019-06-28 23:42:28 -07:00
Phillip Webb
cfeb0239b7 Merge branch '1.5.x' into 2.0.x 2019-06-28 23:28:34 -07:00
Stephane Nicoll
e560b7f6ba Remove public modifier on JUnit5 lifecycle methods
See gh-17292
2019-06-21 18:09:05 +02:00
Andy Wilkinson
b18fffaf14 Move tests to JUnit 5 wherever possible 2019-06-07 12:25:54 +01:00
Andy Wilkinson
aef92b9295 Merge branch '2.1.x'
Closes gh-17079
2019-06-07 11:00:44 +01:00
Andy Wilkinson
24925c3dae Merge branch '2.0.x' into 2.1.x
Closes gh-17078
2019-06-07 10:50:34 +01:00
Andy Wilkinson
c6c139d980 Merge branch '1.5.x' into 2.0.x 2019-06-07 10:46:31 +01:00
Phillip Webb
2376f973f4 Merge branch '2.1.x' 2019-04-02 13:46:36 -07:00
Phillip Webb
47c6bf741d Merge branch '2.0.x' into 2.1.x 2019-04-02 13:40:21 -07:00
Phillip Webb
07c000c5b7 Merge branch '1.5.x' into 2.0.x 2019-04-02 13:34:28 -07:00