Commit Graph

419 Commits

Author SHA1 Message Date
Andy Wilkinson 70c4baeef6 Merge branch '2.2.x'
Closes gh-21341
2020-05-06 17:34:48 +01:00
Andy Wilkinson 386d678d99 Use Gradle's CreateStartScripts task with 6.4 and later
Fixes gh-20759
2020-05-06 17:02:34 +01:00
Andy Wilkinson 693fa918e2 Tolerate deprecation warnings generated by Gradle 6.4
The warnings will be addressed by gh-20759. CreateBootStartScripts
must be excluded from the classes that are validated by the
ValidatePlugins task. It is invalid, but only for Gradle 6.4. gh-20759
will cause it to only be used with Gradle 6.3 and earlier.

See gh-21329
2020-05-06 15:33:11 +01:00
Stephane Nicoll 02aacf4f04 Upgrade to Gradle 6.4
Closes gh-21329
2020-05-06 15:03:50 +02:00
Andy Wilkinson 1bc41ec336 Stop developmentOnly from removing too much from executable jars and wars
Fixes gh-21288
2020-05-06 09:45:35 +01:00
Scott Frederick f3d717e97a Use paketo-buildpacks/builder as default builder
This commit changes the default builder image from
`cloudfoundry/cnb:bionic-platform-api-0.2` to
`gcr.io/paketo-buildpacks/builder:base-platform-api-0.3`. It also
uses a `paketo-buildpacks/builder` image instead of a
`cloudfoundry/cnb` image to test compatibility with lifecycle v2
and uses paketo naming instead of cloudfoundry when mocking builder
interactions.

Some adjustments to lifecycle phases were also made to align more
closely with the pack CLI.

Fixes gh-21066
2020-04-29 14:28:25 -05:00
Andy Wilkinson 2d769e7679 Polish "Stop limiting layer customization to external modules"
See gh-21207
2020-04-29 14:22:43 +01:00
Paddy Drury 98644df64d Stop limiting layer customization to external modules
See gh-21207
2020-04-29 14:22:43 +01:00
Phillip Webb ad1248e4ec Replace "folder" with "directory"
Consistently use the term "directory" instead of "folder"

Closes gh-21218
2020-04-28 19:20:24 -07:00
Andy Wilkinson fb33610027 Automatically create developmentOnly configuration
Previously, the developmentOnly configuration, typically used for
Devtools, had to be declared manually. The BootJar and BootWar tasks
then had a property, excludeDevtools, that could be used to control
whether or not Devtools would be excluded from the executable archive.

This commit updates the reaction to the Java plugin being applied to
automatically create the developmentOnly configuration. The classpaths
of bootJar and bootWar are then configured not to include the contents
of the developmentOnly configuration. As a result of this, the
excludeDevtools property is no longer needed and has been deprecated.
Its default has also been changed from true to false to make it easy
to opt in to Devtools, when configured as a development-only
dependency, being included in executable jars and wars by adding
developmentOnly to the classpath of the archive task.

Closes gh-16599
2020-04-27 13:38:14 +01:00
Stephane Nicoll 961be0fea3 Merge branch '2.2.x'
Closes gh-21118
2020-04-25 09:15:49 +02:00
dreis2211 e3a9bacf3b Fix typo
See gh-21002
2020-04-25 09:14:01 +02:00
dreis2211 5eb5bf0a2d Polish
See gh-21009
2020-04-25 08:54:47 +02:00
Andy Wilkinson 076a384c9c Merge branch '2.2.x'
Closes gh-21112
2020-04-24 18:10:00 +01:00
Andy Wilkinson 29dc236bb2 Broaden deprecation warning check in Gradle Plugin's tests
Closes gh-21111
2020-04-24 17:45:42 +01:00
Scott Frederick 8f5ef951de Use current timestamp for index files with Gradle
This commit removes changes the timestamp used when writing the
classpath and layers index files in the Gradle plugin to be the
current timestamp unless `preserveFileTimestamps=true`. It also
polishes some duplication in the handling of entry attributes
when creating the fat archive and adds a test to verify that
the Gradle plugin uses the same fixed timestamp constant as
Gradle uses internally.

See gh-21005
2020-04-23 16:05:32 -05:00
Scott Frederick 555132e096 Fix archive attributes in Gradle plugin
This commit ensures that file permissions are set on entries that the
Gradle plugin adds to an archive. It also reverts the constant date
and time used for added entries to a previous value to ensure a time
zone offset is not applied.

See gh-20927
2020-04-17 17:33:28 -05:00
Johnny Lim 5fad43ec40 Polish
See gh-20973
2020-04-16 13:46:53 +02:00
Phillip Webb baa728c85e Cleanup paths to fix tests running on Windows 2020-04-06 20:17:16 -07:00
Phillip Webb df58b9baa2 Use YAML compatible classpath.idx format
Update the `classpath.idx` format to align with `layers.idx` and allow
third-parties can parse it as YAML

Closes gh-20861
2020-04-06 19:18:22 -07:00
Phillip Webb 65672a1150 Use a more compact layers.idx format
Update the `layers.idx` format so that it is more compact and can be
parsed by third-parties as YAML.

Closes gh-20860
2020-04-06 19:18:22 -07:00
Andy Wilkinson 34e602652c Polish new layered jar support 2020-04-03 10:47:57 +01:00
Andy Wilkinson bfa04e6574 Support flat jar layering with Gradle
Update the Gralde plugin so that layered jars now use the regular "flat"
format. The layers.idx file now describes which layer each file should
be placed.

See gh-20813

Co-authored-by: Phillip Webb <pwebb@pivotal.io>
2020-04-03 00:34:27 -07:00
Phillip Webb 3f806aa513 Create a new layer for loader classes
Create a dedicated layer that is used to hold the launcher support
classes. The layer sits between `dependencies` and
`snapshot-dependencies` so that the layer is sensible for both
SNAPSHOT and RELEASE versions of Spring Boot

Closes gh-20529
2020-04-03 00:09:30 -07:00
Phillip Webb 7bc7d86ad4 Refine layer customization for Maven and Gradle
Simplify layer customization logic for both Maven and Gradle and
refactor some internals of the Gradle plugin.

Both Maven and Gradle now use a simpler customization format that
consists of `application`, `dependencies` and `layer order` sections.
The `application`, `dependencies` configurations support one or more
`into` blocks that are used to select content for a specific layer.

Closes gh-20526
2020-04-03 00:03:21 -07:00
Scott Frederick a01c8452cb Support CNB builder platform API 0.3
This commit adds support for Cloud Native Buildpacks builder platform
API 0.3, which is the latest platform API available currently. Support
for platform API 0.1 has been removed, adopting the policy of the pack
CLI to support the current platform API version and one version prior.

Fixes gh-20757
2020-04-01 17:18:46 -05:00
Scott Frederick bb9e37e119 Use platform API builder image tags
CNB builder images are now being tagged in a manner that indicates
the version of the platform API implemented. This allows Spring Boot
to default to a builder tag that guarantees API compatibility while
allowing for updates to bundled buildpacks.

Fixes gh-20171
2020-04-01 16:18:05 -05:00
Andy Wilkinson 84e16d55ea Raise the minimum supported version of Gradle 6 to 6.3
Closes gh-20532
2020-03-31 19:48:17 +01:00
Madhura Bhave ad164269e9 Update classpath index to use jar name instead of full path
See gh-20564
2020-03-25 10:46:59 -07:00
Stephane Nicoll 089c0471fa Test the Gradle Plugin against Gradle 6.3
Closes gh-20669
2020-03-25 09:57:04 +01:00
Phillip Webb ce1ae11c26 Merge branch '2.2.x' 2020-03-23 14:14:47 -07:00
Phillip Webb 16b5ea3414 Update copyright year of changed files 2020-03-23 14:13:33 -07:00
Madhura Bhave a06f4f21e3 Combine application and resources layers into a single layer
Closes gh-20562
2020-03-23 12:59:42 -07:00
Madhura Bhave 952e529787 Rename "classes" to "application" in custom layer configuration
Closes gh-20539
2020-03-23 10:44:03 -07:00
Scott Frederick 3f378e1276 Add command-line options for Gradle bootBuildImage parameters
This commit adds support for setting the image name and builder
parameters of the Gradle bootBuildImage task using command-line
options as an alternative to DSL configuration.

See gh-20520
2020-03-19 17:21:07 -05:00
Scott Frederick e607c6842f Polish Gradle layer configuration DSL
This commit modifies the DSL for custom layer configuration in the
Gradle plugin to avoid duplication of terms that could be confusing.

Fixes gh-20563
2020-03-18 16:21:40 -05:00
Stephane Nicoll 0f5ca030db Polish "Add Java 14 CI"
See gh-20413
2020-03-18 15:09:14 +01:00
Stephane Nicoll 2e2f839bc8 Upgrade to Gradle 6.3 RC2
Closes gh-20558
2020-03-18 14:29:15 +01:00
Madhura Bhave 84b2e8c308 Rename classes package to application
Closes gh-20526
2020-03-16 16:03:29 -07:00
Scott Frederick f2dadf5a87 Add support for customizing layers in Gradle
This commit adds configuration to the Spring Boot Gradle plugin that
allows the names and contents of layers to be customized in the build
configuration.

Fixes gh-20296
2020-03-16 17:27:32 -05:00
dreis2211 daa3855fc8 Test the Gradle Plugin against Gradle 6.2.2
See gh-20385
2020-03-04 14:56:20 +01:00
Scott Frederick 509a1f1d41 Configure buildpack to use target Java version
With this commit, the Maven `spring-boot:build-image` goal and the
Gradle `bootBuildImage` task will configure the OpenJDK buildpack
to use the same JRE version as the project's target version,
provided the buildpack Java version is not explicitly set in the
build configuration.

Fixes gh-20172
2020-02-25 15:11:42 -06:00
dreis2211 442733600e Test the Gradle plugin against Gradle 6.2.1
See gh-20310
2020-02-25 05:52:00 -05:00
Madhura Bhave 15cd590f7f Allow users to opt out of including the layer tools in a layered jar
For Maven, the layer configuration is now an additional configuration
option instead of a layout type.

