Setting the target platform version to develop for takes two steps:
-
Open the workspace’s
gradle.properties
file and set theliferay.workspace.target.platform.version
property to the version you want to target. For example,liferay.workspace.target.platform.version=7.2.0
If you’re using Liferay DXP, you can set the property like this:
liferay.workspace.target.platform.version=7.2.10
The versions following a GA1 release of DXP follow fix pack versions (e.g.,
7.2.10.fp1
,7.2.10.fp2
, etc.). -
Once the target platform is configured, check to make sure no dependencies in your Gradle build files specify a version. The versions are now imported from the configured target platform’s BOM. For example, a simple MVC portlet’s
build.gradle
may look something like this:dependencies { compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel" compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib" compileOnly group: "javax.portlet", name: "portlet-api" compileOnly group: "javax.servlet", name: "javax.servlet-api" compileOnly group: "jstl", name: "jstl" compileOnly group: "org.osgi", name: "osgi.cmpn" }
You’ve configured your target platform in workspace. You’re all set!