support apklib dependencies #112

Merged
merged 4 commits into from Jan 31, 2012

Projects

None yet

2 participants

@loganj
loganj commented Jan 30, 2012

Adds a key for specifying apklib dependencies, which may be fetched via ivy. Extracts the apklibs, adds sources, runs aapt.

based on prior work by Matthew Willis at github.com/appamatto

loganj added some commits Jan 26, 2012
@loganj loganj handle apklib dependencies
extract, add source, run aapt

based on prior work by Matthew Willis at github.com/appamatto
68862a6
@loganj loganj fix aapt parameters and actually dex w/ resources 8909890
@jberkel
Owner
jberkel commented Jan 30, 2012

thanks! do you have a sample config to test this quickly?

@loganj
loganj commented Jan 30, 2012

I do, but now I'm thinking this may not be quite right.

It unpacks the apklibs in a source generator, but each apklib goes into its own directory under target/ instead of going into the managedSourceDirectory. Thought that would be better, but it doesn't seem to play well with sbt-idea and may not with others.

I'll look into fixing that and then update the pull request with a test config.

Apologies for the premature PR.

loganj added some commits Jan 31, 2012
@loganj loganj use UpdateReport artifact filtering 32912bb
@loganj loganj move extracted Java source into sourceManaged
The sbt ecosystem really wants all managed source in the same place, which is
specified by a SettingKey (and so can't be generated/appended by a Task).  We
may be able to place res/ and assets/ under there as well, if we namespace
them.
a9765f8
@loganj
loganj commented Jan 31, 2012

Seems to play much more nicely with sbt-idea now.

Here's a sample configuration that uses Action Bar Sherlock 4 beta: https://gist.github.com/1709186/

@jberkel
Owner
jberkel commented Jan 31, 2012

apk builds fine but when generating idea project files i'm getting:
https://gist.github.com/1710077

@loganj
loganj commented Jan 31, 2012

That's odd... In my own project, I see the retrieval fail (which I assumed was a bug in sbt-idea related to the artifact type and/or resolvers, since other dependent tasks work), but the idea project generates fine.

I am now seeing the same IllegalArgumentException when I add sbt-idea to the sample config, though.

Looking into it. Thanks for vetting so carefully.

@loganj
loganj commented Jan 31, 2012

Well, that was more obvious than expected. The ABS resolver was defined for the main project, but not inherited for the test project. I've updated the sample config gist, should work now.

@jberkel jberkel merged commit c2516b6 into jberkel:master Jan 31, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment