Hello , My project uses gradle 7.4.2 , and while doing a gradle build or rather any gradle activity like clean or publish etc… i see the following in console
Caused by: groovy.lang.MissingPropertyException: Could not get unknown property 'java' for object of type org.gradle.api.internal.artifacts.dsl.DefaultComponentMetadataHandler
And my gradlescript is erroring out at this part of build.gradle
publications {
mavenJava(MavenPublication) {
artifact bootJar
artifactId bootJar.baseName
from components.java -----------> precisely at this line
}
where as the same script works for other projects , I am not able to figure out what the issue is , can anyone help me here …Like where do i see what components are there and why is gradle not able to get it. What does publications do ??? . the build is successful when i remove that line
I am trying to work on my react native project and I am having this error. I even tried changing the distribution URL for this one distributionUrl=https://services.gradle.org/distributions/gradle-7.6-all.zip. because I saw that it wolved it for some people, but it would still not work for some reason. Please I really need help with this.