Commit b07a0c9
authored
[Xamarin.Android.Build.Tasks] %(AndroidMavenLibrary.ArtifactFilename) (#9479)
Fixes: #9465
Context: 3659766
In all of the examples we used when developing and testing
`@(AndroidMavenLibrary)` (3659766), the Maven artifact filename
followed the pattern `{artifact.Id}-{artifact.Version}.[jar|aar]`,
so this is the default filename we construct for the user.
However, there exist some packages like React that do not follow this
pattern and instead do e.g.: `react-android-0.76.0-release.aar`.
Attempting to use `@(AndroidMavenLibrary)` for React produces the
following error:
error XA4236: Cannot download Maven artifact 'com.facebook.react:react-android'.
error XA4236: - react-android-0.76.0.jar: Response status code does not indicate success: 404 (Not Found).
error XA4236: - react-android-0.76.0.aar: Response status code does not indicate success: 404 (Not Found).
To support these cases, add a new optional `%(ArtifactFilename)`
item metadata that can be specified to override the Maven filename of
the artifact:
<AndroidMavenLibrary
Include="com.facebook.react:react-android"
Version="0.76.0"
ArtifactFilename="react-android-0.76.0-release.aar"
/>
This allows our tasks to properly download the artifact and avoid
the error.1 parent 38e8857 commit b07a0c9
File tree
6 files changed
+74
-29
lines changed- src/Xamarin.Android.Build.Tasks
- Properties
- Tasks
- Tests/Xamarin.Android.Build.Tests/Tasks
- Utilities
6 files changed
+74
-29
lines changedLines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
977 | 977 | | |
978 | 978 | | |
979 | 979 | | |
980 | | - | |
981 | | - | |
| 980 | + | |
982 | 981 | | |
983 | 982 | | |
984 | 983 | | |
985 | | - | |
986 | | - | |
987 | | - | |
988 | | - | |
| 984 | + | |
989 | 985 | | |
990 | 986 | | |
991 | 987 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
90 | 93 | | |
91 | | - | |
| 94 | + | |
92 | 95 | | |
93 | 96 | | |
94 | 97 | | |
| |||
Lines changed: 33 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
174 | 204 | | |
175 | 205 | | |
176 | 206 | | |
177 | 207 | | |
178 | 208 | | |
179 | 209 | | |
180 | 210 | | |
| 211 | + | |
| 212 | + | |
181 | 213 | | |
182 | 214 | | |
183 | 215 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
Lines changed: 31 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
133 | | - | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | | - | |
140 | | - | |
141 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
142 | 148 | | |
143 | 149 | | |
144 | | - | |
145 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
146 | 154 | | |
147 | | - | |
148 | | - | |
| 155 | + | |
| 156 | + | |
149 | 157 | | |
150 | | - | |
151 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
152 | 161 | | |
153 | | - | |
154 | | - | |
| 162 | + | |
| 163 | + | |
155 | 164 | | |
156 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
157 | 172 | | |
158 | 173 | | |
159 | 174 | | |
160 | 175 | | |
161 | 176 | | |
162 | 177 | | |
163 | 178 | | |
164 | | - | |
165 | | - | |
166 | 179 | | |
167 | | - | |
| 180 | + | |
168 | 181 | | |
169 | 182 | | |
170 | 183 | | |
171 | | - | |
| 184 | + | |
172 | 185 | | |
173 | 186 | | |
174 | 187 | | |
| |||
0 commit comments