can anybody help me solve this problem
Could not find method compile() for arguments [project ':moqui-util'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
can anybody help me solve this problem
Could not find method compile() for arguments [project ':moqui-util'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
If you are using Gradle version 7.0+, then compile dependency configuration is removed from that. You might need to look for implementation dependency configuration in place of compile.
PS: Do not forget to rebuild your gradle file.
More info can be found here at my another answer for this deprecation.
It looks pretty straightforward, but i didn't see many examples of what needs to be changed. This is what I had to do:
Anything like this, change from
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25'
to
implementation 'org.slf4j:slf4j-log4j12:1.7.25'
I also had to change the way mainClass
is declared
mainClassName = 'package.MainClass'
to
application {
mainClass = 'package.MainClass'
}
To get to this, I had to delete the gradle
files and folder, and do a gradle init
to recreate the build configs and dependencies.
Use implementation
, runtimeOnly
, compileOnly
etc. as the new equivalents