Skip to content

Commit d16a7d5

Browse files
committed
Add some verbage to the README about the Room workaround
1 parent 06a12dd commit d16a7d5

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,25 @@ Please star them if you are experiencing them in your project.
5858
* DexFileDependenciesTask is not cacheable: https://issuetracker.google.com/160138798
5959
* MergeResources is not relocatable: https://issuetracker.google.com/issues/141301405
6060
* Room annotation processor causes cache misses, doesn't declare outputs, overlapping outputs, etc: https://issuetracker.google.com/issues/132245929
61+
62+
## Implementation Notes
63+
64+
### RoomSchemaLocationWorkaround
65+
66+
Most of the workarounds in this plugin should apply to your project without any changes. However, one workaround
67+
requires some extra configuration. The Room schema location workaround allows you to specify an output directory for
68+
Room schema exports without breaking caching for your Java and/or Kapt tasks where the annotation processor has been configured.
69+
There are various issues with how this annotation processor works (see https://issuetracker.google.com/issues/132245929
70+
and https://issuetracker.google.com/issues/139438151) which this workaround attempts to mitigate. However, in order to
71+
do so in a manageable way, it imposes some restrictions:
72+
73+
* The schema export directory must be configured via the "room" project extension instead of as an explicit annotation
74+
processor argument. If an explicit annotation processor argument is provided, an exception will be thrown, instructing
75+
the user to configure it via the extension:
76+
```
77+
room {
78+
schemaLocationDir = file("roomSchemas")
79+
}
80+
```
81+
* There can only be a single schema export directory for the project - you cannot configure variant-specific export
82+
directories. Schemas exported from different variants will be merged in the directory specified in the "room" extension.

0 commit comments

Comments
 (0)