Skip to content

Updating Gradle and Bnd Version

Ethan Fritz edited this page Jan 13, 2021 · 6 revisions

Updating Bnd

  1. Build open-liberty at the integration branch and copy build.image/wlp into a temporary directory, such as build.image/wlp-integration.

  2. Checkout a new branch to make version updates. Modify files below to point to the new version. Run a search on the workspace for biz.aQute.bnd to update projects that have bnd buildpath entries.

When updating open-liberty:

When updating WS-CD-Open:

  1. Build open-liberty again and fix any errors from upgrading.

  2. Run a compare tool such as Beyond Compare on build.image/wlp and build.image/wlp-integration. Manifest files aren't readily comparable because they wrap lines, so they will need to be passed through a sort first. I've created a utility script to do that. Backup the directories you intend to run it on in case you want to revert back to a useable wlp.

https://github.com/OpenLiberty/open-liberty/tree/integration/dev/wlp-gradle/utility/build.gradle

cp -r build.image/wlp build.image/wlp.backup
cp -r build.image/wlp-integration build.image/wlp-integration.backup
./gradlew -b wlp-gradle/utility/build.gradle sortWlpBundleManifests -PworkspaceDir=${OL_HOME}/dev/build.image/wlp/lib
./gradlew -b wlp-gradle/utility/build.gradle sortWlpBundleManifests -PworkspaceDir=${OL_HOME}/dev/build.image/wlp-integration/lib
  1. Make corrections in *.bnd files to get the build outputs matching.

Updating Gradle

  1. Checkout a new branch to make version updates. Modify files below to point to the new version.

When updating open-liberty, open a PR to change:

When updating WS-CD-Open, open a PR to change:

Update default version in build scripts. A build that hasn't set the gradle.version property will use this version, and only Release and iFix builds will have set gradle.version.

  1. This step requires SFTP access to libertyfs, which can be done by anyone on CD/CSI. Download the latest gradle-*-bin.zip from https://gradle.org/releases/ and SFTP it to libertyfs at /liberty/prereqs/gradle. This change is so internal builds can pull from our internal network and not the public gradle.org server.

  2. When submitting a personal build for Gradle updates, manually request a build and set the build definition's gradle.version property to the latest version. After delivery into integration, the Liberty Official Release Build - Static definition needs gradle.version set to the latest version. The reason for this property is that iFix build definitions created by copying the release definition need to remain at an unchanged version.

Clone this wiki locally