import com.android.builder.core.BuilderConstants

apply plugin: 'com.android.library'

android {
    compileSdkVersion 28
}

task makeStubJar(type: Jar){
    baseName 'framework-stub'
    from("${projectDir}/build/intermediates/javac/release/compileReleaseJavaWithJavac/classes/")
    into('')
    destinationDir file("${projectDir}/libs")
    exclude('BuildConfig.class', 'R.class')
    exclude{ it.name.startsWith('R$')}
}

afterEvaluate {
    tasks.withType(JavaCompile) {
        it.finalizedBy(makeStubJar)
    }
}
