Skip to content

Commit 7454e6d

Browse files
authored
Merge pull request #453 from gradle/iv/update_readme_with_ksp_workaround
Updating Readme with Ksp instructions
2 parents 09899ee + e96f836 commit 7454e6d

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

Diff for: README.md

+28
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,34 @@ room {
180180
* There can only be a single schema export directory for the project - you cannot configure variant-specific export
181181
directories. Schemas exported from different variants will be merged in the directory specified in the "room" extension.
182182

183+
#### Ksp
184+
Since version 2.7.0, `RoomSchemaLocationWorkaround` supports Kotlin Symbol Processing(KSP). Like KAPT, applying the Room
185+
processor with Ksp was causing cache misses. The workaround allows you to specify an output directory for Room schema
186+
exports. The schema export directory must be configured via the "room" project extension instead of the ksp
187+
configuration:
188+
<details open>
189+
<summary>Groovy</summary>
190+
<br>
191+
192+
```groovy
193+
room {
194+
schemaLocationDir = file("roomSchemas")
195+
}
196+
```
197+
</details>
198+
<details>
199+
<summary>Kotlin</summary>
200+
<br>
201+
202+
```kotlin
203+
room {
204+
schemaLocationDir.set(file("roomSchemas"))
205+
}
206+
```
207+
</details>
208+
209+
Supported Ksp versions: 1.7.20-1.0.8+
210+
183211
### MergeNativeLibs, StripDebugSymbols, MergeJavaResources, MergeSourceSetFolders, BundleLibraryClassesJar, DataBindingMergeDependencyArtifacts, LibraryJniLibs and ZipMerging Workarounds
184212

185213
It has been observed that caching the `MergeNativeLibsTask`, `StripDebugSymbols`, `MergeSourceSetFolders`, `BundleLibraryClassesJar`, `DataBindingMergeDependencyArtifacts`, `LibraryJniLibs` and `ZipMergingTask` tasks rarely provide any significant positive avoidance savings. In fact, they frequently provide negative savings, especially when fetched from a remote cache node. As such, these workarounds disable caching for these tasks.

Diff for: release/changes.md

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
- [NEW] - `RoomSchemaLocationWorkaround` supports Ksp(#429)
12
- [NEW] - Run tests against AGP 7.4.2 and 8.1.0-alpha07

0 commit comments

Comments
 (0)