Skip to content

yunair/AnnotationBox

annotationbox

license Circle CI

This is a annotation converter for android library

中文文档在 这里

Getting Start

Add annotationbox-plugin as a dependency in your main build.gradle in the root of your project:

buildscript {
    dependencies {
        classpath 'com.air:annotationbox-plugin:0.5'
    }
}

apply the plugin and assign origin annotation and target annotation to your app/build.gradle

such as below:

apply plugin: 'com.air.annotationbox'

annotationbox {
    ruleMaps = [
            "com.air.annotationbox.custom.annotations.AGET":"retrofit2.http.GET",
            "com.air.annotationbox.custom.annotations.AHeaders":"retrofit2.http.Headers",
    ]
}

Then, when you build app, you will find every annotations as ruleMaps key will convert to ruleMaps value。

This will help you encapsulate annotation.

When the third party library update version and change the annotation package name, This will help you ignore this effect.

Known Issues

There are some issues:

  1. Only support annotation in interface. So, like butterknife annotation is not support

License

AnnotationBox is under the BSD license. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published