Backport new android api calls to support lib versions.
The support lib provideds many useful wrappers and backports of android apis. However, using them requires
you to change your code. And as you bump your min sdk, you need to change them back to the platform versions.
This plugin will automatically rewrite calls to their support lib equivlents when necssary. The NewApi
lint
is replaced with a custom lint which will ignore successfully backported calls.
Currently requires android gradle plugin 3.0.0-alpha3
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "me.tatarka.silentsupport:silent-support-gradle-plugin:0.4"
}
}
apply plugin: 'me.tatarka.silent-support'
Right now only calls that can be converted from foo.bar(baz)
to FooCompat.bar(foo, baz)
are supported.