Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

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

Open
erajkovic opened this issue Jan 3, 2019 · 6 comments

Comments

@erajkovic
Copy link

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
Copy link
Author

erajkovic commented Jan 3, 2019

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
Copy link

616slayer616 commented Apr 4, 2019

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
Copy link

+1 Is this project still maintained?

@TeodoroFilippini
Copy link

+1, this would be great to fix

@stefanneuhaus
Copy link

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

@lorenzopolidori
Copy link

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'
}

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

No branches or pull requests

5 participants