A gradle plugin to run log code transformation using Log Mapping Processor on a project built with Gradle.
To use log-mapping-android-gradle-plugin, you need to add the plugin classes to the build script's classpath. To do this, you use a buildscript
block. The following example shows how you might do this when the JAR containing the plugin has been published to a local repository:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'net.xdow:log-mapping-android-gradle-plugin:1.0.7'
}
}
apply plugin: 'net.xdow.logmapping'
Consequently, when gradle build
is run on your project, the source code is first rewritten by Log Mapping Processor
before compilation.
logmapping {
debug false
keywords "net.xdow.Log.debug",
"net.xdow.Log.error"
enableBuildType "debug", "release"
jobs Runtime.getRuntime().availableProcessors()
}
To compile Log Mapping Processor Android Gradle plugin, you need a Java Development Kit 1.8 (JDK8)
git clone https://github.com/eritpchy/log-mapping-processor-android-gradle-plugin
cd log-mapping-processor-android-gradle-plugin
./gradlew jar