mockwebserverplus
mockwebserverplus copied to clipboard
Updated SnakeYaml version to work on Android devices
The current version of Yaml (1.14) doesn't work on Android devices or emulators. The newer version supports Android. Unfortunately, it uses the SNAPSHOT version of the library... SAD! - which means I won't be able to use it offline on the subway... but at least it works. If there's a better way to do it, by all means, use that way. The current 1.14 version causes this exception:
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/beans/Introspector;
at org.yaml.snakeyaml.introspector.PropertyUtils.getPropertiesMap(PropertyUtils.java:63)
I'm going to try to figure out a way to share yaml and json between test
and androidTest
and update the README.
We are using stock mockwebserverplus but with swapped snakeyaml dependency in our Android projects. build.gradle
looks like that:
androidTestCompile('com.orhanobut:mockwebserverplus:1.0.0') {
exclude module: 'snakeyaml'
}
androidTestCompile 'pl.droidsonroids.yaml:snakeyaml:1.18-android'
That artifact is published to maven central, so no additional repository is needed.
'pl.droidsonroids.yaml:snakeyaml
is based on this source: https://github.com/bmoliveira/snake-yaml
That's even better. @orhanobut Should I update the dependency in this PR to use the one @koral suggested? That seems like a better option than relying on a SNAPSHOT