Joshua St. Clair 5 Years Ago Thanks for the great explanation Dave! One question I have comes from your recommendation in the conclusion though. I like to use the Liferay blade templates to get started when I create my modules for projects and when they generate the build.gradle files, they use compileOnly for the Liferay library dependencies. Your recommendation is to change these to compile though? Please sign in to reply. Reply as... Cancel
Luqman Ahmad 5 Years Ago Thanks for the article David, it gives me new insight. I follow tutorials for developing web app in liferay docs, the portlet module use compileOnly for referencing service and api module generated by service builder. And when i check the the Import-Package in MANIFEST.MF file of portlet module, it lists service package referenced by portlet module. Is there any special treatment for this case as you state compileOnly depedency will not be listed as Import-Package manifest entries but in my observation it is listed? I just try to understand the difference between compile and compileOnly. Thank you. Please sign in to reply. Reply as... Cancel
Avinash Kashid 5 Years Ago Thanks for sharing the article David. It is very usefull to unserdstand the difference between compile ,compileOnly and compileInclude Please sign in to reply. Reply as... Cancel
bernd kopinits 4 Years Ago Hello David, we're currently migrating from Maven to Gradle. I really like it a lot as our bnd files are way smaller now. Unfortunately we're struggling with the compileInclude :/ We do have one dependency that uses a classifier ('frontend') and this one fails on a ./gradlew clean build. Execution failed for task ':client-api:jar'. > Could not resolve all files for configuration ':client-api:compileInclude'. > Could not find portal.backend:portal-backend-entities:. Required by: project :client-api Interestingly if we use a compileOnly, a build and a clean build run successfully. And after that, we can change it back to compileInclude and builds (without clean) still run successfully. Thanks, Bernd Please sign in to reply. Reply as... Cancel