Граф коммитов

17052 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge c9679da3da
[msbuild] Disable certain .NET behaviors we don't need when doing stuff on a remote Mac. (#19961)
* We don't need the .NET logo (nor any welcome messages), since this is
  entirely done in the background.
* We don't need workload updates either.
2024-01-31 07:48:01 +01:00
Rolf Bjarne Kvinge 5354909752
[xharness] Serialize builds. (#19960)
NuGet isn't parallel-safe, and building any project (in .NET at least) may end
up using NuGet, so just disable parallel building.

This will hopefully fix numerous random build failures on the bots due to
NuGet running into concurrency problems.

Note that test execution is still parallelized.
2024-01-30 17:10:01 +01:00
Rolf Bjarne Kvinge 4857d14a85
[AudioToolbox] Make P/Invokes in AudioFormat.cs have blittable signatures. (#19954)
Contributes towards #15684.
2024-01-30 14:32:42 +01:00
Rolf Bjarne Kvinge 8e516381c3
[AudioToolbox] Fix computing array size. (#19952)
When resizing an array to a certain number of elements, we need to compute the
number of elements and use that to resize the array (and not use the size of
each element as the number of elements).

We also need to recompute the number of elements after calling the P/Invoke
(which may have changed the total size) - otherwise resizing the array is
entirely redundant (because the number of elements wouldn't change).
2024-01-30 14:26:20 +01:00
Rolf Bjarne Kvinge e9ae5ef996
[msbuild] Process custom entitlements as if they came from an Entitlements.plist file. (#19942)
We need to process custom entitlements just like if they came from an
Entitlements.plist file - which means replacing terms such as
`$(AppIdentifierPrefix)` and `$(TeamIdentifierPrefix)` with their
correct value
depending on the provisioning profile.

Partial fix for https://github.com/xamarin/xamarin-macios/issues/19903.
2024-01-30 08:39:22 +01:00
Rolf Bjarne Kvinge 1279d54121
[msbuild] Merge the Archive[TaskBase] classes. (#19949) 2024-01-29 21:58:06 +01:00
Rolf Bjarne Kvinge fc7688cf8d
[dotnet] Fix typo causing universal builds to not keep any symbols when stripped. Fixes #19860. (#19900)
Fixes https://github.com/xamarin/xamarin-macios/issues/19860.
2024-01-29 20:19:11 +01:00
Manuel de la Pena 6f8cfc8354
[CI] Only upload when we have a warning or a success. (#19938)
When we have a warning we get a different error result. What we want to
do is continure when we succeed and when we have a warning.
2024-01-29 14:12:58 -05:00
Rolf Bjarne Kvinge 7b5735d844
[msbuild] Merge the WriteItemsToFile[TaskBase] classes. (#19931) 2024-01-29 18:50:43 +01:00
Rolf Bjarne Kvinge 066ae81a60
[msbuild] Merge the Zip[TaskBase] classes. (#19932) 2024-01-29 18:50:32 +01:00
Rolf Bjarne Kvinge d1992920a4
[msbuild] Remove usage of GitInfo in Xamarin.Messaging.Build. (#19935)
* The calculation GitInfo does is horribly wrong for us - it seems to pick a
  tag the most recent tag and parse it to pick out a version number:
	* This means for any given release it'll use the previous tag - because we
	  don't necessarily tag until after the release build has been committed.
	* It's not a stable version: a build is made (finding one tag), a new tag
	  is pushed, and if the same commit is built, it may find the new tag,
	  thus creating a new version number.
	* We may have multiple tags for any given commit.
	* The version calculation is also wrong: right now it finds the tag
	  `xamarin-ios-15.5.0.5-4407-gd45f4e90a6`, and comes up with the version
	  number 0.5.0.4407.
* I didn't investigate deeply, but GitInfo also touches .git/index and
  .git/HEAD somehow, which causes us to rebuild stuff.
* We already have an established way of calculating version numbers and other
  build related information, so use that after extending it a bit.
2024-01-29 18:50:16 +01:00
Rolf Bjarne Kvinge 15c2d80e56
[msbuild] Explicitly exclude any GitInfo package references we've pulled in. (#19937)
This is required to avoid GitInfo until these two PRs have been merged
and flowed to us:

* https://github.com/xamarin/XamarinVS/pull/14408
* https://github.com/xamarin/Xamarin.Messaging/pull/700

See also #19935.
2024-01-29 18:49:50 +01:00
dependabot[bot] 1234c1aa84
Bump peter-evans/repository-dispatch from 2 to 3 (#19948)
Bumps
[peter-evans/repository-dispatch](https://github.com/peter-evans/repository-dispatch)
from 2 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/peter-evans/repository-dispatch/releases">peter-evans/repository-dispatch's
releases</a>.</em></p>
<blockquote>
<h2>Repository Dispatch v3.0.0</h2>
<p>⚙️  Updated runtime to Node.js 20</p>
<ul>
<li>The action now requires a minimum version of <a
href="https://github.com/actions/runner/releases/tag/v2.308.0">v2.308.0</a>
for the Actions runner. Update self-hosted runners to v2.308.0 or later
to ensure compatibility.</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>Bump prettier to fix deps by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/255">peter-evans/repository-dispatch#255</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.17.12 to
18.17.14 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/257">peter-evans/repository-dispatch#257</a></li>
<li>build(deps-dev): bump <code>@​vercel/ncc</code> from 0.36.1 to
0.38.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/258">peter-evans/repository-dispatch#258</a></li>
<li>build(deps): bump actions/checkout from 3 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/259">peter-evans/repository-dispatch#259</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.17.14 to
18.17.16 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/261">peter-evans/repository-dispatch#261</a></li>
<li>build(deps): bump <code>@​actions/core</code> from 1.10.0 to 1.10.1
by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>
in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/262">peter-evans/repository-dispatch#262</a></li>
<li>build(deps-dev): bump jest-circus from 29.6.4 to 29.7.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/263">peter-evans/repository-dispatch#263</a></li>
<li>build(deps-dev): bump eslint from 8.48.0 to 8.49.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/264">peter-evans/repository-dispatch#264</a></li>
<li>Update distribution by <a
href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in
<a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/265">peter-evans/repository-dispatch#265</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.17.16 to
18.17.18 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/266">peter-evans/repository-dispatch#266</a></li>
<li>build(deps-dev): bump eslint-plugin-github from 4.10.0 to 4.10.1 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/267">peter-evans/repository-dispatch#267</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.17.18 to
18.18.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/268">peter-evans/repository-dispatch#268</a></li>
<li>build(deps-dev): bump eslint from 8.49.0 to 8.50.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/269">peter-evans/repository-dispatch#269</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.18.0 to
18.18.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/271">peter-evans/repository-dispatch#271</a></li>
<li>build(deps-dev): bump eslint-plugin-prettier from 5.0.0 to 5.0.1 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/275">peter-evans/repository-dispatch#275</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.18.3 to
18.18.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/274">peter-evans/repository-dispatch#274</a></li>
<li>build(deps-dev): bump eslint from 8.50.0 to 8.51.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/276">peter-evans/repository-dispatch#276</a></li>
<li>build(deps-dev): bump <code>@​babel/traverse</code> from 7.16.3 to
7.23.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/278">peter-evans/repository-dispatch#278</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.18.5 to
18.18.6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/279">peter-evans/repository-dispatch#279</a></li>
<li>build(deps-dev): bump <code>@​vercel/ncc</code> from 0.38.0 to
0.38.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/280">peter-evans/repository-dispatch#280</a></li>
<li>build(deps-dev): bump eslint from 8.51.0 to 8.52.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/281">peter-evans/repository-dispatch#281</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.18.6 to
18.18.7 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/282">peter-evans/repository-dispatch#282</a></li>
<li>build(deps): bump actions/setup-node from 3 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/283">peter-evans/repository-dispatch#283</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.18.7 to
18.18.8 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/284">peter-evans/repository-dispatch#284</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.18.8 to
18.18.9 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/285">peter-evans/repository-dispatch#285</a></li>
<li>build(deps-dev): bump eslint from 8.52.0 to 8.53.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/286">peter-evans/repository-dispatch#286</a></li>
<li>build(deps-dev): bump prettier from 3.0.3 to 3.1.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/287">peter-evans/repository-dispatch#287</a></li>
<li>build(deps-dev): bump eslint from 8.53.0 to 8.54.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/289">peter-evans/repository-dispatch#289</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.18.9 to
18.18.13 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/290">peter-evans/repository-dispatch#290</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.18.13 to
18.19.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/291">peter-evans/repository-dispatch#291</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.0 to
18.19.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/292">peter-evans/repository-dispatch#292</a></li>
<li>build(deps-dev): bump eslint from 8.54.0 to 8.55.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/293">peter-evans/repository-dispatch#293</a></li>
<li>build(deps-dev): bump prettier from 3.1.0 to 3.1.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/296">peter-evans/repository-dispatch#296</a></li>
<li>build(deps): bump actions/upload-artifact from 3 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/295">peter-evans/repository-dispatch#295</a></li>
<li>build(deps-dev): bump eslint from 8.55.0 to 8.56.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/297">peter-evans/repository-dispatch#297</a></li>
<li>build(deps-dev): bump eslint-plugin-prettier from 5.0.1 to 5.1.1 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/298">peter-evans/repository-dispatch#298</a></li>
<li>build(deps-dev): bump eslint-plugin-prettier from 5.1.1 to 5.1.2 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/299">peter-evans/repository-dispatch#299</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.3 to
18.19.4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/300">peter-evans/repository-dispatch#300</a></li>
<li>build(deps-dev): bump eslint-plugin-prettier from 5.1.2 to 5.1.3 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/301">peter-evans/repository-dispatch#301</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.4 to
18.19.6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/302">peter-evans/repository-dispatch#302</a></li>
<li>build(deps-dev): bump prettier from 3.1.1 to 3.2.4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/303">peter-evans/repository-dispatch#303</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.6 to
18.19.8 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/304">peter-evans/repository-dispatch#304</a></li>
<li>feat: update runtime to node 20 by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/repository-dispatch/pull/305">peter-evans/repository-dispatch#305</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ff45666b94"><code>ff45666</code></a>
feat: update runtime to node 20 (<a
href="https://redirect.github.com/peter-evans/repository-dispatch/issues/305">#305</a>)</li>
<li><a
href="a4a90276d0"><code>a4a9027</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.6 to 18.19.8
(<a
href="https://redirect.github.com/peter-evans/repository-dispatch/issues/304">#304</a>)</li>
<li><a
href="2605253283"><code>2605253</code></a>
build(deps-dev): bump prettier from 3.1.1 to 3.2.4 (<a
href="https://redirect.github.com/peter-evans/repository-dispatch/issues/303">#303</a>)</li>
<li><a
href="ab3258eeef"><code>ab3258e</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.4 to 18.19.6
(<a
href="https://redirect.github.com/peter-evans/repository-dispatch/issues/302">#302</a>)</li>
<li><a
href="240bc73193"><code>240bc73</code></a>
build(deps-dev): bump eslint-plugin-prettier from 5.1.2 to 5.1.3 (<a
href="https://redirect.github.com/peter-evans/repository-dispatch/issues/301">#301</a>)</li>
<li><a
href="8aa15c54a0"><code>8aa15c5</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.3 to 18.19.4
(<a
href="https://redirect.github.com/peter-evans/repository-dispatch/issues/300">#300</a>)</li>
<li><a
href="22aa07cf23"><code>22aa07c</code></a>
build(deps-dev): bump eslint-plugin-prettier from 5.1.1 to 5.1.2 (<a
href="https://redirect.github.com/peter-evans/repository-dispatch/issues/299">#299</a>)</li>
<li><a
href="ba0298574b"><code>ba02985</code></a>
build(deps-dev): bump eslint-plugin-prettier from 5.0.1 to 5.1.1 (<a
href="https://redirect.github.com/peter-evans/repository-dispatch/issues/298">#298</a>)</li>
<li><a
href="accfd7b5bf"><code>accfd7b</code></a>
build(deps-dev): bump eslint from 8.55.0 to 8.56.0 (<a
href="https://redirect.github.com/peter-evans/repository-dispatch/issues/297">#297</a>)</li>
<li><a
href="3c7d964ae9"><code>3c7d964</code></a>
build(deps): bump actions/upload-artifact from 3 to 4 (<a
href="https://redirect.github.com/peter-evans/repository-dispatch/issues/295">#295</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/peter-evans/repository-dispatch/compare/v2...v3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=peter-evans/repository-dispatch&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-29 12:41:49 -05:00
Rolf Bjarne Kvinge c490268880
[AudioToolbox] Make P/Invokes in AudioQueue.cs have blittable signatures. (#19933)
Contributes towards #15684.
2024-01-29 09:24:05 +01:00
Rolf Bjarne Kvinge 343aab8b8f
[Foundation] Create a strong dictionary for NSAttributedStringDocumentAttributeKey. (#19824) 2024-01-29 09:23:29 +01:00
Rolf Bjarne Kvinge ff516d1732
[tests] Add infrastructure to run tests on Windows that need a remote Mac. Fixes #13924. (#19927)
Also add a single test that builds a simple project remotely.

This PR might be best reviewed commit-by-commit.

Fixes https://github.com/xamarin/xamarin-macios/issues/13924.
2024-01-29 09:21:41 +01:00
Rolf Bjarne Kvinge 3422bea551
[tests] Add the ability to automatically update known failures in cecil-tests. (#19884)
Add the ability to automatically update the source code for known
failures in cecil-tests if a specific environment variable is set.
2024-01-29 09:20:12 +01:00
Rolf Bjarne Kvinge 9115b35230
[msbuild] Merge the WriteAppManifest[TaskBase] classes. (#19921) 2024-01-29 09:19:33 +01:00
Rolf Bjarne Kvinge a0b92cf767
[msbuild] Correctly add custom entitlements to the archived entitlements. (#19920)
Otherwise custom entitlements won't end up in the archived entitlements
(as they should, just as if they were provided in an Entitlements.plist file).

Partial fix for https://github.com/xamarin/xamarin-macios/issues/19903.
2024-01-29 09:15:09 +01:00
Rolf Bjarne Kvinge c548f80a4d
[AudioToolbox] Make P/Invokes in AudioFileGlobalInfo.cs have blittable signatures. (#19906)
Contributes towards #15684.
2024-01-26 16:28:53 +01:00
Rolf Bjarne Kvinge f8b997d387
[msbuild] Merge the SmartCopy[TaskBase] classes. (#19904) 2024-01-26 15:53:58 +01:00
Rolf Bjarne Kvinge a06726acd9
[msbuild] Take the CustomEntitlements item group into account in DetectSigningIdentity. (#19919)
Take the CustomEntitlements item group into account in DetectSigningIdentity
when determining whether the app has entitlements (and would thus require a
provisioning profile).

Partial fix for https://github.com/xamarin/xamarin-macios/issues/19903.
2024-01-26 15:52:54 +01:00
Rolf Bjarne Kvinge a80afad774
[tests] Build the msbuild tests with .NET. (#19918)
We already build the msbuild solution with .NET, so this is just playing
catchup.
2024-01-26 15:50:45 +01:00
Rolf Bjarne Kvinge a547115148
[msbuild] Merge the WriteAssetPackManifest[TaskBase] classes. (#19928) 2024-01-26 15:49:00 +01:00
Rolf Bjarne Kvinge 8785a129ef
[AudioToolbox] Sprinkle DynamicallyAccessedMembers attributes to fix ILC trimmer warnings. (#19913) 2024-01-26 08:29:18 +01:00
Rolf Bjarne Kvinge 21acc1d420
Update editorconfig. (#19909)
* Make the preference about removing default access modifiers
  (dotnet_style_require_accessibility_modifiers) a warning so that `dotnet
  format` fixes any such issues.
* Change the 'var' style when type is apparent to use 'var' instead of the
  type (this seems to be what we do in most places anyways), and make it a
  warning so that `dotnet format` fixes any such issues.
2024-01-26 08:24:58 +01:00
Rolf Bjarne Kvinge e90ef187f6
[msbuild] Merge the ValidateAppBundle[TaskBase] classes. (#19907) 2024-01-26 08:23:04 +01:00
Rolf Bjarne Kvinge 75edf84495
[msbuild] Merge the UnpackLibraryResources[TaskBase] classes. (#19905)
Also enable nullability and fix the resulting issues.
2024-01-25 16:47:37 +01:00
dotnet-maestro[bot] d6563e84ac
[main] Update dependencies from dotnet/installer (#19902)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer

- **Subscription**: 80cb9ffd-f92f-4fc8-9f8b-08dbca46abfb
- **Build**: 20240123.3
- **Date Produced**: January 23, 2024 3:23:29 PM UTC
- **Commit**: afd16eda2596624d8611e944923cec4cf883ce63
- **Branch**: refs/heads/release/8.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.102-servicing.24072.2 to 8.0.102-servicing.24073.3][1]

[1]: 4f555ddc9d...afd16eda25
2024-01-25 10:02:49 +01:00
Rolf Bjarne Kvinge 546044fefa
[dotnet] Add warning when the TargetPlatformVersion isn't supported (#19901)
We've used to ignore the target platform version (the "17.0" part in "net8.0-ios17.0")
since our initial .NET relaese - customers could specify any valid OS version between
the minimum and maximum versions, and we'd completely ignore the value [1].

The purpose of the target platform version is to specify which bindings to choose:
"net8.0-ios17.0" would mean that the developer wants packages that have bindings
for iOS 17.0 (and earlier iOS versions, but not later iOS versions).

So saying "net8.0-ios11.0" would technically mean that the developer would want our
bindings for iOS 11.0 (and earlier iOS versions, but not later iOS versions). The
problem is that we don't ship any such thing... we shipped iOS 17.0 bindings in .NET
8, and that's it, you can't choose to build with something that does *not* have bindings
for iOS 17.0.

This will change with multi-targeting: we'll support *some* matrix of bindings. For
instance, we might want to support the OS version we shipped initial support in any
given .NET release + the latest OS version.

For example, we might want to support both of these:

* net8.0-ios17.0
* net8.0-ios17.2

This means that the target platform version (17.0/17.2) can't keep staying ignored.

There was an somewhat related issue with the `SdkSupportedTargetPlatformVersion`,
where we're now able to distinguish between old versions we no longer support and
new versions that limits the valid values for TargetPlatformVersion (see 74d83ca7e3).
We've already taken advantage of this to properly annotate every version, even in
.NET 8 (in a future service update), because the dotnet/sdk change required to understand
the new annotations (and ignore old versions in the `SdkSupportedTargetPlatformVersion`
item group) won't be shipped until .NET 9, so this won't be a breaking change in
.NET 8.

However, we'd still like to give customers a heads up that their project files need
to change, so this PR adds a warning (that tells developers what to do), and then
in .NET 9 we'll make the warning an error instead. Side note: Android is also making
an invalid target platform version an error in .NET 9: https://github.com/xamarin/xamarin-android/pull/8569.

[1]: We'd ignore the value for executable projects. It did have an effect for library
projects that were packed into NuGets: the target platform version would be stored
in the NuGet.
2024-01-25 09:23:03 +01:00
Manuel de la Pena 7138c42da7
[CI] Use the prefix in the artifact name, not the file. (#19896)
The prefix goes in the container, not the file.
2024-01-24 16:27:37 -05:00
Rolf Bjarne Kvinge c913839bde
[msbuild] Merge the TextureAtlas[TaskBase] classes. (#19895) 2024-01-24 17:15:36 +01:00
Rolf Bjarne Kvinge 6cea6ef518
[msbuild] Merge the SymbolStrip[TaskBase] classes. (#19894) 2024-01-24 17:15:26 +01:00
Rolf Bjarne Kvinge fd877b504e
[msbuild] Merge the SpotlightIndexer[TaskBase] classes. (#19893) 2024-01-24 17:15:10 +01:00
dotnet-maestro[bot] c633a23aea
[main] Update dependencies from dotnet/installer (#19888)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer

- **Subscription**: 80cb9ffd-f92f-4fc8-9f8b-08dbca46abfb
- **Build**: 20240122.2
- **Date Produced**: January 22, 2024 3:36:40 PM UTC
- **Commit**: 4f555ddc9d404fafd5ee8addbfce21e0fc2fd5c3
- **Branch**: refs/heads/release/8.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.102-servicing.24066.16 to 8.0.102-servicing.24072.2][1]

[1]: 69928027dd...4f555ddc9d
2024-01-24 09:03:22 +01:00
Michael Cummings (MSFT) 34f6b6aa8b
Upgrade NuGetAuthenticate task to version 1 (#19870)
The AzDo Task 'NuGet authenticate' version 0 (NuGetAuthenticate@0) is
deprecated. This task will be removed. From January 31, 2024, onwards it
may no longer be available.
2024-01-23 13:48:38 -05:00
Rolf Bjarne Kvinge 74d83ca7e3
[dotnet] Differentiate between "OS version we support as TargetPlatformVersion" and "OS version we support or have supported". (#19882)
The `SdkSupportedTargetPlatformVersion` item group is used for (at least) two things:

1. Generate the `_OR_GREATER` preprocessing symbols:

bfd2919bc4/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.BeforeCommon.targets (L230-L237)

2. Validate the TargetPlatformVersion:

bfd2919bc4/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets (L233-L246)

The problem is that these two uses aren't equivalent.

Take for example the following scenario:

We release bindings for iOS 10, and a library developer takes advantage of the
bindings for the new iOS version, while at the same time supporting
multi-targeting to older platforms:

```csharp
    #if IOS10_0_OR_GREATER
        UseNewApi ();
    #else
        UseOldApi ();
    #endif
```

Time passes, iOS 11 comes out, and we stop shipping bindings specifically for
iOS 10 (the APIs themselves would be included in the bindings for iOS 11). The
code above should continue to work, but iOS 10 is not a valid
TargetPlatformVersion anymore. However, with the current situation there's no
way to express this, because the moment we remove the "10.0" version from
SdkSupportedTargetPlatformVersion, the IOS10_0_OR_GREATER define isn't
generated anymore.

We discussed this in a meeting internally, and the suggestion that came up was
to use metadata to handle this situation, and we've decided to add the
"DefineConstantsOnly=true" metadata to items in
SdkSupportedTargetPlatformVersion that are "OS versions we support or have
supported", but not "OS versions we support as TargetPlatformVersion".

Note: we're adding this to .NET 8, but .NET will not understand the new
metadata until .NET 9, which means this won't be a breaking change until .NET
9.

In a different PR I'll add logic to warn if a project uses a
TargetPlatformVersion that is no longer valid (so that people will start
getting a warning in .NET 8 instead of getting surprised by a build error in
.NET 9).

Ref: https://github.com/dotnet/sdk/issues/38016
2024-01-23 19:17:25 +01:00
Rolf Bjarne Kvinge 2027935cbc
[devops] Configure a public/private key pair to connect to remote Mac from Windows. (#19773)
* Download the public key from our keyvault and add it to
  ~/.ssh/authorized_keys on the remote Mac. Download private key to connect to
  remote Mac.
* Download the private key from our keyvault and store it in a file on the
  Windows machine.
* Add a simple check to connect to the remote Mac from Windows to make sure
  everything is correctly configured before trying to run tests.

---------

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2024-01-23 19:09:48 +01:00
Rolf Bjarne Kvinge 21bf666386
[AudioToolbox] Make P/Invokes in AudioConverter.cs have blittable signatures. (#19848)
Contributes towards #15684.
2024-01-23 18:31:40 +01:00
Rolf Bjarne Kvinge 6b78006c99
[UIKit] Fix breaking change in UITraitChangeObservable. (#19886)
The breaking change happened in fc0d09424e -
which was a fix to privatize APIss that weren't supposed to be public.
Unfortunately it's too late, because we've already released these APIs, so we
have to keep them public to preserve binary compatibility.
2024-01-23 18:00:14 +01:00
Rolf Bjarne Kvinge eb2b83222d
[msbuild] Merge the ReadItemsFromFile[Task] classes. (#19875) 2024-01-23 17:58:40 +01:00
Rolf Bjarne Kvinge fbc97609cc
[msbuild] Merge the ResolveNativeWatchApp[TaskBase] classes. (#19879) 2024-01-23 17:58:29 +01:00
Rolf Bjarne Kvinge 0eb2d68802
[msbuild] Merge the ScnTool[TaskBase] classes. (#19880) 2024-01-23 17:58:17 +01:00
Rolf Bjarne Kvinge aec91855a1
[AudioToolbox] Make P/Invokes in AudioSession.cs have blittable signatures. (#19834)
Contributes towards #15684.
2024-01-23 17:29:42 +01:00
Rolf Bjarne Kvinge 2e9e10b67b
[AudioToolbox] Make P/Invokes in AudioToolbox.cs have blittable signatures. (#19840)
Contributes towards #15684.
2024-01-23 17:24:04 +01:00
Rolf Bjarne Kvinge 56dc3cfa58
[AudioToolbox] Make P/Invokes in MusicSequence.cs have blittable signatures. (#19839)
Contributes towards #15684.
2024-01-23 16:26:31 +01:00
dotnet-maestro[bot] a1f556b9d4
[main] Update dependencies from dotnet/xharness (#19869)
This pull request updates the following dependencies

## From https://github.com/dotnet/xharness

- **Subscription**: 601bc5e1-1cae-44b5-cf5f-08db9342aa2f
- **Build**: 20240116.3
- **Date Produced**: January 16, 2024 9:25:46 PM UTC
- **Commit**: fa3b643cc0b028ae875546b7527927adcfcd9348
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.DotNet.XHarness.iOS.Shared**: [from 9.0.0-prerelease.24061.4 to 9.0.0-prerelease.24066.3][1]

[1]: a4ca0a8035...fa3b643cc0
2024-01-23 16:14:04 +01:00
dotnet-maestro[bot] 66a4c8b9ac
[main] Update dependencies from xamarin/xamarin-macios (#19877)
This pull request updates the following dependencies

## From https://github.com/xamarin/xamarin-macios

- **Subscription**: 3ba82e10-e94b-4c1c-df8b-08dc11e0730b
- **Build**: 20240122.7
- **Date Produced**: January 22, 2024 7:42:42 PM UTC
- **Commit**: 89b5748139
- **Branch**: refs/heads/release/7.0.3xx

- **Updates**:
  - **Microsoft.tvOS.Sdk**: [from 16.4.7132 to 16.4.7133][4]

[4]: 94c4fe7d43...89b5748139
2024-01-23 16:13:30 +01:00
Mauro Agnoletti a4ec504211
Avoid passing null to TaskRunner.FixReferencedItems (#19871)
Ensure the input properties that are meant to be fixed with the
TaskRunner.FixReferencedItems invocation, might never be null

---------

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2024-01-23 07:26:17 +01:00
Rolf Bjarne Kvinge 26fd71af2b
[mmp] Add PreserveSmartEnumConversionsSubStep to the linker sub steps. Fixes #19712. (#19836)
Looks like this was substep was only added to mtouch, never to mmp, so
let's fix that.

This also makes it possible to remove a test that was only there for the
linker to keep some required methods so that the test app would build
correctly.

Fixes https://github.com/xamarin/xamarin-macios/issues/19712.
2024-01-22 22:20:47 +01:00