“Unresolved requirement: Import-Package” for a module not in my build.gradle
问题 I want to use Elasticsearch's Client Java class within a Liferay 7 SP4 FP30 module, so I wrote this build.gradle : dependencies { compileOnly group: "com.liferay", name: "com.liferay.portal.search.elasticsearch", version: "2.1.14" compileOnly group: "com.liferay", name: "org.elasticsearch", version: "2.2.0.LIFERAY-PATCHED-1" compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0" compileOnly group: "com.liferay", name: "com.liferay.osgi.util", version: "3.0.0"