Gradle Error configurations.add String cannot be cast to Configuration -
my gradle file says
configurations.add "externaldeps"
if run gradle 1.4 don't have problem.
if run gradle 2.0 following error:
caused by: java.lang.classcastexception: java.lang.string cannot cast org.gradle.api.artifacts.configuration @ org.gradle.api.artifacts.configuration$namer.determinename(configuration.java:87) @ org.gradle.api.internal.defaultnameddomainobjectcollection.add(defaultnameddomainobjectcollection.java:70) @ org.gradle.api.nameddomainobjectcollection$add$0.call(unknown source) @ build_3p9qdtholqj79o8rnevdt3d7t0.run(d:\code\trunk\projects\build.gradle:6) @ org.gradle.groovy.scripts.internal.defaultscriptrunnerfactory$scriptrunnerimpl.run(defaultscriptrunnerfactory.java:52) ... 82 more
what has changed causing error?
how should defining now?
the manual explains how create configuration:
configurations { externaldeps }
the dsl documentation shows configuration container has method create():
configurations.create('externaldeps')
the api doc class shows add() methods take configuration argument, hence exception get.
Comments
Post a Comment