Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Minimize test work #116

Closed
wants to merge 3 commits into from
Closed

Minimize test work #116

wants to merge 3 commits into from

Conversation

loganj
Copy link

@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).

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.
@loganj
Copy link
Author

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
Copy link

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

@loganj
Copy link
Author

loganj commented May 31, 2013

@fxthomas Sure thing.

@loganj loganj closed this May 31, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants