Minimize test work #116

Closed
wants to merge 3 commits into
from

Projects

None yet

2 participants

@loganj
loganj commented Feb 8, 2012

This branch does a couple of things.

  1. It fixes runtime errors caused by duplicated/overlapping inclusion of libraries in the main apk and the test apk. The test apk should only include test-specific content (classes, resources, libraries)
  2. It skips proguard on the test project altogether. Given (1), the need to run proguard on the test project is pretty dramatically reduced.

With this branch, I'm finally able to successfully run some basic ProviderTestCase2 stuff from sbt.

The downside: It's a little bit hacky (note the use of the skipApkLibDependencies key).

loganj added some commits Feb 6, 2012
@loganj loganj skip apklibs in test project 4c35988
@loganj loganj clear proguardInJars; don't need it 3bba0eb
@loganj loganj in fact, skip proguard by default in tests
proguard is run on the main project, which should roll in the scala library
and most other dependencies.  The test project is only going to roll in test
dependencies; by default, it's unlikely those are going to be in desperate
need of paring down, and I for one would rather not incur the time cost.
8b8b424
@loganj
loganj commented Feb 9, 2012

Quick note: This doesn't allow for library dependencies added in the test project.

The test project dependsOn the main project. This means that at runtime, when packaging the test project, there's no way to distinguish between dependencies added by the main project and those added by the test project. I have to dex all dependencies, or none, into the test apk. Dexing all dependencies would cause conflicts with the main apk, so for now it's none.

I don't really have a better idea than removing the project dependency relationship, but that would involve touching a lot more than I care to touch at the moment, and would likely leave current builds broken.

@fxthomas

@loganj : I fixed everything in my WIP branch, including library dependencies and a much better Proguard config. PR can be closed, I guess?

@loganj
loganj commented May 31, 2013

@fxthomas Sure thing.

@loganj loganj closed this May 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment