Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GString to String type cast failing #267

Merged
merged 1 commit into from
Dec 21, 2018
Merged

Fix GString to String type cast failing #267

merged 1 commit into from
Dec 21, 2018

Conversation

prateekma
Copy link
Member

It seems that the cast from GString to String is failing here. The toString() cast is present when returning other dependencies but it isn't present on this one.

Log:

class org.codehaus.groovy.runtime.GStringImpl cannot be cast to class java.lang.String (org.codehaus.groovy.runtime.GStringImpl is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @7823a2f9; java.lang.String is in module java.base of loader 'bootstrap')
Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

@prateekma
Copy link
Member Author

While using the Kotlin DSL, the commented code below is expected to work. The current workaround which seems to work is the code that is not commented.

 // wpi.deps.vendor.java().forEach { compile(it) }

    wpi.deps.vendor.dependencies.map { dep ->
        dep.javaDependencies.map { art ->
            "${art.groupId}:${art.artifactId}:${WPIVendorDepsExtension.getVersion(art.version, wpi.deps.vendor.wpiExt)}"
        }
    }.forEach { it.forEach { compile(it) } }

@JaciBrunning
Copy link
Member

Thanks!

@JaciBrunning JaciBrunning merged commit 197fca9 into wpilibsuite:master Dec 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants