eriwen/gradle-css-plugin

Could not create an instance of type com.eriwen.gradle.css.CssExtension_Decorated.

louiseliu opened this issue · 5 comments

I use gradle1.3

Could not create an instance of type com.eriwen.gradle.css.CssExtension_Decorated.

thanks!

@louiseliu Would you mind telling me a bit about how you're trying to use the plugin (task name) and run your gradle task with -s and pasting the stacktrace you're getting?

thanks you !

i am sorry, i use this
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.eriwen:gradle-css-plugin:1.1.1'
}
}

and I replace
classpath 'com.eriwen:gradle-css-plugin:1.1.2'

it's works

@louiseliu Yeah, unfortunately, version 1.1.1 wasn't java 6 compatible. Glad it's working :)

thank you @eriwen

Hi,
We are using gradle 1.12 and the css-plugin:1.8.0/3 and we are hitting the same issue.
Are we limited by the gradle version? (We had a similar problem for the js-plugin and we updated from 1.8.x to 1.11.1 and that resolved the issue)

Caused by: org.gradle.internal.reflect.ObjectInstantiationException: Could not create an instance of type com.eriwen.gradle.css.CssExtension_Decorated.
at org.gradle.internal.reflect.DirectInstantiator.newInstance(DirectInstantiator.java:41)
at org.gradle.api.internal.ClassGeneratorBackedInstantiator.newInstance(ClassGeneratorBackedInstantiator.java:36)
at org.gradle.api.internal.plugins.DefaultConvention.create(DefaultConvention.java:112)
at com.eriwen.gradle.css.CssPlugin.apply(CssPlugin.groovy:25)
at com.eriwen.gradle.css.CssPlugin.apply(CssPlugin.groovy)
at org.gradle.api.internal.plugins.DefaultPluginContainer.providePlugin(DefaultPluginContainer.java:104)

....

Caused by: java.lang.NoSuchMethodError: org.gradle.api.internal.project.ProjectInternal.getServices()Lorg/gradle/internal/service/scopes/ServiceRegistryFactory;
at com.eriwen.gradle.css.source.internal.InternalGradle.toInstantiator(InternalGradle.java:14)
at com.eriwen.gradle.css.source.internal.InternalGradle$toInstantiator.call(Unknown Source)
at com.eriwen.gradle.css.CssExtension.(CssExtension.groovy:16)
at com.eriwen.gradle.css.CssExtension_Decorated.(Unknown Source)
at org.gradle.internal.reflect.DirectInstantiator.newInstance(DirectInstantiator.java:3