gradle-spoon-plugin icon indicating copy to clipboard operation
gradle-spoon-plugin copied to clipboard

Test apk for library is installed twice

Open lsuski opened this issue 5 years ago • 3 comments

There is this code in your plugin

  // This is a hack for library projects.
            // We supply the same apk as an application and instrumentation to the soon runner.
            applicationApk = if (testedOutput is ApkVariantOutput) testedOutput.outputFile else instrumentationApk

and it causes to install twice same apk if we are testing library which slows down whole execution. What is the reason of this hack?

lsuski avatar Dec 23 '19 13:12 lsuski

This code just checks which APK is used. How is it installed twice?

jaredsburrows avatar Dec 30 '20 17:12 jaredsburrows

Spoon installs applicationApk and and instrumentationApk - for library this is the same apk so it installs it twice

lsuski avatar Dec 30 '20 17:12 lsuski

We can add a check and only run this for com.android.library projects.

jaredsburrows avatar Apr 24 '22 20:04 jaredsburrows