I'm trying to extract the Android /res
folder into a separate project that's included in my main project as an apklib dependency. The problem is that while the contents of the /res
are included in the resulting .apklib
, the compiled R.class
is not. Even more confusing is that the mvn clean install
command generates the .apklib
as well as a .jar
file, and the jar file has R.class
, but none of the contents of the /res
folder. How do I generate a single package (either .jar or .apklib) that contains all of my resources as well as the compiled classes?
pom.xml
<packaging>apklib</packaging>
...
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<attachSources>true</attachSources>
<sdk>
<platform>12</platform>
</sdk>
</configuration>
<plugin>
Which generates the following
.jar
./morseflash-resources.jar
com/.../R.class
.apklib
./morseflash-resorces.apklib
META-INF
AndroidManifest.xml
res/
layout/
values/
I'd like all this content in a single file, and I'd like to be able to list it as a dependency in my main Android project. Is this possible, and if so, how could I accomplish it?