Closes gh-19866
2020-02-19 17:28:27 -08:00
dreis2211 d55bc5f850 Test the Gradle Plugin against Gradle 6.2
See gh-20222
2020-02-19 09:26:54 +01:00
dreis2211 866c441d70 Upgrade to Gradle 6.2
See gh-20213
2020-02-18 14:39:10 +00:00
Andy Wilkinson e065ee7be2 Merge branch '2.1.x' into 2.2.x
Closes gh-20183
2020-02-14 14:47:03 +00:00
Andy Wilkinson b9c2d775a9 Merge branch '2.2.x'
Closes gh-20185
2020-02-14 14:43:46 +00:00
Andy Wilkinson d61b035640 Merge branch '2.1.x' into 2.2.x
Closes gh-20183
2020-02-14 13:54:23 +00:00
Andy Wilkinson c8907d46b4 Fix up-to-date checking of build info properties
Closes gh-20135
2020-02-14 11:56:19 +00:00
Scott Frederick 191dce3f5e Set Spring Boot version in ephemeral builder
This commit adds a `createdBy` structure to the metadata of the ephemeral
builder container image that identifies Spring Boot as the creator of the
image, along with the Spring Boot version.

See gh-20126
2020-02-12 13:31:21 -06:00
Scott Frederick 12c640e133 Upgrade default image builder version
This commit upgrades the default CNB builder image from
cloudfoundry/cnb:0.0.43-bionic to cloudfoundry/cnb:0.0.53-bionic.
It also adds integration tests for the Maven and Gradle plugins
to verify both versions are supported.
2020-02-06 17:24:29 -06:00
Johnny Lim e6d5f5a271 Polish
See gh-19995
2020-02-01 09:24:20 +01:00
Andy Wilkinson 7b0d1eaffc Test the Gradle Plugin against Gradle 6.1.1
Closes gh-19912
2020-01-30 15:12:30 +00:00
Andy Wilkinson 54b3f480b4 Use posix long names when creating tar archive for image building
Fixes gh-19964
2020-01-30 13:31:27 +00:00
dreis2211 d75de39456 Upgrade to JUnit Jupiter 5.6.0
See gh-19907
2020-01-26 08:39:12 +01:00
dreis2211 d84ca1149c Test the Gradle Plugin against Gradle 6.1
See gh-19776
2020-01-24 13:46:00 +01:00
Andy Wilkinson 1d396abec5 Fix bootBuildImage integration tests on Java 13
We build with Java 8, 11, and 13 without specifying target
compatibility for the bytecode of the app that's placed in the image.
The built image uses Java 11 and when the app is built with Java 13
it fails to start as the Java 11 VM can't read that Java 13 bytecode.

This commit configures the app that's placed in the image to be built
with target compatibility of 1.8. This allows it to be compiled with
all version of Java with which we build and to also be compatible
with the JVM that's in the image.

See gh-19831
2020-01-23 13:50:22 +00:00
Andy Wilkinson 01a0a54f78 Include layertools in layered jars build with Gradle
Closes gh-19867
2020-01-23 11:43:19 +00:00
Andy Wilkinson 288f5ceaee Fix zip compression of libs in layered jars
Closes gh-19792
2020-01-23 11:40:13 +00:00
Andy Wilkinson 0bd0b2a6c0 Add support for building OCI images using the Gradle plugin
Closes gh-19831
2020-01-23 10:52:57 +00:00
Andy Wilkinson bc452bc094 Polish BootJarTests
See gh-19847
See gh-19792
2020-01-23 10:05:33 +00:00
Madhura Bhave 13f7db2d8c Write classpath index file from Gradle plugin
Closes gh-19847
2020-01-22 19:32:08 -08: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
Madhura Bhave df5b0f1163 Add support for layered jars in gradle plugin
Closes gh-19792

Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
2020-01-22 14:53:36 -08:00
Phillip Webb bfd2ca7fd9 Polish Gradle expression references
Expand all expression `$` references to the full `${...}` form.
2020-01-21 18:33:33 -08:00
Andy Wilkinson 89237634c7 Fix classpath used for Gradle Plugin integration tests in Eclipse
See gh-19841
2020-01-21 14:59:07 +00:00
Andy Wilkinson 9d5975bd09 Upgrade to Gradle 6.1
Closes gh-19772
2020-01-16 10:00:45 +00:00
Phillip Webb 862462b791 Update copyright year of changed files 2020-01-13 17:04:19 -08:00
dreis2211 d454c9653c Disable tests on Java 13 that require an incompatible Gradle version
See gh-19680
2020-01-13 16:51:55 +00:00
Andy Wilkinson e415f759a2 Raise the minimum supported version of Gradle to 5.6
Closes gh-18777
2020-01-13 12:10:13 +00:00
Andy Wilkinson ce99db1902 Port the build to Gradle
Closes gh-19609
Closes gh-19608
2020-01-10 14:15:35 +00:00
Andy Wilkinson 47b47c28a0 Reduce visibility of the Gradle plugin's test methods
See gh-19287
2019-12-05 10:24:48 +00:00
Andy Wilkinson 76f03a8cad Fix reflective access to archiveBaseName property
Previously, reflective access to the archiveBaseName property
incorrectly treated the property as a String. It should have been
treated as a Property<String>. This caused an exception to be thrown
and the deprecated baseName property to be used as a fallback.

This commit corrects the reflective access to the archiveBaseName
property. It also updates the tests to fail if a build outputs a
deprecation warning. Tests that use Gradle's Maven plugin have been
updated to expect deprecation warnings when run with Gradle 6.0 where
the plugin is deprecated. Tests that configure an archive's base name
have been updated to use archiveBaseName when running with Gradle 6.0
and later.

Closes gh-18663
2019-11-27 12:52:05 +00:00
dreis2211 347434ba81 Test the Gradle Plugin against Gradle 6.0.1
See gh-19065
2019-11-21 13:44:55 +01:00
Johnny Lim 96a029e44f Polish a test name
See gh-18999
2019-11-13 08:52:32 +01:00
Andy Wilkinson 379ba0dc00 Support Gradle 6.0
Previously, our Gradle plugin was not tested against Gradle 6.0,
a number of deprecation warnings were output when using the plugin
with Gradle 6, and some functionality related to the application
plugin did not work as expected.

This commit tests the plugin against Gradle 6. It also avoids calling
deprecated APIs. The plugin is compatibile against Gradle 4.10 where
the deprecated APIs' replacements are not available so reflection is
used to call the replcaements. Lastly, the way in which the base name
of the boot distribution that is created when the application plugin
is applied has been modified to ensure that it is effective when using
Gradle 6.

Closes gh-18663
2019-11-11 16:36:40 +00:00
Stephane Nicoll b951e70d18 Merge branch '2.1.x'
Closes gh-18850
2019-11-04 09:57:48 +01:00
dreis2211 8955d5c1b5 Test the Gradle Plugin against Gradle 5.6.4
See gh-18845
2019-11-04 09:56:12 +01:00
Andy Wilkinson 03f5791860 Merge branch '2.1.x'
Closes gh-18650
2019-10-18 10:37:39 +01:00
dreis2211 d17f11dbe1 Test the Gradle Plugin against Gradle 5.6.3
See gh-18648
2019-10-18 10:35:54 +01:00
Andy Wilkinson fc1889ee72 Merge branch '2.1.x'
Closes gh-18167
2019-09-06 14:04:54 +01:00
dreis2211 ae30515e5e Test the Gradle Plugin against Gradle 5.6.2
See gh-18164
2019-09-06 13:19:08 +01:00
Andy Wilkinson 7f8b3a7b86 Test the Gradle Plugin against Gradle 5.6.1
Closes gh-17995
2019-08-29 12:53:50 +01:00
dreis2211 26a22fa523 Test the Gradle Plugin against Gradle 5.6.1
See gh-17984

Closes gh-17984
2019-08-29 12:46:26 +01:00
Stephane Nicoll b57db504df Fix broken build due to Kotlin upgrade 2019-08-29 10:01:16 +02:00
Andy Wilkinson a785a5b58a Test the Gradle Plugin against Gradle 5.6
Closes gh-17883
2019-08-16 08:46:48 +01:00
dreis2211 56940fca97 Test the Gradle Plugin against Gradle 5.6
See gh-17876
2019-08-16 08:45:33 +01: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
Stephane Nicoll 79b29396d0 Merge branch '2.1.x'
Closes gh-17506
2019-07-14 13:14:21 +02:00
dreis2211 e9203a280c Test the Gradle Plugin against Gradle 5.5.1
See gh-17496
2019-07-14 13:13:17 +02:00
Andy Wilkinson 2816635418 Polish 2019-07-04 17:51:20 +01:00
Andy Wilkinson aa01bd3890 Polish "Polish GradleCompatibilityExtension's javadoc"
See gh-17411
2019-07-04 10:18:18 +01:00
dreis2211 dc4cc214fe Polish GradleCompatibilityExtension's javadoc
See gh-17411
2019-07-04 10:13:17 +01:00
Andy Wilkinson 9d5fa98334 Merge branch '2.1.x'
Closes gh-17429
2019-07-04 10:07:40 +01:00
Andy Wilkinson 7553b60e68 Test the Gradle Plugin against Gradle 5.5
Closes gh-17428
2019-07-04 10:05:57 +01:00
Stephane Nicoll e560b7f6ba Remove public modifier on JUnit5 lifecycle methods
See gh-17292
2019-06-21 18:09:05 +02:00
Phillip Webb 2c2b962204 Merge branch '2.1.x'
Closes gh-17232
2019-06-17 15:54:51 -07:00
Phillip Webb d82ccf1405 Ensure META-INF/MANIFEST.MF remains as first entry
Update Gradle archive tasks to ensure that `META-INF/` and
`META-INF/MANIFEST.MF` remain as the first entries of the archive.

Prior to this commit, rewritten archives would violate the implicit
specification of `JarInputStream` that these entries should be first.

Fixes gh-16698
2019-06-17 15:48:14 -07:00
Johnny Lim 368c0eebe4 Fix typo
See gh-17132
2019-06-16 11:42:00 +02:00
Phillip Webb b3d5cd538d Add JUnit 5 checkstyle rules
Add a rule to enforce JUnit 5 usage and conventions.

Closes gh-17093
2019-06-10 16:16:45 -07: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 ad5e905bd7 Update copyright header of changed files 2019-05-30 11:30:43 -07:00
dreis2211 e59d734098 Fix Gradle plugin code formatting
See gh-16984
2019-05-28 18:10:04 +01:00
Andy Wilkinson c80218064f Use sorted properties to make build info output repeatable
Closes gh-14494
2019-05-28 16:30:36 +01:00
Andy Wilkinson 54b123028c Default to optimized launch of the JVM when using Gradle's bootRun
Closes gh-16222
2019-05-25 09:29:52 +01:00
Andy Wilkinson babb94c791 Migrate spring-boot-gradle-plugin's tests to JUnit 5
Closes gh-16959
2019-05-24 20:17:34 +01:00
Andy Wilkinson f35b91a172 Raise minimum supported version of Gradle to 4.10 and encourage use of 5.x
Closes gh-16681
2019-05-03 13:07:15 +01:00
Andy Wilkinson 538030b57e Merge branch '2.1.x'
Closes gh-16693
2019-05-01 11:20:56 +01:00
Andy Wilkinson 881fbeff43 Test the Gradle Plugin against Gradle 5.4.1
Closes gh-16576
2019-05-01 10:47:35 +01:00
Andy Wilkinson 7d2a99943f Merge branch '2.1.x' 2019-04-17 09:26:28 +01:00
Andy Wilkinson dfbc787737 Test the Gradle plugin against Gradle 5.4
Closes gh-16576
2019-04-17 09:25:28 +01:00
Andy Wilkinson 9d1f584560 Adapt Gradle plugin tests to change in Kotlin's packaging
Closes gh-16554
2019-04-15 12:36:58 +01:00
Andy Wilkinson c5024f21a4 Merge branch '2.1.x' 2019-04-02 14:40:35 +01:00
Andy Wilkinson 6aa4fe579a Polish
See gh-16068
2019-04-02 14:40:18 +01:00
Andy Wilkinson ac4d6bb10f Merge branch '2.1.x' 2019-04-02 10:27:45 +01:00
Andy Wilkinson db4623c519 Merge branch '2.0.x' into 2.1.x 2019-04-02 10:27:34 +01:00
Andy Wilkinson 7b5f46d6e3 Add Spring-Boot-* manifest attributes to jars and wars built with Gradle
Closes gh-16068
2019-04-02 10:13:09 +01:00
Stephane Nicoll 17a800b577 Merge branch '2.1.x' 2019-03-29 10:51:44 +01:00
Stephane Nicoll 62d9c0a8b3 Test against Gradle 5.3.1 2019-03-29 10:51:31 +01:00
Spring Operator fb242c27d2 Use HTTPS for external links wherever possible
See gh-16276
2019-03-28 12:07:01 +00:00
Stephane Nicoll 90160b16aa Merge branch '2.1.x' 2019-03-25 10:20:52 +01:00
dreis2211 c2335e130c Test against Gradle 5.3
Closes gh-16294
2019-03-25 10:19:57 +01:00
Andy Wilkinson 36c1c051b8 Merge branch '2.1.x' 2019-03-20 16:55:10 +00:00
Andy Wilkinson e23f72c8b0 Merge branch '2.0.x' into 2.1.x 2019-03-20 16:53:48 +00:00
Andy Wilkinson 9fbd38ab3c Merge branch '1.5.x' into 2.0.x 2019-03-20 16:45:26 +00:00
Andy Wilkinson daba01ab94 Merge branch '2.1.x' 2019-03-19 12:37:04 +00:00
Andy Wilkinson 716b4e8acf Test the Gradle plugin against Gradle 5.3-rc-3
Closes gh-16211
2019-03-19 12:36:14 +00:00
Phillip Webb dd3e8154d9 Merge branch '2.1.x' 2019-03-11 22:15:19 -07:00
Phillip Webb fc3aa43cc2 Update copyright year for changed files 2019-03-11 22:14:53 -07:00
Andy Wilkinson 404f5d33f3 Align Gradle plugin's tests with Kotlin 1.3's restructuring
See gh-16195
2019-03-11 21:21:18 +00:00
Andy Wilkinson f4bd0b8b4b Merge branch '2.1.x' 2019-02-20 18:18:06 +00:00
Andy Wilkinson 59430a2642 Only include zips in BOOT-INF/lib, WEB-INF/lib, and WEB-INF/lib-provided
Closes gh-16001
2019-02-20 18:15:27 +00:00
Andy Wilkinson 2cda30988e Merge branch '2.1.x' 2019-02-11 16:00:55 +00:00
Andy Wilkinson 6fe9e3a0e1 Test the Gradle plugin against Gradle 5.2.1
Closes gh-15892
2019-02-11 15:51:14 +00:00
Andy Wilkinson 4faa0f51b7 Polish "Test the Gradle plugin against Gradle 4.10.3 and 5.1.1"
Closes gh-15791
2019-02-11 15:49:59 +00:00
dreis2211 1de372d896 Test the Gradle plugin against Gradle 4.10.3 and 5.1.1
See gh-15791
2019-02-11 15:35:06 +00:00
Andy Wilkinson 342bced125 Merge branch '2.1.x' 2019-02-01 13:48:02 +00:00
Andy Wilkinson 2650a07dc9 Leave module-info.class in root of archive when repackaging
Closes gh-15810
2019-02-01 13:47:42 +00:00
Andy Wilkinson 0ad72d5b5e Remove reliance on mavenLocal from Gradle plugin’s tests
See gh-15471
2018-12-18 11:41:51 +00:00
Andy Wilkinson 4edc32844a Remove use of execute method inherited from internal class
Closes gh-15484
2018-12-17 17:33:20 +00:00
Andy Wilkinson a0d0ecf9d4 Test the Gradle plugin against Gradle 5.0
Closes gh-15171
2018-11-26 16:02:54 +00:00
Andy Wilkinson 7790876575 Merge branch '2.0.x' 2018-11-23 14:01:12 +00:00
Andy Wilkinson c0e286b96b Test the Gradle Plugin against Gradle 5.0-rc-3
Closes gh-15171
2018-11-23 13:47:19 +00:00
Andy Wilkinson ce0a3d0311 Add missing classpath setters to BootJar and BootWar
Closes gh-15087
2018-11-23 13:46:56 +00:00
Andy Wilkinson fe9d9ec4e2 Test the Gradle plugin against Gradle 5.0-rc-3
Closes gh-15171
2018-11-15 10:32:34 +00:00
Andy Wilkinson 228e05487a Test Gradle Plugin against Gradle 5.0-rc-1
Closes gh-15028
2018-10-31 09:47:49 +00:00
Andy Wilkinson 5ac9b972fe Test the Gradle Plugin against Gradle 5.0-milestone-1
Closes gh-15005
2018-10-29 15:15:00 +00:00
Andy Wilkinson 77f571aa45 Merge branch '2.0.x' 2018-10-29 13:12:53 +00:00
Andy Wilkinson 7eb1df1650 Test the Gradle Plugin against Gradle 4.10.2
Closes gh-15004
2018-10-29 13:11:41 +00:00
Phillip Webb 01b8667dd7 Update copyright year for changed files 2018-10-05 13:40:07 -07:00
Andy Wilkinson a3d2f3f594 Polish "Add Kotlin DSL examples to Gradle Plugin's documentation"
Closes gh-14585
2018-10-05 10:41:13 +01:00
jnizet 5ed6c0d1ab Add Kotlin DSL examples to Gradle Plugin's documentation
See gh-14585
2018-10-05 10:41:13 +01:00
Andy Wilkinson 8c6910cf58 Polish "Refactor Gradle plugin tests to use runner's plugin classpath"
This commit removes the need for the Kotlin plugin tests to continue
to set the plugin classpath in each test build script. This is
achieved by adding the jars files containing the Kotlin plugin and
its dependencies to the runner's plugin classpath in the same way as
was already done for the dependency management plugin.

Closes gh-14680
2018-10-04 17:27:26 +01:00
jnizet c51449585e Refactor Gradle plugin tests to use runner's plugin classpath
Previously, each test build script used a property to configure its
classpath. This commit simplifies the tests by setting the classpath
once on the GradleRunner, thereby removing the need for it to be set in
each test script. It also allows, and, in fact, requires, the use of
the plugins block to apply the Boot plugin under test.

Unfortunately, this doesn't work for the tests for the reaction to the
Kotlin plugin. See the comments in the GradleBuild class and in each
KotlingPluginActionIntegrationTests build script.

See gh-14680
2018-10-04 17:26:42 +01:00
Andy Wilkinson 285f6bfd5f Merge branch '2.0.x' 2018-09-27 06:59:37 -04:00
jnizet eee07a840f Move away from deprecated Gradle configurations
Closes gh-14593
2018-09-27 06:58:31 -04:00
durigon 7aaeefbc0e Use Matcher from pre-compiled Pattern rather than String for replaceAll
Closes gh-14483
2018-09-17 10:54:54 +01:00
Andy Wilkinson a2cf2cd87f Raise the minimum supported version of Gradle to 4.4
Closes gh-14418
2018-09-12 17:06:03 +01:00
Andy Wilkinson ae4e1d0372 Test the Gradle plugin against Gradle 4.10
Closes gh-14417
2018-09-12 12:57:27 +01:00
Andy Wilkinson 630e2d0b41 Correct the permissions of scripts in archives of boot distribution
Closes gh-14158
2018-09-12 12:57:27 +01:00
Andy Wilkinson e4b9316613 Merge branch '2.0.x' 2018-09-11 20:33:40 +01:00
Andy Wilkinson 78464f999f Test the Gradle plugin against Gradle 4.10
Closes gh-14417
2018-09-11 20:33:26 +01:00
Andy Wilkinson 6041bc5bb0 Correct the permissions of scripts in archives of boot distribution
Closes gh-14158
2018-09-11 20:32:18 +01:00
Andy Wilkinson 147a08eb4c Merge branch '2.0.x' 2018-07-18 13:47:31 +01:00
Andy Wilkinson b9ad0d9992 Test the Gradle plugin against Gradle 4.8.1 instead of 4.8
Closes gh-13809
2018-07-18 13:34:27 +01:00
Andy Wilkinson 8deea933b9 Test the Gradle plugin against Gradle 4.9
Closes gh-13808
2018-07-18 13:33:39 +01:00
Andy Wilkinson a097f923c1 Provide sensible defaults for launch script properties when using Gradle
Closes gh-4458
2018-06-22 13:08:44 +01:00
Andy Wilkinson 6f2171c282 Improve error message when BootJar or BootWar has no known main class
Closes gh-12712
2018-06-08 18:07:24 +01:00
Andy Wilkinson 70c0d6a005 Test the Gradle plugin against Gradle 4.8
Closes gh-13359
2018-06-04 17:53:34 +01:00
Andy Wilkinson 00449bef6a Use app…DefaultJvmArgs as convention for start script's defaultJvmOpts
Closes gh-12631
2018-06-04 17:53:34 +01:00
Andy Wilkinson 7913d9b599 Add methods to BootJar for adding content to BOOT-INF
Closes gh-13000
2018-05-11 11:14:14 +01:00
Stephane Nicoll 9dccf5b895 Polish
See gh-13078
2018-05-07 14:48:56 +02:00
Andy Wilkinson a5f3f36b58 Test the Gradle plugin against Gradle 4.7
Closes gh-12952
2018-04-23 17:24:50 +01:00
Andy Wilkinson 806978b8f1 Test unresolved dependency analysis in the Gradle plugin
See gh-12784
2018-04-23 15:52:56 +01:00
Andy Wilkinson 1f35abacd6 Polish “Configure Kotlin compiler to use -java-parameters by default”
Closes gh-12641
2018-03-28 12:24:21 +01:00
Rui Figueira 5e2726f896 Configure Kotlin compiler to use -java-parameters by default
See gh-12641
2018-03-28 12:24:17 +01:00
Andy Wilkinson 4a3e0a231c Test the Gradle plugin against Gradle 4.6
Closes gh-12314
2018-03-02 13:41:28 +00:00
Andy Wilkinson e4a1fed3b8 Test the Gradle plugin against Gradle 4.6 2018-03-02 13:41:27 +00:00
Andy Wilkinson 188d120c9c Test the Gradle plugin against Gradle 4.5.1
Closes gh-12315
2018-03-02 13:41:27 +00:00
Andy Wilkinson 703de64842 Reinstate imports 2018-02-28 20:11:42 +00:00
Phillip Webb 7bc535e4fa Polish 2018-02-28 10:59:26 -08:00
Andy Wilkinson 9640881f38 Fix BuildInfo up-to-date check when group, name, or version changes
Previously, if the project's group, name, or version changed the
BuildInfo task would still be considered up-to-date as the values of
the project's properties were not reflected in the fields of the
BuildInfo instance.

