Posts

Showing posts with the label dependencies

Gradle workspace: dependencies and modules management

Gradle workspace: dependencies and modules management Overview This article explains how to manage dependencies in your Gradle workspace project, use global dependencies, define configuration, and filter sub-modules. Dependencies management If you have a multi-module project - you probably have a lot of common dependencies in your modules, and you want to reuse them from a single place. This way you'll not need to update a single dependency version in tens of modules, but just update it in one place. The dependencies in your modules can be different: Liferay dependencies  - those ones, exposed by Liferay; Third-party dependencies  - not defined in Liferay. And approach is different for those types. For Liferay dependencies - you can enable  The Target Platform . For third-party ones - you may use global dependencies. Global dependencies You may define global dependencies in the root of your workspace, and then reuse them in different modules. ...

Liferay Target Platform

Enabling the Target Platform What is the Target Platform? Target Platform is a set of Maven's BOMs, which define all the exposed artifacts (Liferay's and third-party ones) in a specific Liferay version. Those BOMs are listed  here . Why we need it? You need target platform for dependencies versions management: this way you don't worry about the specific library versions, and just use the ones Liferay exposes. For example, when you use target platform - Gradle dependencies, like: compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "4.4.0" compileOnly group: "com.liferay", name: "com.liferay.journal.api", version: "4.2.0" compileOnly group: "com.liferay", name: "com.liferay.journal.service", version: "5.0.18" compileOnly group: "com.liferay", name: "com.liferay.dynamic.data.mapping.api", version: "5.2.0" will ...