Note
This Intershop Gradle Tools version will be included in Intershop Commerce Suite 7 version 7.6. It can also be used along with all Intershop 7 versions starting with 7.4.6.1.
To use Gradle Tools version 2.7 with Intershop 7 version 7.4 to 7.5, perform the following steps to migrate your environment:
Gradle Tools 2.7 and later will be delivered exclusively via Intershop's public repository. Please set up your repository server according to Cookbook - Setup CI Infrastructure (valid to Gradle Tools 2.7).
Regenerate the corporate configuration and corporate distribution according to Cookbook - Setup CI Infrastructure (valid to Gradle Tools 2.7).
In the Recipe: Create Sources From Intershop Templates it is sufficient to run the tasks createCorporateConfiguration
and createCorporateDistribution
.
distributionUrl
in gradle/wrapper/gradle-wrapper.properties.In your gradle.properties files, change the following properties if existent:
filter.com.intershop.build.set.cartridge-plugins=2.7.1 filter.com.intershop.build.set.extension-plugins=2.7.1 version.com.intershop.deployment-bootstrap=2.7.1
'com.intershop:deployment-bootstrap:2.7.1'
.This release of Intershop Gradle Tools is based on Gradle 2.7. The previous release was based on Gradle 2.3. Please see Gradle's release notes for information about changes:
Based on valuable customer feedback and our internal experience, dependency management for 3rd party libraries has been simplified.
The first incubating implementation tried to stay compatible with the existing Intershop 7 application server's infrastructure, which implied certain functional drawbacks and major performance implications during build & assembly. The new approach relies only on standard Gradle dependency configurations, but requires some modifications within the application server.
Major advantages are:
For more information please take a look at the Cookbook Recipe: Using Third-party Libraries in a Cartridge.
Spock is a testing and specification framework. It provides a Groovy-based DSL for writing automated acceptance tests. Geb is a browser automation library. It enables browser automation with using the selenium Web driver technology and very expressive jQuery-like syntax. Together with Geb, you can implement acceptance tests at GUI level in your project.
As an incubating feature, the Gradle Tools support execution of GUI tests as as part of the assembly process on the CI server. A new SourceSet "remoteTest" is introduced for GUI tests as for further test types, that run against a started application server. The ish-assembly plugin provides tasks for executing remoteTests and for dealing with Selenium drivers at the CI environment.
Previously you could only provide static properties to be added (or removed) from a file with the overrideProperties
filter like this:
overrideProperties('myFilter') { [...] properties['to.be.changed'] = 'new value' properties['to.be.deleted'] = null // This does not work: properties['some.property'] = properties['existing.property.from.the.filtered.file'] }
As the filter is configured during Gradle's configuration phase, previously existing properties are not available.
Gradle Deployment Tools 2.7 introduces a new DSL for the overrideProperties
filter to set properties dynamically:
overrideProperties('myFilter') { [...] // This will still work: properties['to.be.changed'] = 'new value' properties['to.be.deleted'] = null withProperties { Properties props -> // This will work now: props['some.property'] = props['existing.property.from.the.filtered.file'] } }
The given closure is not executed during the configuration phase, but during the file copy operation, so its content is available there.
Starting with version 2.7 Gradle Deployment Tools know the Gradle base version they require. A distinct warning is emitted when trying to execute a deployment process with an incompatible Gradle distribution.
This mechanism replaces the requireGradle
declaration during assembly, that is now deprecated and can just be left out.
The build plugin ish-tloc-plugin has been deprecated, as tloc itself is deprecated as of Intershop 7 release 7.5. This plugin will be removed with the next major version of Intershop Gradle Tools.
This plugin will be replaced with the intershop-jaxb plugin. This plugin comes with a new configuration, different from the existing. It is still included and the assignment can be deactivated with a project property 'disableStandardJaxb
'.
The previous incubating implementation in Gradle Tools 2.3 based on the separate configuration libs has been replaced and is not available anymore. Please see section New and Noteworthy for further information.
Existing libs dependency declarations are replaced with standard compile dependencies. A simple search & replace over the component set sources should be enough for all ordinary dependency declarations, e.g.:
# inside the component set source directory find . -iname build.gradle | xargs sed -r "s|^(\s+)libs|\1compile|g" -i
For the assembly cartridges must be included transitively, see Cookbook - Gradle Assembly Tools (valid to 7.8). As libraries are then placed in the respecting environments' configurations, excludes should be defined for all configurations:
// What was previously: // configurations.libs { // is now: configurations.all { exclude group:'com.example', module:'excluded-lib' }
Hotfix import tool has been replaced by a continuous delivery process via Intershop Public Repository.
You can continue to use the hotfix import tool generated by previous versions of Gradle Tools if you need to consume hotfixes without using the Intershop Public Repository.
All previous Gradle Tools releases used Spock 0.7 as test framework. Gradle Tools 2.7 updates this to the 1.0 release of Spock.
Spock extensions of Intershop's Gradle Tools have been recompiled for Spock 1.0. If you use those in your own test cases, you have to update to Spock 1.0, too.
The zip file format does not forbid adding a given entry to the zip file multiple times. Starting with Gradle Tools 2.7 packages created via ish-base-plugin
(e.g., a cartridge's share zip) must be duplicate-free. Under normal circumstances there can be no duplicates, except where the build logic mistakenly defines the same srcDir
of a package more than once.
In preparation for future changes, the ish-sonar-plugin
is not applied per default anymore. If you use SonarQube for static code analysis, you must apply this plugin explicitly:
buildscript { dependencies { classpath group: 'com.intershop.build.gradle', name: 'ish-component-plugin' } } apply plugin: 'intershop-sonar'
Starting with this version some of the Intershop Plugins for Gradle have their own lifecycle and a separate version.
Examples with their latest version and the functionality:
Dependency definition | Description |
---|---|
com.intershop.build.infrastructure:intershop-ci-setup:3.1.0 | Plugin for Intershop project setup |
com.intershop.build.infrastructure:intershop-ci-setup-bootstrap:3.3.0 | Package, which is used for the project setup |
com.intershop.build:intershop-resourcelist-plugin:3.0.0 | Plugin for resource list generation |
com.intershop.build:intershop-jaxb-plugin:3.0.1 | New plugin for JAXB code generation |
com.intershop.build:intershop-sonar-plugin:3.0.1 | New SonarQube plugin for Intershop |
com.intershop.build.migration:intershop-buildmigration:7.6.0.0 | This plugin helps to rename the groups of cartridges from older versions of Intershop to 7.6. |
com.intershop.build.release:intershop-buildinfo-plugin:2.2.6 | This plugin adds additional build information to the module as well to the jar file. |
This list of plugins will be extended. With the independent lifecycle it is possible to update this plugins between two major versions of the Intershop Gradle Tools.
The 2.7.1 hotfix release of Intershop's Gradle Tools includes the following changes:
The method com.intershop.assembly.test.BaseAssemblySpec.noImagesFromDirectoryRunning(File)
has been deprecated and its body has been replace with a no-op implementation. It was part of the AssemblySpec
executed during a assembly build, and tried to verify that there is no application server still running from a previous execution on the given deployed server. This verification was not robust enough and caused more harm than good, which is why it has been disabled. No action is needed for migration.
On Linux the deployment uses an invalid mode for certain files, which may lead to an exception like the following:
org.gradle.internal.nativeintegration.filesystem.FileException: Could not set file mode 37777777777 on '/opt/intershop/eserver1/share/ivy.xml'.
Those files will now be deployed with mode 444 instead. No action is needed for migration.
Downloading the web driver for executing Geb tests in the assembly is now cached correctly, i.e., the archive will only be downloaded once and stored inside the GRADLE_USER_HOME directory. No action is needed for migration.