This commit updates BuildInfo to copy the value of the project's
property to the corresponding BuildInfo field when the property is
read using its getter method on BuildInfo.

Closes gh-12266
2018-02-27 21:21:16 +00:00
Phillip Webb 3e4da3cc37 Polish 2018-02-27 12:53:01 -08:00
Andy Wilkinson fdb9a1ea8f Consider time in BuildInfo up-to-date checks and allow it to be set
Closes gh-12111
Closes gh-12266
2018-02-27 20:09:07 +00:00
Andy Wilkinson 30f79f2fb1 Use application name as convention for distribution's base name
Closes gh-12232
2018-02-27 12:56:50 +00:00
Andy Wilkinson 70c613819d Fix incomplete calls to assertThat 2018-02-08 11:06:54 +00:00
Andy Wilkinson 76a450dfba Format with Eclipse Oxygen SR2 2018-02-08 10:53:53 +00:00
Phillip Webb 7d5e41f7dc Polish 2018-02-01 10:25:33 -08:00
Andy Wilkinson 8f116f7e6f Align ordering of BootJar and BootWar archive entries
Previously, the ordering of the entries in an archive produced by
BootJar was different to the ordering of the entries in an archive
produced by BootWar. The latter placed application classes before
any nested jars, whereas the former was the other way around.

This commit updates BootJar to use the same ordering as BootWar and
adds tests to verify that the ordering is the following:

1. Loader classes
2. Application classes (BOOT-INF/classes or WEB-INF/classes)
3. Nested jars (BOOT-INF/lib or WEB-INF/lib)
4. Provided nested jars in a war (WEB-INF/lib-provided)

The tests also verify that the position of a library is not affected
by it requiring unpacking.

See gh-11695
See gh-11696
2018-01-31 14:38:38 +00:00
Phillip Webb 7c5042d079 Don't run `apply-plugin` tests
Stop running apply-plugin tests as part of the build since during a
release the version number will change and the jar will not be
available.

