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

Doesn't work with AGP 2.4.0-alpha7 #7

Closed
yogurtearl opened this issue May 16, 2017 · 2 comments
Closed

Doesn't work with AGP 2.4.0-alpha7 #7

yogurtearl opened this issue May 16, 2017 · 2 comments

Comments

@yogurtearl
Copy link

yogurtearl commented May 16, 2017

This plugin seems to have problems with Android Gradle Plugin (AGP) 2.4.0-alpha7 (works fine with 2.3.2)

With AGP 2.4.0-alpha7 I get this error:

Looks like the test engines are not on the classpath for the ConsoleLauncher invocation.

org.junit.platform.commons.util.PreconditionViolationException: Cannot create Launcher without at least one TestEngine; consider adding an engine implementation JAR to the classpath
        at org.junit.platform.commons.util.Preconditions.condition(Preconditions.java:285)
        at org.junit.platform.launcher.core.DefaultLauncher.<init>(DefaultLauncher.java:52)
        at org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:53)
        at org.junit.platform.console.tasks.ConsoleTestExecutor.executeTests(ConsoleTestExecutor.java:61)
        at org.junit.platform.console.tasks.ConsoleTestExecutor.lambda$execute$0(ConsoleTestExecutor.java:57)
        at org.junit.platform.console.tasks.CustomContextClassLoaderExecutor.invoke(CustomContextClassLoaderExecutor.java:33)
        at org.junit.platform.console.tasks.ConsoleTestExecutor.execute(ConsoleTestExecutor.java:57)
        at org.junit.platform.console.ConsoleLauncher.executeTests(ConsoleLauncher.java:79)
        at org.junit.platform.console.ConsoleLauncher.execute(ConsoleLauncher.java:69)
        at org.junit.platform.console.ConsoleLauncher.main(ConsoleLauncher.java:41)

Option                                        Description
------                                        -----------
-h, --help                                    Display help information.
--disable-ansi-colors                         Disable ANSI colors in output (not
                                                supported by all terminals).```
@mannodermaus
Copy link
Owner

mannodermaus commented May 16, 2017

This is odd; Are you using version 1.0.0-M4 of the plugin? I remember having this issue with the M3 release, possibly because of some recent changes in how Android Studio populates the classpath for annotation processors. It went away after updating everything to M4, though.

Could you also try adding the required TestEngine manually, like so:

testApk "org.junit.jupiter:junit-jupiter-engine:5.0.0-M4"

@mannodermaus
Copy link
Owner

I have just released version 1.0.0-M4-rev1 of the plugin, which is supposed to address this issue. Please let me know if it doesn't!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants