GithubHelp home page GithubHelp logo

sunzxyong / apiinspect Goto Github PK

View Code? Open in Web Editor NEW
90.0 6.0 9.0 182 KB

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

License: Apache License 2.0

Java 5.20% Groovy 94.80%
gradle-plugin groovy api api-compat compat inspect check

apiinspect's Introduction

ApiInspect

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


Download Travis Hex.pm

Introduce

Usage

Installation

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'

Configuration

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

Support Gradle Plugin Version: >=2.3.3

Version

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.

About

License

Apache License

Version 2.0, January 2004
http://www.apache.org/licenses/

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

 http://www.apache.org/licenses/LICENSE-2.0

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.

apiinspect's People

Contributors

sunzxyong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

apiinspect's Issues

建议~

很nice的库,实现方案非常赞,不过有一点困惑 ~

发现检测的时候,做了一个getPackageFromBuildConfig的过滤。

这样的话,貌似不包含BuildConfig.class的jar包,里面也存在不兼容的地方就无法检测到了。

想请问下是考虑的出发点是?

或者可以添加配置选项,让用户去选择控制是否更好?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.