Fixes gh-11857
2018-01-30 21:45:17 -08:00
Andy Wilkinson 199088b0c9 Set kotlin.version when Kotlin's Gradle plugin is applied
Closes gh-11711
2018-01-29 10:13:54 +00:00
Andy Wilkinson 498f66fcdc Test the Gradle plugin against Gradle 4.5
Closes gh-11768
2018-01-26 15:55:25 +00:00
Andy Wilkinson 5e17fc775c Test the Gradle plugin against Gradle 4.4.1
Closes gh-11654
2018-01-17 11:57:02 +00:00
Andy Wilkinson 2668e41dd5 Make it easier to just use Boot’s dependency management with Gradle
Closes gh-11059
2018-01-17 11:39:59 +00:00
Phillip Webb b078698f20 Update copyright year of changed files 2018-01-09 12:13:27 -08:00
Andy Wilkinson 38ac595615 Polish 2018-01-03 10:50:16 +00:00
Stephane Nicoll 6277d0ceb7 Update copyright header 2018-01-02 15:02:29 +01:00
dreis2211 eb1ae2dd79 Fix typos
Closes gh-11460
2018-01-02 15:01:16 +01:00
Andy Wilkinson b545330d8e Fix reusable archive creation with Gradle 4.1 and later
Closes gh-11468
2018-01-02 12:56:55 +00:00
Andy Wilkinson ffca60d308 Revert "Rework BootRun so that it does not subclass JavaExec"
This reverts commit 6eee9de3c1.

Closes gh-10872
2017-11-22 17:22:44 +00:00
Andy Wilkinson 417c98304d Remove assumption about file separator that is incorrect on Windows
Closes gh-11087
2017-11-20 11:48:07 +00:00
Andy Wilkinson e43d0adc4f Polish 2017-11-02 12:05:18 +00:00
Andy Wilkinson 9bbccb093a Rename Gradle plugin tests to work around Windows filename restrictions
The Gradle plugin integration tests find their Gradle build scripts
using a naming convention of ${ClassName}-${methodName}.gradle. This
convention led to two gradle scripts with filenames that were long
enough to causes problems on Windows.

This commit renames two test methods to reduce the length of their
names and, therefore, the names of their corresponding Gradle script
files.

Closes gh-10868
2017-11-02 11:51:09 +00:00
Andy Wilkinson 6f55b57855 Make discovery of additional config metdata more robust with Gradle
Previously, the configuration metadata annotation processor relied
upon an additional metadata file have been copied to an output
location. When building with Gradle, it's the processResources task
that performs this copy and there is no guarantee that it will have
run before the compileJava task unless an explicit dependency betwee
the two tasks has been configured. If a project is built using
Gradle's parallel build support, the likelihood of this required
ordering not occurring increases.

This commit updates the configuration metadata annotation processor to
consider a new annotation processor option when looking for the
additional config metadata file. The Gradle plugin has been updated
to provide this option as a compiler argument. The option is only
provided when the annotation processor is found on the compilation
classpath to avoid a warning from javac's annotation processing about
the use of an option that is not supported by any of the available
annotation processors.

Closes gh-9755
2017-10-31 14:31:51 +00:00
Andy Wilkinson 48cc7bde30 Test the Gradle plugin against Gradle 4.3
Closes gh-10769
2017-10-30 20:47:37 +00:00
Andy Wilkinson ca4d7f7322 Test the Gradle plugin against Gradle 4.3-rc-4
See gh-10769
2017-10-27 20:30:50 +01:00
Andy Wilkinson c3f3bba090 Test the Gradle plugin against Gradle 4.3-rc-3
See gh-10769
2017-10-25 08:59:50 +01:00
Andy Wilkinson a256602c7b Polish 2017-10-24 14:41:03 +01:00
Andy Wilkinson ccca943e33 Add mainClassName to springBoot DSL in Gradle plugin
This commit introduces a new mainClassName property on the springBoot
DSL provided by the Gradle plugin. It can be used to explicitly
configure the mainClassName of the default bootRun, bootJar, and
bootWar tasks in a single place. Previously, the only mechanism
provided to do so was the mainClassName property that's only available
when the application plugin has been applied.

Closes gh-10623
2017-10-19 13:55:13 +01:00
Andy Wilkinson 5502aaafd1 Use mainClassName consistently across BootRun, BootJar, and BootWar
Previously, BootRun used the main property to configure the name of
the main class to run while BootJar and BootWar used the mainClass
property. Both were different to the application plugin which provides
a mainClassName project property.

This commit updates BootRun, BootJar, and BootWar to change the name
of the property used to configure the name of the main class to be
mainClassName. This makes the three Boot-specific tasks consistent
with each other, and also aligns them with Gradle's own application
plugin.

Closes gh-10622
2017-10-19 12:16:35 +01:00
Phillip Webb c6f930b49e Fix Gradle to use flattened POM file
Update the Gradle plugin to use version information from the
flattened POM.xml files.

See gh-9316
2017-10-04 16:34:39 -07:00
Phillip Webb 0ba4830b4f Relocate projects to spring-boot-project
Move projects to better reflect the way that Spring Boot is released.

The following projects are under `spring-boot-project`:

  - `spring-boot`
  - `spring-boot-autoconfigure`
  - `spring-boot-tools`
  - `spring-boot-starters`
  - `spring-boot-actuator`
  - `spring-boot-actuator-autoconfigure`
  - `spring-boot-test`
  - `spring-boot-test-autoconfigure`
  - `spring-boot-devtools`
  - `spring-boot-cli`
  - `spring-boot-docs`

See gh-9316
2017-10-04 16:34:23 -07:00