ワークスペースの外にあるモジュールの検証

Liferay Workspaceを使用せずにターゲットプラットフォームに対してモジュールを検証したい場合は、マルチモジュールのGradleビルドのルートbuild.gradleファイルにTarget Platform Gradleプラグインを適用する必要があります。これを行うには、Targeting a Platform Outside of Workspaceのセクションに従ってください。

Target PlatformプラグインとそのBOM依存関係が設定できたら、targetPlatformDistro依存関係を設定する必要があります。プロジェクトのルートbuild.gradleファイルを開き、これを依存関係のリストに追加します。すると、以下のようになります。

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

Liferay DXPユーザーは、アーティファクト名とバージョンを以下のように置き換える必要があります。

  • release.portal.bomrelease.dxp.bom
  • release.portal.bom.compile.onlyrelease.dxp.bom.compile.only
  • release.portal.distrorelease.dxp.distro
  • 7.1.07.1.10

これで、ターゲットプラットフォームに対してモジュールの検証ができます。

« Gradleビルドにリゾルバを含めるDockerの活用 »
この記事は役に立ちましたか?
0人中0人がこの記事が役に立ったと言っています