Skip to content
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

Gradle 5.0 warning in M4 #487

Closed
jexp opened this issue Aug 12, 2018 · 12 comments
Closed

Gradle 5.0 warning in M4 #487

jexp opened this issue Aug 12, 2018 · 12 comments

Comments

@jexp
Copy link
Contributor

jexp commented Aug 12, 2018

When creating and running an M4 app with gradle it issues this warning.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.8/userguide/command_line_interface.html#sec:command_line_warnings

A problem was found with the configuration of task ':shadowJar'. Registering invalid inputs and outputs via TaskInputs and TaskOutputs methods has been deprecated and is scheduled to be removed in Gradle 5.0.
 - No value has been specified for property 'mainClassName'.


> Task :compileTestGroovy
The following annotation processors were detected on the compile classpath: 'io.micronaut.annotation.processing.TypeElementVisitorProcessor' and 'io.micronaut.annotation.processing.PackageConfigurationInjectProcessor' and 'io.micronaut.annotation.processing.BeanDefinitionInjectProcessor'. Detecting annotation processors on the compile classpath is deprecated and Gradle 5.0 will ignore them. Please add them to the annotation processor path instead. If you did not intend to use annotation processors, you can use the '-proc:none' compiler argument to ignore them.

There might be more.

@jameskleeh
Copy link
Contributor

@jexp What command was used to generate the app?

@jeffscottbrown
Copy link
Contributor

Are you using your own local build of Gradle 5.0?

@jeffscottbrown
Copy link
Contributor

Nevermind that question. I misunderstood. I thought you were using Gradle 5.0. Apologies for the confusion.

@jeffscottbrown
Copy link
Contributor

What command was used to generate the app?

@jameskleeh

I was able to recreate the problem with mn create-app appname.

After generating the app, ./gradlew sJ demonstrates the issue...

~ $ mn create-app issue487
| Application created at /Users/jeffbrown/issue487
~ $ cd issue487/
issue487 $ ./gradlew sJ

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.8/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 4s
3 actionable tasks: 3 executed

@jameskleeh
Copy link
Contributor

Here is the issue on the shadow plugin tracker GradleUp/shadow#336

@jameskleeh
Copy link
Contributor

Once they provide a solution, we can update the CLI to implement it

@jeffscottbrown
Copy link
Contributor

FYI... I have confirmed that if mainClassName = "somepackage.Application" is after apply plugin:"application" and before apply plugin:"com.github.johnrengelman.shadow" that the warning doesn't appear to be logged.

@aplatypus
Copy link

aplatypus commented Aug 24, 2018

Will / would the annotation be ignored?

  • "Detecting annotation processors on the compile classpath is deprecated and Gradle 5.0 will ignore them."

I've resolved that by following the guidelines for Groovy and making sure the ...inject-java plugin isn't in the implementation( ... ) section.

I have this message on Java and Groovy files under a groovy/ directory. Files under a java/ tree seem to be OK. I'm not knowingly using the shadow plugin. Is that something included internally?

@jameskleeh
Copy link
Contributor

@aplatypus That issue doesn't have anything to do with the shadow plugin. Do you have annotationProcessor "io.micronaut:inject-java" in your gradle dependencies?

@graemerocher graemerocher added this to the 1.0.0.RC1 milestone Aug 29, 2018
@jameskleeh
Copy link
Contributor

The issue has been fixed upstream, just waiting on a release

@aplatypus
Copy link

aplatypus commented Sep 22, 2018

@jameskleeh ... yes I do.

@jameskleeh
Copy link
Contributor

@aplatypus like I said that is a separate issue. Feel free to create a new issue with an example project

@graemerocher graemerocher removed this from the 1.0.0.RC1 milestone Sep 26, 2018
@jameskleeh jameskleeh removed the status: awaiting third-party Awaiting changes to a third party library label Sep 26, 2018
@jameskleeh jameskleeh added this to the 1.0.0.RC1 milestone Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants