Validating Modules Outside of Workspace

If you prefer to not use Liferay Workspace, but still want to validate modules against a target platform, you must apply the Target Platform Gradle plugin to the root build.gradle file of your multi-module Gradle build. Follow the Targeting a Platform Outside of Workspace section to do this.

Once you have the Target Platform plugin and its BOM dependencies configured, you must configure the targetPlatformDistro dependency. Open your project’s root build.gradle file and add it to the list of dependencies. It should look like this:

dependencies {
    targetPlatformBoms group: "com.liferay.portal", name: "release.portal.bom", version: "7.0.6"
    targetPlatformBoms group: "com.liferay.portal", name: "release.portal.bom.compile.only", version: "7.0.6"
    targetPlatformDistro group: "com.liferay.portal", name "release.portal.distro", version: "7.0.6"
}

Liferay DXP users must replace the artifact names and versions:

- `release.portal.bom` → `release.dxp.bom`
- `release.portal.bom.compile.only` → `release.dxp.bom.compile.only`
- `release.portal.distro` → `release.dxp.distro`
- `7.0.6` → `7.0.10.7`

Now you can validate your modules against a target platform!

0 (0 Votes)
Including the Resolver in Your Gradle Build Previous