Commit Graph

363 Commits

Author SHA1 Message Date
Andy Wilkinson 079b5d3f50 Polish Gradle plugin after layering being enabled by default
Closes gh-20983
2020-08-06 11:37:09 +01:00
Madhura Bhave 41f5ba9077 Switch layering on by default
Closes gh-20983
2020-08-03 17:04:20 -07:00
Andy Wilkinson d2926e0222 Merge branch '2.3.x'
Closes gh-22678
2020-07-30 20:57:15 +01:00
Andy Wilkinson 00cd8945d5 Document how to use Gradle's native bom support
Closes gh-21570
2020-07-30 20:53:44 +01:00
Andy Wilkinson 19ad163486 Merge branch '2.3.x'
Closes gh-22411
2020-07-20 13:58:40 +01:00
Andy Wilkinson accc1f1ca8 Merge branch '2.2.x' into 2.3.x
Closes gh-22410
2020-07-20 13:58:19 +01:00
Andy Wilkinson 21f733b89b Merge branch '2.1.x' into 2.2.x
Closes gh-22409
2020-07-20 13:49:53 +01:00
Andy Wilkinson 179d2c79d6 Avoid trivialising what the reader's learning about
Closes gh-22408
2020-07-20 13:45:41 +01:00
Scott Frederick e6318f83b2 Merge branch '2.3.x'
Closes gh-22349
2020-07-15 15:17:16 -05:00
Scott Frederick 210282260e Fail on bootBuildImage with launch script
This commit adds a check to the support code for the Gradle plugin
bootBuildImage task to ensure that the jar file that will be passed
to a builder is readable and has a valid directory. This prevents a
situation where the jar file cannot be read because it is prepended
with a launch script, and the builder does not receive any files to
process.

Notes have also been added to the Gradle plugin documentation to warn
against using a bootJar launchScript configuration and bootBuildImage
together, as well as caveats about launchScript that match the Maven
plugin documentation.

Fixes gh-22223
2020-07-15 14:58:11 -05:00
Andy Wilkinson 2d91a096db Merge branch '2.3.x'
Closes gh-22293
2020-07-09 16:02:42 +01:00
Andy Wilkinson 794ded5286 Test the Gradle plugin against Gradle 6.5.1
Closes gh-22292
2020-07-09 16:01:52 +01:00
Andy Wilkinson ecbc8ea2df Merge branch '2.3.x'
Closes gh-22202
2020-07-02 15:17:04 +01:00
Andy Wilkinson 79770b9615 Use source sets to determine configurations deprecated for resolution
Fixes gh-22200
2020-07-02 15:14:00 +01:00
Scott Frederick 73b737c7d8 Merge branch '2.3.x'
Closes gh-22017
2020-06-18 15:11:07 -05:00
Scott Frederick 28643e4d2d Validate image references before passing to CNB builder
Prior to this commit, an image name or run image name derived from
the project name or provided by the user would be passed to the CNB
builder without validation by the Maven plugin build-image goal or
Gradle plugin bootBuildImage task. This could lead to error messages
from the plugins that are difficult to understand and diagnose.

This commit makes parsing of the image names more strict, based on
the grammar implemented by the Docker go library. This provides
validation of the image names before passing them to the builder,
with a more descriptive error message when parsing and validation
fails.

Fixes gh-21495
2020-06-18 15:09:57 -05:00
Andy Wilkinson 056d5f3120 Enable deprecation compilation warnings
See gh-21271
2020-06-16 12:50:47 +01:00
Scott Frederick 838cfc529f Merge branch '2.3.x'
Closes gh-21933
2020-06-15 16:17:39 -05:00
Scott Frederick 6119d69679 Add runImage option for image building
This commit adds a runImage property to the Maven plugin build-image
goal and the Gradle bootBuildImage task. The property allows the user
to override the run image reference provided in the builder metadata
with an alternate run image. The runImage property can be specified
in the build file or on the command line.

Fixes gh-21534
2020-06-15 16:08:56 -05:00
Madhura Bhave 4161f0b983 Merge branch '2.3.x'
Closes gh-21799
2020-06-09 18:22:10 -07:00
Madhura Bhave d30c0e8aec Merge branch '2.2.x' into 2.3.x
Closes gh-21798
2020-06-09 18:21:31 -07:00
Madhura Bhave 36faa1d42a Document using system properties in gradle plugin docs
Closes gh-21317
2020-06-09 16:07:54 -07:00
Andy Wilkinson 020a47ba3e Document support for Gradle 5
Closes gh-15358
2020-06-08 14:29:07 +01:00
Phillip Webb 0a05b4c9fd Update copyright year of changed files 2020-06-05 15:36:09 -07:00
Andy Wilkinson c4faeac4d7 Merge branch '2.3.x'
Closes gh-21703
2020-06-04 20:27:18 +01:00
Andy Wilkinson 24138c104c Use highlightjs for syntax highlighting in Asciidoctor's HTML output
Closes gh-21701
2020-06-04 20:25:29 +01:00
Andy Wilkinson 399d0f7b95 Merge branch '2.3.x'
Closes gh-21651
2020-06-02 09:42:34 +01:00
Andy Wilkinson f0bc8ee73c Fix version placeholder replacement in Gradle plugin docs
Closes gh-21640
2020-06-02 08:59:14 +01:00
Phillip Webb 502e2a4c64 Polish 2020-06-01 14:27:39 -07:00
Andy Wilkinson 3d143e59e7 Fix inclusion of version-specific content in Gradle plugin's docs
Fixes gh-21610
2020-06-01 17:47:42 +01:00
Andy Wilkinson b1777b9dee Use stable file repository for testing snapshot layers
Closes gh-21629
2020-06-01 16:28:33 +01:00
Andy Wilkinson ba23368440 Configure attributes on productionRuntimeClasspath
Previously, the productionRuntimeClasspath configuration was created
without any attributes. This caused problems with multi-project
dependency resolution as there was insufficient information for Gradle
to determine which variant of a dependency should be used by the
productionRuntimeClasspath configuration.

This commit updates the configuration to have three attributes, each
configured with the same values as those of Gradle's own
runtimeClasspathConfiguration.

Fixes gh-21549
2020-05-26 15:12:21 +01:00
Scott Frederick a5c42ce4c4 Polish `Add gradle build image command line example`
See gh-21490
2020-05-20 15:53:03 -05:00
Dave Syer 88a32d2fb9 Add gradle build image command line example
See gh-21490
2020-05-20 15:52:52 -05:00
Phillip Webb 038ae93406 Update copyright year of changed files 2020-05-13 16:48:51 -07:00
Scott Frederick 28749e7fbb Update CNB buildpack Java version env variable
Prior to this commit, the build tool plugins set the environment
variable BP_JAVA_VERSION when invoking the CNB builder to set the
version of the JDK/JRE that the builder should use in the created
image.

With CNB API 0.3, the convention changed the name of this environment
variable to BP_JVM_VERSION. This commit updates the build tool
plugins to match the newer convention.

See gh-21273
2020-05-08 17:07:51 -05:00
Scott Frederick 35bc82a693 Use CNB creator all-in-one lifecycle
This commit modifies the buildpack platform invocation logic used by
the build plugins to invoke the single creator lifecycle introduced in
the CNB API 0.3, instead of invoking discrete lifecycle phases
separately. It also removes support for CNB API 0.2.

Fixes gh-21273
2020-05-08 17:03:47 -05:00
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