An api compatibility inspect gradle plugin.(一个Api兼容性检测的Gradle插件)

Download Travis Hex.pm




Add dependencies in build.gradle of the **root project**:

    dependencies {
        // ...
        classpath('com.zxy.android.plugin:api-inspect:1.2.0') {
            exclude group: 'com.android.tools.build', module: 'gradle'

and add the apply plugin to build.gradle in the module:

apply plugin: 'api.inspect'


By default, ApiInspect will inspects all apis but does not contain the system api. Of course, you can also customize exclude or include Settings:

apiInspect {

    enable true //Whether api inspect is enabled.

    inspectSystemApi false //Whether to inspect the system api.

    //Specify the library to inspect.
//    include {
//        //Value is the package name.
//        api "com.zxy.tiny"
//    }

    //Specify the library not to inspect.
//    exclude {
//        //Value is the package name.
//        api 'com.zxy.tiny'
//        api 'com.google.zxing'
//    }


Inspect Result

When the Apk build is completed. The results of the inspection will be printed on the console:

Of course, The results of the inspection will also be stored in the api-inspect directory:


Support Gradle Plugin Version: >=2.3.3


Version control supports the semantic 2.0 protocol

  • 1.0.0:First version, support api compatibility inspect.
  • 1.1.0:Optimization logic.
  • 1.2.0:Optimization of the library plugin.



Apache License

Version 2.0, January 2004

Copyright 2018 郑晓勇

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


An api compatibility inspect gradle plugin.(一个Api兼容性检测的Gradle插件)

APIinspect Info

⭐ Stars 85
🔗 Source Code github.com
🕒 Last Update 8 months ago
🕒 Created 4 years ago
🐞 Open Issues 0
➗ Star-Issue Ratio Infinity
😎 Author Sunzxyong