Skip to content

Commit f2cbc6a

Browse files
authored
Add resource dlls to MicroBuild signing. (#145)
BaRS is conducting an effort to migrate signing in Xamarin pipelines off the [external Groovy pipeline][0]. The goal is to use MicroBuild to handle all signing within the build rather than hand off files for another pipeline to sign. The [Android.SDK.Manager][1] pipeline has been chosen as the first pipeline to migrate. Project files in `Android.SDK.Manager` reference the [xamarin-android-tools repo][2] as a submodule and [sign the resource dlls][3] that the `Xamarin.Android.Tools.AndroidSdk` project creates. This change will move the signing of these resource dlls to the build of `Xamarin.Android.Tools.AndroidSdk`. The added `<GetFilesToSign/>` target enables the use of wildcards in MicroBuild. This change is not intended to impact the behavior of the `AndroidTools` build beyond the added signing. [0]: https://dev.azure.com/devdiv/DevDiv/_build?definitionId=13878&_a=summary [1]: https://dev.azure.com/devdiv/DevDiv/_build?definitionId=13502&_a=summary [2]: https://github.com/xamarin/android-sdk-installer/blob/684b7e1283706bef2e5c832a64ced0158abe5259/Xamarin.Installer.AndroidSDK.Manager/Xamarin.Installer.AndroidSDK.Manager.csproj#L154 [3]: https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=5479174&view=logs&j=7082d35a-e46b-5a74-0b0f-e46ed113ca0e&t=9ebd6855-a6bc-5b9a-0813-711468e28365&l=91
1 parent 35c89dd commit f2cbc6a

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj

+10-5
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,16 @@
3838
<PackageReference Include="XliffTasks" Version="1.0.0-beta.20420.1" PrivateAssets="all" />
3939
</ItemGroup>
4040

41-
<ItemGroup>
42-
<FilesToSign Include="$(OutDir)\$(AssemblyName).dll">
43-
<Authenticode>Microsoft400</Authenticode>
44-
</FilesToSign>
45-
</ItemGroup>
41+
<Target Name="GetFilesToSign" BeforeTargets="SignFiles">
42+
<ItemGroup>
43+
<FilesToSign Include="$(OutDir)\$(AssemblyName).dll">
44+
<Authenticode>Microsoft400</Authenticode>
45+
</FilesToSign>
46+
<FilesToSign Include="$(OutDir)\**\$(AssemblyName).resources.dll">
47+
<Authenticode>Microsoft400</Authenticode>
48+
</FilesToSign>
49+
</ItemGroup>
50+
</Target>
4651

4752
<ItemGroup>
4853
<Compile Update="Properties\Resources.Designer.cs">

0 commit comments

Comments
 (0)