Commit acbeaac
committed
Requested changes from review + build refactoring
~~ xa-prep-tasks ~~
The `<DownloadUri/>` MSBuild task now has an optional `HashHeader`
property:
- If set, a http HEAD request is made to the URL, and the destination
file path gets a suffix added for the value.
- To make this work properly, `DestinationFiles` is also an `[Output]`
property, since these paths could change as a result.
~~ android-toolchain ~~
Chromium's `depot_tools` are downloaded the same as all of our other
dependencies. I also updated all `<DownloadUri/>` calls to specify
`HashHeader` and `DestinationFiles` as an `<Output/>`
While implementing this, I became quite frustrated waiting on all of
the other zip files to get deleted and recreated... So I went ahead
and split up these operations into four targets:
- `_UnzipAndroidSdkItems` with `@(_AndroidSdkItemDownloads)` as inputs
- `_UnzipAndroidNdkItems` with `@(_AndroidNdkItemDownloads)` as inputs
- `_UnzipAntItems` with `@(_AntItemDownloads)` as inputs
- `_UnzipChromeItems` with `@(_ChromeItemDownloads)` as inputs
In the future, if these downloads change, *all* of the directories
won't need to be nuked and extracted again. I did this in a way so
that the existing stamp files will be preserved, so after this change
is merged, locally the build on your machine will only need to download
`depot_tools` and extract it if you have a reasonably recent
`~/android-toolchain` directory.
Other changes:
- Fixed formatting
- Removed usage of the obsolete `<CreateItem/>` MSBuild task
- `_UnzipChromeItems` also "bootstraps" `depot_tools`, and has to
set/unset `$PATH` appropriately. I did this in a similar manner as
the license acceptance for the Android SDK.
~~ r8.targets ~~
- Removed all of the `depot_tools` downloading code, and setup
`android-toolchain` as a `@(ProjectReference)`
- All targets that set `$PATH`, unset it when finished
- Use `$(_GradleArgs)` to supply `--no-daemon`
- `_CleanR8` should delete `*.jar` files in our build tree
~~ Xamarin.Android.Build.Tasks ~~
- Fixed any formatting that we noticed
- Renamed `$(AndroidD8JarPath)` and `$(AndroidR8JarPath)` to be
prefixed with `Android`
- Refactored `$(IntermediateOutputPath)_dex_stamp` stamp file in
`_CompileToDalvikWithDx` and `_CompileToDalvikWithD8` to match the
new convention of `$(_AndroidStampDirectory)_CompileToDalvik.stamp`
- `*.dex` files weren't in `FileWrites`???
- `CompileToDalvik` had a `DexOutputs` output property that was
completely unused, so I removed it. Also removed extra log messages.1 parent f1b7cad commit acbeaac
File tree
10 files changed
+225
-195
lines changed- Documentation/guides
- build-tools
- android-toolchain
- xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks
- src
- Xamarin.Android.Build.Tasks
- Tasks
- r8
10 files changed
+225
-195
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
213 | 218 | | |
214 | 219 | | |
215 | 220 | | |
| |||
406 | 411 | | |
407 | 412 | | |
408 | 413 | | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
409 | 419 | | |
410 | 420 | | |
411 | 421 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
165 | 177 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 19 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
40 | 24 | | |
41 | 25 | | |
42 | 26 | | |
43 | | - | |
44 | | - | |
| 27 | + | |
45 | 28 | | |
46 | 29 | | |
47 | | - | |
48 | | - | |
49 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
50 | 41 | | |
51 | 42 | | |
52 | 43 | | |
53 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
54 | 53 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
72 | 60 | | |
73 | 61 | | |
74 | | - | |
75 | | - | |
| 62 | + | |
| 63 | + | |
76 | 64 | | |
77 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
| 80 | + | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
84 | 95 | | |
85 | 96 | | |
86 | | - | |
87 | | - | |
| 97 | + | |
| 98 | + | |
88 | 99 | | |
89 | 100 | | |
90 | | - | |
91 | 101 | | |
92 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
93 | 132 | | |
94 | 133 | | |
95 | 134 | | |
| |||
Lines changed: 45 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 39 | | |
47 | 40 | | |
48 | 41 | | |
49 | 42 | | |
50 | 43 | | |
51 | 44 | | |
52 | | - | |
| 45 | + | |
53 | 46 | | |
54 | 47 | | |
55 | 48 | | |
56 | | - | |
| 49 | + | |
57 | 50 | | |
58 | 51 | | |
59 | 52 | | |
60 | 53 | | |
| 54 | + | |
| 55 | + | |
61 | 56 | | |
62 | 57 | | |
63 | 58 | | |
64 | | - | |
| 59 | + | |
65 | 60 | | |
66 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
68 | | - | |
| 73 | + | |
69 | 74 | | |
70 | | - | |
71 | | - | |
| 75 | + | |
| 76 | + | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
| |||
82 | 87 | | |
83 | 88 | | |
84 | 89 | | |
85 | | - | |
| 90 | + | |
86 | 91 | | |
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
91 | 117 | | |
92 | 118 | | |
93 | 119 | | |
0 commit comments