Commit 647659e
[Xamarin.Android.Build.Tasks] fix _CompileJava running too often (#2207)
Context: #2088
Context: #2129
Context: #2199
In 4deec52, I fixed the #deletebinobj problem we discovered.
However...
I introduced a regression to incremental builds, I noticed that the
`_CompileJava` target is now running on a second build with no
changes. Third build? oddly it gets skipped...
It seems to be due to our use of flag files:
1. `_UpdateAndroidResgen` updates `R.cs.flag` and uses the file as an
output
2. `_GenerateJavaDesignerForComponent` now uses `R.cs.flag` as an
input
3. `_GenerateJavaStubs` *also* updates the timestamp on `R.cs.flag`.
This was added in 970da9e, as a workaround for our two instances
of `ConvertResourcesCases`.
4. `_GenerateJavaDesignerForComponent` will now run again on the next
build.
Since 1886e6f eliminated the second call to `ConvertResourcesCases`,
we don't need to update `R.cs.flag` in no. 3 any longer.
Removing the call to `<Touch />` `R.cs.flag` in `_GenerateJavaStubs`
fixed the issue, and I added some assertions in relevant tests to
check that the `_CompileJava` and `_GenerateJavaDesignerForComponent`
targets aren't running on incremental builds.1 parent 892a700 commit 647659e
File tree
2 files changed
+16
-6
lines changed- src/Xamarin.Android.Build.Tasks
- Tests/Xamarin.Android.Build.Tests
2 files changed
+16
-6
lines changedLines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
200 | 208 | | |
201 | 209 | | |
202 | 210 | | |
| |||
318 | 326 | | |
319 | 327 | | |
320 | 328 | | |
| 329 | + | |
321 | 330 | | |
| 331 | + | |
322 | 332 | | |
323 | 333 | | |
324 | 334 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2250 | 2250 | | |
2251 | 2251 | | |
2252 | 2252 | | |
2253 | | - | |
| 2253 | + | |
2254 | 2254 | | |
2255 | 2255 | | |
2256 | 2256 | | |
| |||
0 commit comments