Closed GoogleCodeExporter closed 9 years ago
Hi,
Interesting idea. However I'm not sure we want to list all possible JVMs. In
the mean time could it be possible to add the dependency in the classpath
wether you are targeting a JVM or the device ?
Note that at the moment noone in the team actually develop on Android, you
might want to get in touch with the google guys. As a lazy developer, or
overwhelmed by real life, I believe the Dexmaker project could fallback to the
default MockMacker if they detect a standard JVM.
Thanks for reporting the idea, also if you have a technical proposal we could
look into it and see how it fits in the project.
Cheers,
Brice
Original comment by brice.du...@gmail.com
on 19 Dec 2012 at 10:57
Original comment by brice.du...@gmail.com
on 19 Dec 2012 at 10:59
Related to dexmaker issue 5 :
https://code.google.com/p/dexmaker/issues/detail?id=5
Original comment by brice.du...@gmail.com
on 4 Dec 2013 at 3:06
Any workaround for this? we are trying to use mockito both in the JVM and
Dalvik depending on the type of tests we run.
Is there a way of telling mockito not to use dexmaker?
Original comment by iva...@gmail.com
on 11 Nov 2014 at 3:48
Mockito has no mechanism right now on that matter.
Maybe something is achievable on with gradle to tweak the classpath depending
on some properties / profiles, etc...
Original comment by brice.du...@gmail.com
on 12 Nov 2014 at 1:22
This is an awful workaround, but if your (jvm) robolectric test are run with
the task 'testDebug' and your (dalvik) espresso ones are run with another task,
you can add this to your build.gradle file:
//remove dex maker if running robolectric, as they don't agree with other
project.tasks.whenTaskAdded { task ->
if (task.name.equals("testDebug")) {
def removeDexmakerDependency = project.tasks.create(name: "removeDexmakerDependency",) {
project.configurations.androidTestCompile.dependencies.all { dependency ->
if (dependency.name.startsWith("dexmaker")) {
project.configurations.androidTestCompile.dependencies.remove(dependency)
}
}
}
task.dependsOn removeDexmakerDependency
}
}
Original comment by jasond...@gmail.com
on 5 Dec 2014 at 4:14
Hey guys,
Mockito 1.10.15 contains a new extension point: PluginSwitch.
https://github.com/mockito/mockito/blob/master/doc/release-notes/official.md#110
15-2014-12-12-2342-utc
It can be used to switch off dexmaker's PluginSwitch if we're not running in
dalvik. The plugin does not is not documented greatly yet (contributions
welcome!) but it should be already useful.
This plugin can be implemented and included in dexmaker distribution to solve
this use case out of the box (contributions welcome!). Until this happens,
users can drop their own impl of this plugin on the the classpath.
Original comment by szcze...@gmail.com
on 13 Dec 2014 at 5:31
I'm closing this issue. Please use GitHub for new queries or when following up
on this ticket. Thanks!
Original comment by szcze...@gmail.com
on 13 Dec 2014 at 5:32
Original issue reported on code.google.com by
beafd...@gmail.com
on 18 Dec 2012 at 7:51