Guys, I am using a Mac Machine and its been weeks...
# community-support
s
Guys, I am using a Mac Machine and its been weeks I am facing issues to configure Gradle on my Liferay. Can anyone please help me with the same. I have tried everything changing the Environment Variables and Reinstalling Gradle. But unfortunately nothing works. Please help or DM me I keep on getting this error. For which I have attached the screenshot below
v
Reinstalling Gradle is pointless, your build scripts are erroneous. Besides that, you should actually never need to install any Gradle version. Each project should contain the 4 wrapper files which you should always use to run a build as it defines and manages the version of Gradle that should be used for that build. An installed Gradle version is only useful for projects that have a (imho) build-bug, i.e. do not have the wrapper files, or to bootstrap a new Gradle build and for that you can usually use your IDE or another Gradle build without having Gradle installed. Your error says that you somewhere declare a dependency for the
compileClasspath
configuration and this is wrong.
compileClasspath
is only for resolving the compile classpath, not for declaring dependencies. If you want to declare a dependency that is only used ad compile-time, use
compileOnly
instead.
s
I haven't created any dependency on my own
Please could you check and tell me the same.
v
What do you have in your build script?
s
build.gradle file is empty
v
Can you share a build
--scan
URL?
s
When I try creating a simple gradle project also, I get an error
v
Which error and why do you try to create a new project?
s
Just to see if my Gradle is properly configured
v
Your Liferay plugin version is not compatible with Gradle 8. You are hitting this: https://liferay.atlassian.net/browse/LPD-21814 It was fixed a week ago, but there is no release yet. So you need to downgrade Gradle in that project to at most 7.6.4
s
Yes now I am using Gradle 7.3
But still the issue hasn't been resolved
v
Most probably a different issue though, or still Gradle 8. Can you share another build
--scan
?
s
At times it builds and at times it doesn't