import com.android.builder.core.BuilderConstants

apply plugin: 'com.android.library'

android {
    compileSdkVersion 28
    // Only build the release variant
    variantFilter { variant ->
        if (variant.buildType.name != BuilderConstants.RELEASE) {
            variant.ignore = true
        }
    }
}

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

makeStubJar.dependsOn(build)
