| apply plugin: 'android-library' |
| |
| android { |
| compileSdkVersion 15 |
| buildToolsVersion "17.0" |
| } |
| |
| // query for all (non-test) variants and inject a new step in the builds |
| android.buildVariants.each { variant -> |
| // create a task that copies some additional data in the library bundle |
| def copyBlahTask = tasks.add(name: "copy${variant.name.capitalize()}Blah", type: Copy) { |
| from file("$project.projectDir/blah") |
| destinationDir file("${buildDir}/bundles/${variant.dirName}") |
| } |
| |
| // now make the package task depend on it |
| variant.packageLibrary.dependsOn copyBlahTask |
| } |