Closed JBYoshi closed 9 years ago
Is your workspace up-to-date? It seems like Eclipse is providing the wrong configurate version. Make sure you've refreshed the Gradle project or regenerated it (can't remember how it works with Eclipse).
Yep, Eclipse is up to date. Still getting the error.
We did a juke forward and back again with the configurate version didn't we? thats probably the cause of this. I would make sure that you've done Right Click > Gradle > Refresh All on all the projects and then try again. If that fails try removing the projects and reimporting the gradle project.
@Deamon5550 That didn't solve it, unfortunately.
I found a bit more information by running gradle dependencies
, which shows why the two versions are appearing (some parts omitted):
apiCompile, apiRuntime, compile, default, runtime, testCompile, and testRuntime
+--- project :SpongeCommon
| +--- project :SpongeCommon:SpongeAPI
| | | (...)
| | +--- ninja.leaping.configurate:configurate-hocon:3.0
| | | +--- com.typesafe:config:1.3.0
(...)
forgeGradleMcDeps
| (...)
+--- com.typesafe.akka:akka-actor_2.11:2.3.3
| +--- org.scala-lang:scala-library:2.11.1
| \--- com.typesafe:config:1.2.1
+--- com.typesafe:config:1.2.1
| (...)
Until a better fix is found for now you can downgrade configurate locally to version 2.0 in SpongeAPI and it should work fine.
@Deamon5550 Yep, that works. I'll leave this open so someone can find a better solution.
there is a way to tell gradle itself not to load specific versions of libraries.
https://docs.gradle.org/current/userguide/dependency_management.html#exclude-dependencies
It's working fine for me in Eclipse. How did you import the project?
@Minecrell I used Import -> Gradle -> Gradle Project. I'm using the Gradle plugin written by SpringSource since it's more fully featured than Buildship.
Apparently the plugins seem to be both broken (they generate a broken project configuration for Sponge), although gradle eclipse
works just fine for me.
Seems like it's been fixed. config-1.2.1.jar
now has a lower priority than config-1.3.0.jar
. Not sure exactly what created the fix, though.
Closing.
When updating dependencies, Forge and Sponge both have dependencies on
com.typesafe:config
with conflicting versions. Eclipse adds both to the classpath and gives priority to the Forge-provided version, resulting in errors at runtime.Full console log up to the point the first exception was thrown: