Skip to content

Commit

Permalink
[ci] Use Microsoft.SourceLink.GitHub
Browse files Browse the repository at this point in the history
Context: dotnet/android@7b4d4b8
Context: https://github.com/dotnet/sourcelink#githubcom-and-github-enterprise
Context: https://www.hanselman.com/blog/exploring-net-cores-sourcelink-stepping-into-the-source-code-of-nuget-packages-you-dont-own

Changes: http://github.com/xamarin/xamarin-android-tools/compare/fc3c2ac191a47715bc58e110ef28f38009158416...7cfe68373f959b8d08b49dd89e2c874ebde38bda

  * dotnet/android-tools@7cfe683: [ci] Use Microsoft.SourceLink.GitHub (#192)
  * dotnet/android-tools@01a0dde: [Localization] Import translated resx files (#189)
  * dotnet/android-tools@cc715d9: [Xamarin.Android.Tools.AndroidSdk] Permit NDK r25 (#190)
  * dotnet/android-tools@3c55e9a: Avoid `Environment.SpecialFolder.ApplicationData` (#188)
  * dotnet/android-tools@0d55472: LEGO: Merge pull request 187
  * dotnet/android-tools@6946512: Juno: check in to juno/hb_befb220e-87ce-47e9-a9e6-10ea592b2337_20220729154833425. (#186)
  * dotnet/android-tools@6e3433a: Juno: check in to juno/hb_befb220e-87ce-47e9-a9e6-10ea592b2337_20220729025332507. (#185)
  * dotnet/android-tools@73c4388: [Xamarin.Android.Tools.AndroidSdk] Update SDK component for API-33 (#184)
  * dotnet/android-tools@da3653e: [Xamarin.Android.Tools.AndroidSdk] Add API-33 to KnownVersions
  * dotnet/android-tools@327d433: [ci] Run OneLocBuild on a schedule (#180)
  * dotnet/android-tools@8ab60e4: [ci] Use latest macOS and Windows images (#181)
  * dotnet/android-tools@4dd3292: LEGO: Merge pull request 182
  * dotnet/android-tools@56b61f1: [Localization] Add OneLocBuild job (#175)
  * dotnet/android-tools@14076a6: [Xamarin.Android.Tools.AndroidSdk] Add API-32 to KnownVersions
  * dotnet/android-tools@9c641b3: [Xamarin.Android.Tools.AndroidSdk] Update SDK component for API-32 (#169)
  * dotnet/android-tools@ec346d0: [Xamarin.Android.Tools.AndroidSdk] Permit NDK r24 (#171)
  * dotnet/android-tools@47832f1: [Xamarin.Android.Tools.AndroidSdk] AndroidSdkInfo validation locator (#170)
  * dotnet/android-tools@20f6112: Bump LibZipSharp to 2.0.4 (#166)
  * dotnet/android-tools@e4f0d59: Add support for writing android:roundIcon to Android manifest (#162)

Add a reference to the [Microsoft.SourceLink.GitHub NuGet package][0]
to `src/*/*.csproj` and `tools/*/*.csproj` so that `*.pdb` such as
`Java.Interop.pdb` contain URLs to facilitate debugging into their
corresponding assemblies without needing to checkout and build the
`Java.Interop` repo locally:

	% dotnet tool install --global SourceLink --version 3.1.1

	% $HOME/.dotnet/tools/sourcelink print-urls bin/Debug-net7.0/Java.Interop.pdb
	c1eaa3b7ef9a7354080ca02e56f5052a7b04fcf78298210fb69a1c05c5827c3d sha256 csharp /Volumes/Xamarin-Work/src/xamarin/Java.Interop/src/Java.Interop/GlobalSuppressions.cs
	https://raw.githubusercontent.com/jonpryor/Java.Interop/6d1ae4ee1076341f8af36dbdd306dce0e6266999/src/Java.Interop/GlobalSuppressions.cs
	…

	% $HOME/.dotnet/tools/sourcelink test bin/Debug-net7.0/Java.Interop.pdb
	3 Documents with errors:
	983b6f609d1a601d57df96467aafe6a0cc6173a23d261f98ad582d16983259a9 sha256 csharp /Volumes/Xamarin-Work/src/xamarin/Java.Interop/src/Java.Interop/obj/Debug/net7.0/JniEnvironment.g.cs
	https://raw.githubusercontent.com/jonpryor/Java.Interop/6d1ae4ee1076341f8af36dbdd306dce0e6266999/src/Java.Interop/obj/Debug/net7.0/JniEnvironment.g.cs
	error: url failed NotFound: Not Found
	9596da901062cf5add81d66c23696ca92bbfa59c82fe10f4f06d45292e2cb0ff sha256 csharp /Volumes/Xamarin-Work/src/xamarin/Java.Interop/src/Java.Interop/obj/Debug/net7.0/.NETCoreApp,Version=v7.0.AssemblyAttributes.cs
	https://raw.githubusercontent.com/jonpryor/Java.Interop/6d1ae4ee1076341f8af36dbdd306dce0e6266999/src/Java.Interop/obj/Debug/net7.0/.NETCoreApp,Version=v7.0.AssemblyAttributes.cs
	error: url failed NotFound: Not Found
	508b170eae1ea8b281b2a892293c0b1f2b1ee67db1bd8ce89036541d3f121643 sha256 csharp /Volumes/Xamarin-Work/src/xamarin/Java.Interop/src/Java.Interop/obj/Debug/net7.0/Java.Interop.AssemblyInfo.cs
	https://raw.githubusercontent.com/jonpryor/Java.Interop/6d1ae4ee1076341f8af36dbdd306dce0e6266999/src/Java.Interop/obj/Debug/net7.0/Java.Interop.AssemblyInfo.cs
	error: url failed NotFound: Not Found
	sourcelink test failed

These errors are expected, as they are generated files.

[0]: https://www.nuget.org/packages/Microsoft.SourceLink.GitHub
  • Loading branch information
jonpryor committed Aug 23, 2022
1 parent e31d9c6 commit 4f813cb
Show file tree
Hide file tree
Showing 28 changed files with 73 additions and 1 deletion.
1 change: 1 addition & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<PackageReference Update="Microsoft.DotNet.GenAPI" Version="7.0.0-beta.22103.1" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageReference Update="Mono.CSharp" Version="4.0.0.143" />
<PackageReference Update="Mono.Linq.Expressions" Version="2.0.0" />
<PackageReference Update="Mono.Options" Version="6.12.0.148" />
Expand Down
2 changes: 1 addition & 1 deletion external/xamarin-android-tools
4 changes: 4 additions & 0 deletions src/Java.Base/Java.Base.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
<ProjectReference Include="..\..\tools\generator\generator.csproj" ReferenceOutputAssembly="False" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

<Import Project="Java.Base.targets" />

</Project>
3 changes: 3 additions & 0 deletions src/Java.Interop.Dynamic/Java.Interop.Dynamic.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<Name>Java.Interop</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>
</Project>
3 changes: 3 additions & 0 deletions src/Java.Interop.Export/Java.Interop.Export.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@
<Name>Java.Interop</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@
<AdditionalProperties>TargetFramework=netstandard2.0</AdditionalProperties>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
<ProjectReference Include="..\Java.Interop.Localization\Java.Interop.Localization.csproj" />
<ProjectReference Include="..\Java.Interop.Tools.Diagnostics\Java.Interop.Tools.Diagnostics.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@
<Compile Include="..\utils\NullableAttributes.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@
<ProjectReference Include="..\Java.Interop.Localization\Java.Interop.Localization.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
<ProjectReference Include="..\Java.Interop.Tools.Diagnostics\Java.Interop.Tools.Diagnostics.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

<Import Project="..\Java.Interop.NamingCustomAttributes\Java.Interop.NamingCustomAttributes.projitems" Label="Shared" Condition="Exists('..\Java.Interop.NamingCustomAttributes\Java.Interop.NamingCustomAttributes.projitems')" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<ItemGroup>
<ProjectReference Include="..\Xamarin.Android.Tools.ApiXmlAdjuster\Xamarin.Android.Tools.ApiXmlAdjuster.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Java.Interop.Tools.Cecil\Java.Interop.Tools.Cecil.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>
</Project>
3 changes: 3 additions & 0 deletions src/Java.Interop/Java.Interop-MonoAndroid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,7 @@
AdditionalProperties="TargetFramework=net472"
/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>
</Project>
3 changes: 3 additions & 0 deletions src/Java.Interop/Java.Interop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,8 @@
</Properties>
</MonoDevelop>
</ProjectExtensions>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>
<Import Project="Java.Interop.targets" />
</Project>
4 changes: 4 additions & 0 deletions src/Java.Runtime.Environment/Java.Runtime.Environment.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@
</Content>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@
<ProjectReference Include="..\Xamarin.Android.Tools.ApiXmlAdjuster\Xamarin.Android.Tools.ApiXmlAdjuster.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

<ItemGroup>
<PackageReference Include="HtmlAgilityPack" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@
<Compile Include="..\utils\NullableAttributes.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<ItemGroup>
<!-- Always reference the netstandard2.0 version of protobuf-net as it is a shared dependency. -->
<PackageReference Include="protobuf-net" ExcludeAssets="Compile" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
<Reference Include="protobuf-net">
<HintPath>$(PkgProtobuf-net)\lib\netstandard2.0\protobuf-net.dll</HintPath>
</Reference>
Expand Down
4 changes: 4 additions & 0 deletions src/Xamarin.SourceWriter/Xamarin.SourceWriter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@

<Import Project="..\..\TargetFrameworkDependentValues.props" />

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions src/java-interop/java-interop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions tools/class-parse/class-parse.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<ItemGroup>
<PackageReference Include="Mono.Options" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions tools/generator/generator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<HintPath>$(PkgHtmlAgilityPack)\lib\netstandard2.0\HtmlAgilityPack.dll</HintPath>
</Reference>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions tools/jcw-gen/jcw-gen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<ItemGroup>
<PackageReference Include="Mono.Options" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

<Import Project="..\..\build-tools\scripts\cecil.projitems" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<ItemGroup>
<PackageReference Include="Mono.Options" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Condition=" '$(_DumpRegisterNativeMembers)' == 'True' ">
Expand Down
1 change: 1 addition & 0 deletions tools/logcat-parse/logcat-parse.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<PackageReference Include="Mono.Terminal" GeneratePathProperty="True" />
<PackageReference Include="Mono.CSharp" NoWarn="NU1701" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions tools/param-name-importer/param-name-importer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
</Reference>
<PackageReference Include="Mono.Options" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Java.Interop.Tools.JavaSource\Java.Interop.Tools.JavaSource.csproj" />
Expand Down

0 comments on commit 4f813cb

Please sign in to comment.