I'm attempting to create a baseline lint file for my Android project. I've got a block set up in my main module's build.gradle:
lintOptions {
<some includes/excludes>
baseline file("lint-baseline.xml")
checkAllWarnings true
warningsAsErrors true
abortOnError false
}
I then create the baseline with ./gradlew lint<flavor/variant>
and have set up my unit test task to depend on lint.
However, this gives a baseline file that includes some absolute paths. The culprits seem to be either a) in a submodule (but only some submodules, not all), or b) in my local gradle cache. When I push the baseline to our CI, it comes up with a bunch of new warnings because the paths don't match exactly.
Some examples include:
<location
file="/Users/.../android/<submodule>/src/main/res/values/strings.xml"
line="4"
column="13"/>
<location
file="/Users/.../.gradle/caches/modules-2/files-2.1/com.google.auto.value/auto-value/1.3/4961194f62915eb45e21940537d60ac53912c57d/auto-value-1.3.jar"/>
How do I force lint to create the baseline using relative paths?