I'm trying to make separate artifact in my project to build jar file with ContentProvider contract classes. To build this jar I use next task:
task contractsJar(type: Jar) {
from android.applicationVariants.release.javaCompile.destinationDir
includes "contract classes filter"
into "$buildDir/libs"
}
contractsJar.dependsOn 'compileReleaseJava'
but this task build jar with base path in the system root (for Mac OS X it is /Users/myuser...
). So what should I do to make "right" jar with base path in the project root?
There were two problems:
DomainObjectCollection.all()
into
works in some weird way - if we use it then jar will have system root as base folderSo the result config: