eriwen / gradle-js-plugin

Gradle plugin for working with JS
http://eriwen.github.io/gradle-js-plugin
Apache License 2.0
382 stars 113 forks source link

How to handle deprecated message related to Gradle 6.0 and the gradle-js-plugin ? #168

Open erajkovic opened 5 years ago

erajkovic commented 5 years ago

With the latest version of Gradle - currently using 5.1 - I am getting a new deprecated code notice in my build: Internal API constructor FactoryNamedDomainObjectContaineronstructor AbstractNamedDomainObjectContainer(Class, Instantiator) has been deprecated. When using the --stacktrace option, I am getting the following extra information: Internal API constructor FactoryNamedDomainObjectContaineronstructor AbstractNamedDomainObjectContainer(Class, Instantiator) has been deprecated. This is scheduled to be removed in Gradle 6.0. Don't use internal API at org.gradle.api.internal.AbstractNamedDomainObjectContainer.(AbstractNamedDomainObjectContainer.java:65) at com.eriwen.gradle.js.source.internal.DefaultJavaScriptSourceSetContainer.(DefaultJavaScriptSourceSetContainer.java:17) at com.eriwen.gradle.js.source.internal.DefaultJavaScriptSourceSetContainer_Decorated.(Unknown Source) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.gradle.internal.reflect.DirectInstantiator.newInstance(DirectInstantiator.java:51) at org.gradle.api.internal.ClassGeneratorBackedInstantiator.newInstance(ClassGeneratorBackedInstantiator.java:36) at java.lang.reflect.Method.invoke(Method.java:498) at com.eriwen.gradle.js.JavaScriptExtension.(JavaScriptExtension.groovy:16) at com.eriwen.gradle.js.JavaScriptExtension_Decorated.(Unknown Source) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.gradle.internal.reflect.DirectInstantiator.newInstance(DirectInstantiator.java:51) at org.gradle.api.internal.ClassGeneratorBackedInstantiator.newInstance(ClassGeneratorBackedInstantiator.java:36) at org.gradle.api.internal.plugins.DefaultConvention.instantiate(DefaultConvention.java:242) at org.gradle.api.internal.plugins.DefaultConvention.create(DefaultConvention.java:142) at java.lang.reflect.Method.invoke(Method.java:498) at com.eriwen.gradle.js.JsPlugin.apply(JsPlugin.groovy:43) at com.eriwen.gradle.js.JsPlugin.apply(JsPlugin.groovy) ... I am going to try to push a build scan to gradle's site (https://scans.gradle.com) to make it easier to review.

erajkovic commented 5 years ago

Full report should be available from https://gradle.com/s/5opyqj6szezyi - not sure if the link can be shared here - alternate URL: https://scans.gradle.com/s/5opyqj6szezyi/deprecations?openUsages=WzMsNF0#deprecation-3-usage-0

616slayer616 commented 5 years ago

I'm facing the same issue. The same goes for the gradle-css-plugin

I have created PRs for both: https://github.com/eriwen/gradle-css-plugin/pull/52 https://github.com/eriwen/gradle-js-plugin/pull/171 Maybe this helps. I hope it gets seen by a contributor.

lorenzopolidori commented 5 years ago

+1 Is this project still maintained?

TeodoroFilippini commented 4 years ago

+1, this would be great to fix

stefanneuhaus commented 4 years ago

Now as Gradle 6 has been released the title should state something like "Incompatibility with Gradle 6".

lorenzopolidori commented 4 years ago

I solved this issue switching to webpack and calling it in a custom gradle task:

task webpackBuild(type: Exec) {
    workingDir 'base/path'
    commandLine 'npm', 'run', 'build'
}