Skip to content

Failed to build using gradle 7.0 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
michaelhkay opened this issue Jan 30, 2021 · 1 comment
Open

Failed to build using gradle 7.0 #2

michaelhkay opened this issue Jan 30, 2021 · 1 comment

Comments

@michaelhkay
Copy link

michaelhkay commented Jan 30, 2021

Attempting to build this with gradle 7.0 on Mac (I'm a gradle novice, so I seem to be in the target population for this sample...) I got the failure:

>XX javaparser-gradle-sample % gradle --warning-mode all shadowJar

> Configure project :
The testCompile configuration has been deprecated for dependency declaration. This will fail with an error in Gradle 7.0. Please use the testImplementation configuration instead. Consult the upgrading guide for further information: https://docs.gradle.org/6.8/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations
        at build_dsnwk311xnn9kogym6xt0jtx$_run_closure2.doCall(/Users/mike/GitHub/javaparser-gradle-sample/build.gradle:24)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
The AbstractArchiveTask.version property has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the archiveVersion property instead. See https://docs.gradle.org/6.8/dsl/org.gradle.api.tasks.bundling.AbstractArchiveTask.html#org.gradle.api.tasks.bundling.AbstractArchiveTask:version for more details.
        at build_dsnwk311xnn9kogym6xt0jtx$_run_closure4$_closure6.doCall(/Users/mike/GitHub/javaparser-gradle-sample/build.gradle:47)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)

> Task :compileJava FAILED

FAILURE: Build failed with an exception.

I got rid of the first error by changing testCompile to testImplementation, but I didn't understand the second error.

@michaelhkay
Copy link
Author

I got rid of the second error by change the line (near the end of build.gradle)

'Implementation-Version': version,

to

'Implementation-Version': archiveVersion,

I'm now getting another error

* What went wrong:
Execution failed for task ':compileJava'.
> Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.

(It doesn't. That's not where Java gets installed these days...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant