CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 02:48:41 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/dotnet/android.git
etag: W/"b1bed34dbf6254089596eeb10b176df2"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=EJ5PDJkH64hOfZghVpPv4jWLWjblBbOqGBdDRsS2%2FgMOYoAcVMNdqDaQNUVCkCqvaN9a5t9J2P08J%2FpKYA52sM553LSNCxkef7klWFkSPWMb4D0XL%2By45QfA%2ByGiqzYUaufOcmWbpXwsaPmHe%2FGy8BEqNhwYAlD%2BARbFf0xBx%2B995zZ99xNhvsUo82VK76vZnDMqF84tlDVKY%2BjKbPeXaJG4LOyeaplypOyV1qrquBDiGNdgV%2B3xdtpNTrZJ6g6IwclmiLHAOOe5y%2Bwqy3Vmqw%3D%3D--xyhRbzczsyL%2FqZel--dZr0TRupzlpIxuSJ9hTqvw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1601403373.1753584520; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 02:48:40 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 02:48:40 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: B56A:E3CB6:52B74F:6FE01D:68859388
[Xamarin.Android.Build.Tasks] Run `aapt2 compile` incrementally (#4190) · dotnet/android@0d6fd83 · GitHub
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt.targets
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt2.targets
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 555
Commit 0d6fd83
authored
[Xamarin.Android.Build.Tasks] Run
The `aapt2 compile` command runs in two modes. The one we currently
use is the `archive` mode: we call `aapt2 compile` with the `--dir`
argument tp gemerate one `.flata` archive for all the files. The
side effect of this is that even if you only change one file, it will
need to regenerate the entire `.flata` archive.
There is a second mode: rather than using `--dir` you just send in a
single file. This then writes a single `.flat` file to the output
directory. While this does mean you have to call `aapt2 compile` for
*every* file, it does mean we can leverage MSBuild's support for
partial targets. This means MSBuild will detect *only* the files
which changed and allow us to call `aapt2 compile` with just the
modified files.
One exception to this new system are references which use the
`%(AndroidSkipResourceProcessing)` metadata. In those cases the
chance of those libraries being updated on a regular basis is quite
low, so in that case using a `flata` archive will be better since the
files won't be changing often.
While this may impact initial build times, the goal is to make
incremental builds quicker. This is especially true for users which
use *lots* of `@(AndroidResource)` items.
A note regarding the `aapt2 daemon` mode: in order to write accented
characters we need to set the `Process.StandardInput` encoding to
UTF-8. This is not possible directly in .NET Standard 2.0. We have
to instead use `Console.InputEncoding`. Also note that we *cannot*
include a BOM when writing the commands. This is because `aapt2` will
try to parse the BOM as command characters.
Finally, the `aapt2 link` command sometimes reports it is "Done"
before it has even written the archive for the file. We can get into
a position where we think we are done but the file is not on disk.
Work around this by including a nasty wait which will poll for the
existence of the expected output file and only return when it exists.
The good news is we know at this point if the command failed or not,
so we can bypass the check on failure.
By using incremental builds, we improve incremental build times:
| Test | Latest Stable | Aapt2 Daemon |
|--------------|---------------|--------------|
| From Clean | 00:00:27.92 | 00:00:27.41 |
| No Changes | 00:00:03.14 | 00:00:03.72 |
| Alter Layout | 00:00:16.37 | 00:00:05.53 |
Note that **Alter Layout** with Aapt2 Daemon runs in 34% of the time.aapt2 compile
incrementally (#4190)1 parent e2854ee commit 0d6fd83Copy full SHA for 0d6fd83
File tree
Expand file treeCollapse file tree
27 files changed
+1238
-305
lines changedFilter options
- .vscode
- src
- Xamarin.Android.Build.Tasks
- MSBuild/Xamarin/Android
- Tasks
- Tests
- Xamarin.Android.Build.Tests
- Tasks
- Utilities
- Xamarin.ProjectTools/Android
- Utilities
- aapt2
- tests
- MSBuildDeviceIntegration/Tests
- msbuild-times-reference
Expand file treeCollapse file tree
27 files changed
+1238
-305
lines changed+2-1Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
| 7 | + | |
| 8 | + | |
8 | 9 |
|
src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt.targets
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt.targets+14-1Lines changed: 14 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
19 | 32 |
| |
20 | 33 |
| |
21 | 34 |
| |
| |||
91 | 104 |
| |
92 | 105 |
| |
93 | 106 |
| |
94 |
| - | |
| 107 | + |
src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt2.targets
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt2.targets+88-83Lines changed: 88 additions & 83 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
20 | 44 |
| |
21 | 45 |
| |
22 | 46 |
| |
| |||
37 | 61 |
| |
38 | 62 |
| |
39 | 63 |
| |
40 |
| - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
41 | 67 |
| |
42 | 68 |
| |
43 | 69 |
| |
| |||
54 | 80 |
| |
55 | 81 |
| |
56 | 82 |
| |
| 83 | + | |
| 84 | + | |
57 | 85 |
| |
58 |
| - | |
59 |
| - | |
60 |
| - | |
61 |
| - | |
62 |
| - | |
63 |
| - | |
64 |
| - | |
65 |
| - | |
66 |
| - | |
67 |
| - | |
68 |
| - | |
69 |
| - | |
70 |
| - | |
71 |
| - | |
72 |
| - | |
73 |
| - | |
74 |
| - | |
75 |
| - | |
76 |
| - | |
77 |
| - | |
78 |
| - | |
79 |
| - | |
80 |
| - | |
81 |
| - | |
82 |
| - | |
83 |
| - | |
84 |
| - | |
85 |
| - | |
86 |
| - | |
87 |
| - | |
88 |
| - | |
89 |
| - | |
90 |
| - | |
91 |
| - | |
92 |
| - | |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 |
| - | |
97 |
| - | |
98 |
| - | |
99 |
| - | |
100 |
| - | |
101 |
| - | |
102 |
| - | |
103 |
| - | |
104 |
| - | |
105 |
| - | |
106 |
| - | |
107 |
| - | |
108 |
| - | |
109 |
| - | |
110 | 86 |
| |
111 | 87 |
| |
112 | 88 |
| |
113 | 89 |
| |
114 |
| - | |
| 90 | + | |
115 | 91 |
| |
116 |
| - | |
| 92 | + | |
117 | 93 |
| |
118 | 94 |
| |
| 95 | + | |
119 | 96 |
| |
120 | 97 |
| |
121 | 98 |
| |
| |||
128 | 105 |
| |
129 | 106 |
| |
130 | 107 |
| |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
131 | 118 |
| |
132 |
| - | |
133 |
| - | |
134 |
| - | |
135 |
| - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
136 | 123 |
| |
137 | 124 |
| |
138 | 125 |
| |
| 126 | + | |
| 127 | + | |
139 | 128 |
| |
| 129 | + | |
140 | 130 |
| |
| 131 | + | |
141 | 132 |
| |
142 | 133 |
| |
143 | 134 |
| |
144 | 135 |
| |
145 | 136 |
| |
146 |
| - | |
147 |
| - | |
148 |
| - | |
149 |
| - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
150 | 152 |
| |
151 | 153 |
| |
152 | 154 |
| |
153 |
| - | |
| 155 | + | |
| 156 | + | |
154 | 157 |
| |
155 | 158 |
| |
156 | 159 |
| |
157 | 160 |
| |
158 | 161 |
| |
159 | 162 |
| |
160 | 163 |
| |
| 164 | + | |
| 165 | + | |
161 | 166 |
| |
162 | 167 |
| |
163 | 168 |
| |
| |||
168 | 173 |
| |
169 | 174 |
| |
170 | 175 |
| |
171 |
| - | |
| 176 | + | |
172 | 177 |
| |
173 |
| - | |
174 |
| - | |
| 178 | + | |
175 | 179 |
| |
176 | 180 |
| |
177 | 181 |
| |
| |||
192 | 196 |
| |
193 | 197 |
| |
194 | 198 |
| |
195 |
| - | |
196 |
| - | |
197 |
| - | |
198 |
| - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
199 | 202 |
| |
200 |
| - | |
| 203 | + | |
201 | 204 |
| |
202 |
| - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
203 | 209 |
| |
| 210 | + | |
204 | 211 |
| |
205 | 212 |
| |
206 | 213 |
| |
207 |
| - | |
| 214 | + | |
208 | 215 |
| |
209 |
| - | |
210 |
| - | |
211 |
| - | |
212 |
| - | |
213 |
| - | |
| 216 | + | |
214 | 217 |
| |
215 | 218 |
| |
216 | 219 |
| |
217 |
| - | |
| 220 | + | |
| 221 | + | |
218 | 222 |
| |
219 | 223 |
| |
220 | 224 |
| |
221 | 225 |
| |
222 | 226 |
| |
223 | 227 |
| |
224 |
| - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
225 | 231 |
| |
226 | 232 |
| |
227 | 233 |
| |
228 | 234 |
| |
229 | 235 |
| |
230 | 236 |
| |
231 | 237 |
| |
232 |
| - | |
233 |
| - | |
| 238 | + | |
234 | 239 |
| |
235 | 240 |
| |
236 | 241 |
| |
|
You can’t perform that action at this time.
0 commit comments