gradle will automatically bump up the stdlib to 1....
# announcements
gradle will automatically bump up the stdlib to 1.1 if necessary to keep things consistent
­čĹŹ 2
It will use the latest version, but will not bump automatically.
I have @nhaarman 's mockito-kotlin and I also needed to add
Copy code
androidTestCompile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
Error:Conflict with dependency 'org.jetbrains.kotlin:kotlin-stdlib' in project ':app'. Resolved versions for app (1.1.0) and test app (1.0.6) differ. See for details.
@maciej still for 1.1.0?
I use 1.1.
I have this, haven't tested without for 1.1.0:
Copy code
configurations.all {
        resolutionStrategy {
            forcedModules = [kotlinStdLib,
where the forcemodules version is 1.1.0-eap-x
If you want to see, just remove testCompile kotlin-reflect and try to run tests.
Not that I would want you to update your lib to 1.1. Just pointing to the issue I had (easily) resolved.
Note it's Android and Android is weird.
It will create two separate APKs for app and test code and can end up having different versions of dependencies in each, then it crashes.
That's the reason behind
exclude group: ...
and adding
@mg6maciej There are a couple of people who upvoted the pull request to update the Kotlin dependency for Mockito-Kotlin to 1.1.0, which is exactly why I'm asking ^^
Added a comment there.
Maybe will help someone who didn't figure it out for themselves.
so the build definitely fails for you if your don't add those lines, right? If that's the case, perhaps the best thing to do is indeed updating the dependency to to 1.1.0
I think it's a safe assumption. Unless you add a lot of features people can still use 1.3.0 with Kotlin 1.0.x.
If I had to guess, more than half Android projects globally are already on 1.1.
yeah but that's a shame to the other half if it doesn't work, isn't it ­čśů