TmT*_*ron 5 android-gradle-plugin android-jack-and-jill greenrobot-eventbus-3.0
我刚刚开始使用新的Android Jack编译器并使用 Greenrobot Eventbus.
我在一些试错后得到了它,但它似乎只能eventBusIndex在2个地方指定参数时工作- 请参阅下面的代码:
android {
defaultConfig {
javaCompileOptions {
annotationProcessorOptions {
// TODO: why must I specify eventBusIndex twice? --> also for each buildVariant
arguments = [
'eventBusIndex': "com.tmtron.dscontrol.EventBusIndex"
]
}
}
}
// this is a workaround to specify the Manifest for AndroidAnnotations
// see: https://code.google.com/p/android/issues/detail?id=210753
applicationVariants.all { variant ->
variant.variantData.variantConfiguration.javaCompileOptions.annotationProcessorOptions
.arguments = [
'eventBusIndex': "com.tmtron.dscontrol.EventBusIndex"
, 'androidManifestFile': variant.outputs[0]?.processResources?.manifestFile?.absolutePath
]
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
514 次 |
| 最近记录: |