I am following a beginner's tutorial from here in order to create a service and then consume it from another module (eg. a Portlet)
Everything goes well until I try to deploy it - there is an error in the generated classes: The type com.liferay.petra.sql.dsl.query.DSLQuery cannot be resolved. It is indirectly referenced from required .class files
Locate build.gradle
file and add the following dependency:
compileOnly group: "com.liferay", name: "com.liferay.petra.sql.dsl.api"
Note: you have to add it in both *-api and *-service build.gradle
files