Commit Graph

463 Commits

Author SHA1 Message Date
Scott Frederick 32d378a348 Use test harness for image building integration tests
This commit modifies the integration tests for the Maven and Gradle
image building goal and task to use a custom builder as a test harness
to verify that the plugins invoke the builder as expected.

Fixes gh-25838
2021-05-12 14:51:45 -05:00
Andy Wilkinson b3af6d6403 Polish
See gh-25798
2021-05-12 17:40:33 +01:00
Andy Wilkinson 6daf67a88c Upgrade to Gradle 6.9
Closes gh-26408
2021-05-07 11:21:24 +01:00
Andy Wilkinson ef9e3bafff Test our Gradle plugin against 6.9-rc-2
Closes gh-26395
2021-05-06 20:10:54 +01:00
Andy Wilkinson b3275c5647 Align productionRuntimeClasspath with runtimeClasspath
Fixes gh-25798
2021-05-05 09:52:44 +01:00
Andy Wilkinson 94ca2d1e78 Test the Gradle plugin against Gradle 6.9-rc-1
Closes gh-26267
2021-04-30 16:52:52 +01:00
Andy Wilkinson ef5fbb0669 Configure bootBuildImage's targetJavaVersion using a provider
Previously, the targetJavaVersion property of bootBuildImage was set
using the project's target compatibility directly. This meant that
property's value would reflect the configured target compatibility at
the time of the task's creation and any subsequent changes to the
target compatibility would be missed.

This commit updates the registration of the bootBuildImage task to set
the value of the targetJavaVersion property using a provider. This
indirection means that the project's target compatibility isn't read
until the value of the targetJavaVersion is read, allowing any changes
to the target compatibility to be picked up even if they're made after
the bootBuildImage task has been created.

Fixes gh-26297
2021-04-29 11:36:03 +01:00
Andy Wilkinson a470c1af3a Align documentation with main default branch name
Closes gh-26255
2021-04-27 15:18:00 +01:00
Andy Wilkinson 82198a99e0 Polish nohttp configuration
Closes gh-26166
2021-04-20 11:15:13 +01:00
Scott Frederick e19443093d Document runtime JVM configuration when building an image
Fixes gh-21478
2021-04-09 14:06:24 -05:00
Andy Wilkinson b35d1ec6e8 Revert "Use test harness for image building integration tests"
This reverts commit da9d8d6055.

See gh-25838
2021-04-07 09:30:51 +01:00
Scott Frederick da9d8d6055 Use test harness for image building integration tests
This commit modifies the integration tests for the Maven and Gradle
image building goal and task to use a custom builder as a test harness
to verify that the plugins invoke the builder as expected.

Fixes gh-25838
2021-03-30 16:48:28 -05:00
Phillip Webb 9c8a97809d Consistent use of @deprecated since
Restore the patch version number for consistency with `@since`
tags.

See gh-25808
2021-03-30 09:20:30 -07:00
Phillip Webb 26dd1b9a26 Update deprecations with for removal targets
Update all deprecation tags to include a removal target.

Closes gh-25808
2021-03-29 15:44:58 -07:00
Stefan Wolf 86ca32e694 Enable stricter validation for Gradle plugin
See gh-25409
2021-02-25 17:28:51 +00:00
Andy Wilkinson a2adb877ee Polish "Encourage use of maven-publish plugin in Gradle docs"
See gh-25299
2021-02-16 11:22:47 +00:00
Robert Smith c0a5245a3e Encourage use of maven-publish plugin in Gradle docs
See gh-25299
2021-02-16 11:19: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 630d216430 Update copyright year of changed files 2021-02-01 22:10:24 -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
jongmin92 23ecb86089 Document missing code to run Gradle bootRun task
See gh-25012
2021-01-28 18:56:21 -08:00
Phillip Webb 464b302655 Set withTestKitDir per Gradle version
Attempt to fix cache locking issues by setting a unique `withTestKitDir`
directory for each tested Gradle version.

Closes gh-24993
2021-01-25 21:35:25 -08:00
Andy Wilkinson 46d908f632 Upgrade to Gradle 6.8.1
Closes gh-24737
2021-01-22 14:20:57 +00:00
Phillip Webb 9da0bd8523 Update copyright year of changed files 2021-01-12 12:02:57 -08:00
Andy Wilkinson 997505005b Handle files larger than Integer.MAX_VALUE bytes in bootJar and bootWar
Fixes gh-24618
2021-01-12 13:11:46 +00:00
Andy Wilkinson 7625a979db Configure bootRun to use project's Java toolchain by default
Previously, unlike the application plugin's run task, our bootRun task
ignored the project's Java toolchain. This meant that the application
was run on a JVM with the same Java version as the one being used by
Gradle itself. This could result in a failure if the application
required a more modern JVM.

This commit updates the plugin to configure the bootRun task's
JavaLauncher convention to be one derived from the project's Java
toolchain. Toolchain support was introduced in Gradle 6.7 so this is
only done when using Gradle 6.7 and later.

Fixes gh-24517
2021-01-11 11:21:53 +00:00
Andy Wilkinson 064de4e073 Check configured JavaLauncher when determining version of the JVM
Previously, bootRun assumed that the Java version of the JVM that would
run the application would be the same as the Java version of the JVM
that is running the build. This assumption does not hold true when
Gradle's toolchain support is used to configure tasks that fork a new
JVM to use a version other than that being used by Gradle itself.

This commit updates the BootRun task to query the JavaLauncher property
when determining the version of Java on which the application will be
run. Toolchain support and the JavaLauncher property are new in Gradle
6.7. To support earlier versions of Gradle, NoSuchMethodError is caught
we continue as if no JavaLauncher has been configured and use the local
JVM's Java version.

Fixes gh-24512
2021-01-11 10:36:16 +00:00
Andy Wilkinson 5ad4d627fd Fix classpath index so entries match those expected by the launcher
This reverts commit ad164269e9 and adds
some additional tests.

Fixes gh-24192
2021-01-08 15:32:19 +00:00
Scott Frederick 0e5df2296e Fail with Gradle bootBuildImage and war packaging
Prior to this commit, running the bootBuildImage Gradle task on a
project configured for war packaging would result in a jar file being
built and used in the image instead of the war file. With this commit
an error will be thrown from the plugin in this case.

Fixes gh-24521
2020-12-16 13:23:43 -06:00
Phillip Webb 5f351a6983 Merge branch '2.2.x' into 2.3.x
Closes gh-24338
2020-12-04 18:21:57 -08:00
Phillip Webb 837fc83527 Fix checkstyle header violations
See gh-24337
2020-12-04 18:05:53 -08:00
Scott Frederick da2276e7d4 Use stable builder and run images in integration tests
Fixes gh-24183
2020-11-17 13:54:10 -06:00
Andy Wilkinson 633027b1cd Upgrade to Gradle 6.7
Closes gh-23754
2020-10-19 17:52:01 +01:00
Andy Wilkinson 11b5e86ffd Deprecate BootJar#getConfigurations
Fixes gh-23527
2020-10-17 07:54:38 +01:00
Scott Frederick de685bdca4 Document buildpack configuration of JVM options
Fixes gh-21582
2020-10-09 13:21:37 -05:00
Scott Frederick 49b0707f1a Clarify image builder configuration documentation
This commit qualifies examples of configuring the CNB builder to clarify
that the examples apply to use of the default Paketo builder, and adds links
to the official Paketo docs for more details.

Fixes gh-19967
2020-10-08 17:02:17 -05:00
Andy Wilkinson 543763462c Update tests to look for snippets in correct location
See gh-23598
2020-10-06 15:57:25 +01:00
Andy Wilkinson 7eb92cc71a More Gradle snippets to correct location
See gh-23598
2020-10-06 14:44:26 +01:00
Andy Wilkinson 2d3291fb83 Merge branch '2.2.x' into 2.3.x
Closes gh-23598
2020-10-06 14:35:49 +01:00
Andy Wilkinson 7ac14203ab Expand Gradle plugin's docs on setting bootRun's system properties
Closes gh-23578
2020-10-06 14:35:30 +01:00
Andy Wilkinson 8667e9ded8 Merge branch '2.2.x' into 2.3.x
Closes gh-23426
2020-09-21 12:16:14 +01:00
Andy Wilkinson 581190d7a0 Test the Gradle plugin against 6.7-rc-1
Closes gh-23425
2020-09-21 12:14:35 +01:00
Andy Wilkinson d06af28cd8 Merge branch '2.2.x' into 2.3.x
Closes gh-23422
2020-09-21 10:47:06 +01:00
Andy Wilkinson 360e29af48 Polish "Add note about Kotlin main class name"
See gh-23418
2020-09-21 10:40:29 +01:00
Sebastiaan Fernandez 0bde5fda9b Add note about Kotlin main class name
See gh-23418
2020-09-21 10:36:16 +01:00
Andy Wilkinson 3861ef13fb Merge branch '2.2.x' into 2.3.x
Closes gh-23406
2020-09-18 09:09:41 +01:00
Andy Wilkinson 5ec673ff2a Add anchors to section headers in Gradle plugin docs
Fixes gh-23402
2020-09-18 09:06:54 +01:00
Stephane Nicoll 648789ef84 Document that buildpacks use non-root users
Closes gh-21122
2020-09-07 12:41:51 +02:00
Stephane Nicoll ee914624e6 Document buildpacks are configured with target Java version
Closes gh-21796
2020-08-31 16:15:30 +02:00
Andy Wilkinson b57b2f0b44 Test the Gradle Plugin against 6.5 and 6.6
Closes gh-23075
2020-08-25 12:01:25 +01:00