annotationprocessor and apt configure equivalent
I'm using AndroidAnnotaion
, but due to Android Studio 2.3 and Gradle 2.3.0, they said android-apt
was obsoleted. And annotationProcessor
is a new one. so, I want to know how can I configure annotationProcessor
like I do with apt
before.
If I misunderstand something, please help.
So, before...
apply plugin: 'android-apt'
dependencies {
def AAVersion = '4.2.0'
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
}
apt {
arguments {
library 'true'
}
}
and now...
dependencies {
def AAVersion = '4.2.0'
annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
}
您可以通过以下方式传递注释处理配置选项:
android {
defaultConfig {
javaCompileOptions {
annotationProcessorOptions {
arguments = ['library': 'true']
}
}
}
}
链接地址: http://www.djcxy.com/p/95344.html
上一篇: 基于对象边界框的相机控件?