Commit cfa9388
ref(snapshot): Use AGP addGeneratedSourceDirectory API (#1117)
* ref(snapshot): Use AGP addGeneratedSourceDirectory API
Replace manual source set wiring and regex-based task dependency
matching with the proper AGP `addGeneratedSourceDirectory` API.
This lets AGP handle the source directory registration and task
dependency setup automatically per variant.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(snapshot): Use per-variant task and java sources API
The previous approach used a single task and `sources.kotlin` which is
broken in AGP (https://issuetracker.google.com/issues/268248348).
Switch to `sources.java` and register a per-variant task so each
variant's unit test compilation gets its own generated source directory.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ref(snapshot): Apply spotless formatting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(snapshot): Use per-variant output directory
Each variant's task was writing to the same output path, causing
overlapping-output errors and build cache corruption.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(snapshot): Use AGP 9.0 hostTests API for source registration
AGP 9.0 deprecated `variant.unitTest` in favor of `variant.hostTests`.
Use the new API when running on AGP 9.0+ while keeping the old path
for older versions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(snapshot): Suppress deprecation error for unitTest on older AGP
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ref(snapshot): Apply spotless formatting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Release: 6.2.0
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 771e6b7 commit cfa9388
File tree
3 files changed
+37
-11
lines changed- plugin-build/src/main/kotlin/io/sentry/android/gradle
- snapshot
- util
3 files changed
+37
-11
lines changedLines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| |||
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
55 | | - | |
| 58 | + | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | | - | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| |||
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
68 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
69 | 75 | | |
70 | 76 | | |
71 | 77 | | |
| |||
Lines changed: 25 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
| |||
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
20 | | - | |
21 | | - | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
34 | 51 | | |
35 | 52 | | |
36 | 53 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
0 commit comments