1apply plugin: 'com.android.library' 2 3android { 4 publishNonDefault true 5 6 buildTypes { 7 shadow 8 } 9 10 sourceSets { 11 main { 12 manifest.srcFile 'AndroidManifest.xml' 13 java.srcDirs = ['src'] 14 java.excludes = ['com/google/android/libraries/backup/shadow/**'] 15 } 16 17 shadow { 18 java.srcDirs = ['src'] 19 java.includes = ['com/google/android/libraries/backup/shadow/**'] 20 } 21 } 22} 23 24dependencies { 25 compile 'com.android.support:support-annotations:25.+' 26 shadowCompile 'junit:junit:4.+' 27 shadowCompile 'org.robolectric:robolectric:3.1-rc1' 28 shadowCompile 'org.robolectric:shadows-core:3.1-rc1' 29} 30