Hi, I'm currently debugging some issues related to...
# caching
m
Hi, I'm currently debugging some issues related to "poisoned cache" on remote machines when performing Android Lint task. After some research, I found out that Lint is creating and using a file under
build/intermediates/lint_model/debug/debug_artifact_libraries.xml
:
Copy code
<libraries>
  <library
      name="androidx.annotation:annotation-jvm:1.6.0@jar"
      jars="/Users/marcin.laskowski/.gradle/caches/modules-2/files-2.1/androidx.annotation/annotation-jvm/1.6.0/a7257339a052df0f91433cf9651231bbb802b502/annotation-jvm-1.6.0.jar"
      resolved="androidx.annotation:annotation-jvm:1.6.0"
      provided="true"/>
  ....
</libraries>
The question is, are paths to gradle cache folder even supported in this kind of files? Can this be the root cause of poisoned cache?
additional question: is it possible to mark a task as "not relocateable"? I mean, configure a task to use cache only from local machine, but not from remote?
n
What version of AGP are you using?
and regarding the second question, the answer is no šŸ˜ž
šŸ˜ž 1
m
Android Gradle Plugin 8.2.2, Gradle 8.5
n
Do you experience the same issues with AGP 8.3.2 and Gradle 8.7?
m
Yes and no at the same time šŸ˜… so: • there is no longer any property called
jars
in the
build/intermediates/lint_model/debug/debug_artifact_libraries.xml
file
šŸŽ‰ • I've searched a little bit in other files generated by Lint, and there are still values pointing to my Gradle cache directory, for example:
Copy code
<lint-module
    format="1"
    dir="/Users/marcin.laskowski/Developer/myproject/mymodule"
    name=":mymodule"
    type="LIBRARY"
    maven="xyz:mymodule:"
    agpVersion="8.3.2"
    buildFolder="build"
    bootClassPath="/Users/marcin.laskowski/Library/Android/sdk/platforms/android-34/android.jar:/Users/marcin.laskowski/Library/Android/sdk/build-tools/34.0.0/core-lambda-stubs.jar"
    javaSourceLevel="11"
    compileTarget="android-34"
    neverShrinking="true">
  <lintOptions
      checkDependencies="true"
      abortOnError="true"
      absolutePaths="true"
      warningsAsErrors="true"
      ignoreTestSources="true"
      checkReleaseBuilds="true"
      explainIssues="true"/>
  <variant name="debug"/>
</lint-module>
the above content was generated in
build/intermediates/lint_model/debug/generateDebugLintModel/module.xml
file
Sorry, I was looking at the wrong file, those directories are still present:
Copy code
<libraries>
  <library
      name="androidx.annotation:annotation-jvm:1.6.0@jar"
      jars="/Users/marcin.laskowski/.gradle/caches/modules-2/files-2.1/androidx.annotation/annotation-jvm/1.6.0/a7257339a052df0f91435cf9651231bbb802b502/annotation-jvm-1.6.0.jar"
      resolved="androidx.annotation:annotation-jvm:1.6.0"
      provided="true"/>
...
n
Sounds like a bug then. Please file!
m
Issue already submitted: https://issuetracker.google.com/issues/230685896 Thanks for help, let's hope they fix it soon šŸ˜‰
šŸ‘ 1