我在Android Studio项目中的纯java模块中使用Lombok。这是模块的build.gradle:
apply plugin: 'java'
apply plugin: 'war'
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
providedCompile "org.projectlombok:lombok:1.12.6"
testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:1.7.0'
compile 'com.google.code.gson:gson:2.7'
}
然而,当我构建我的android模块时,生成的APK具有来自lombok的这些方法计数,而它应该没有。
lombok: 4099
bytecode: 85
core: 308
debug: 18
handlers: 8
runtimeDependencies: 15
delombok: 253
ant: 22
eclipse: 820
agent: 223
handlers: 387
experimental: 16
extern: 6
apachecommons: 1
java: 1
log4j: 2
slf4j: 2
installer: 286
eclipse: 109
javac: 970
apt: 132
handlers: 317
java6: 24
java7: 24
java8: 26
libs: 996
com: 61
zwitserloot: 61
cmdreader: 61
org: 935
objectweb: 935
asm: 935
commons: 405
signature: 41
tree: 199
patcher: 316
equinox: 18
inject: 7
scripts: 150
这有什么问题吗?lombok,我如何使用providedCompile
或Android / Gradle构建系统的东西?