You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,20 +5,27 @@
5
5
Some Android plugin versions have issues with Gradle's build cache feature. When applied to an Android project this plugin applies workarounds for these issues based on the Android plugin and Gradle versions.
We only test against the latest patch versions of each minor version of Android Gradle Plugin. This means that although it may work perfectly well with an older patch version (say 3.6.2), we do not test against these older patch versions, so the latest patch version is the only version from that minor release that we technically support.
12
12
13
+
## Should I use this?
14
+
Take a look at the [list of issues](#list-of-issues) especially [unresolved issues](#unresolved-issues). If any of these apply to your project, you can use this plugin to solve them.
15
+
16
+
## How can I discover issues?
17
+
You can discover issues by using the task input comparison tool in Gradle Enterprise. More information about [how to diagnose cache misses here](https://docs.gradle.com/enterprise/tutorials/task-inputs-comparison/). You can compare the inputs of a build that seeds the build cache - typically CI - with a build that consumes from the build cache like a local developer build.
18
+
If you discover an issue related to the Android Gradle Plugin, please file an issue in the [Android Bug Tracker](https://source.android.com/setup/contribute/report-bugs). You can also file an [issue here](https://github.com/gradle/android-cache-fix-gradle-plugin/issues) and we can see if a workaround is possible.
19
+
13
20
## Applying the plugin
14
21
15
22
This plugin should be applied anywhere the `com.android.application` or `com.android.library` plugins are applied. Typically,
16
-
this can just be injected from the root project's build.gradle (change '1.0.9' to the latest version of the cache fix plugin
23
+
this can just be injected from the root project's build.gradle (change '1.0.10' to the latest version of the cache fix plugin
id "org.gradle.android.cache-fix" version "1.0.9" apply false
28
+
id "org.gradle.android.cache-fix" version "1.0.10" apply false
22
29
}
23
30
24
31
subprojects {
@@ -39,3 +46,14 @@ static class AndroidJavaCompile_BootClasspath_Workaround implements Workaround {
39
46
// ...
40
47
}
41
48
```
49
+
50
+
### Unresolved Issues
51
+
52
+
The following caching issues are fixed by the cache fix plugin but unresolved in any current or upcoming preview release of the Android Gradle Plugin as of 21.08.2020.
53
+
54
+
Please star them if you are experiencing them in your project.
55
+
56
+
* CompileLibraryResourcesTask is not relocatable: https://issuetracker.google.com/issues/155218379
57
+
* DexFileDependenciesTask is not cacheable: https://issuetracker.google.com/160138798
58
+
* MergeResources is not relocatable: https://issuetracker.google.com/issues/141301405
0 commit comments