1 apply plugin: 'android-library' 2 3 buildDir = "$project.rootBuildDir/android-$project.name" 4 5 android { 6 compileSdkVersion 17 7 buildToolsVersion = 17 8 9 logtags { 10 srcDirs = ['java'] 11 genDir = "$buildDir/source/generated" 12 } 13 14 sourceSets { 15 main { 16 manifest { 17 srcFile "AndroidManifest.xml" 18 } 19 java { 20 srcDirs = [ 21 'java', 22 "$buildDir/source/generated" 23 ] 24 } 25 resources.srcDirs = ['src'] 26 aidl.srcDirs = ['src'] 27 renderscript.srcDirs = ['src'] 28 res.srcDirs = ['res'] 29 assets.srcDirs = ['assets'] 30 } 31 } 32 } 33 34 android.libraryVariants.each { variant -> 35 variant.packageLibrary.baseName = "android-common" 36 }