6.1.X EE, 6.2.X EE, 7.0.X EE, Master
Steps to Reproduce
- Navigate to Liferay 6.1.x or 6.2.x source code
- Switch to JDK 6
- Set javac.compiler=modern in build.USERNAME.properties
- Run ant all
Expected behavior is that the 6.1.x and 6.2.x compile succeeds. Actual behavior is both 6.1.x and 6.2.x fail to build.
This is because the build.gradle for com.liferay.ant.sync.dir does not declare the correct source and target version, and it uses features from JDK 7 and JDK 8.
In theory, you could switch to JDK7 or JDK8 for the build process, but it makes it much more likely that we introduce regressions where we use JDK 7 or JDK 8 API in a backport.