Add NuGet license information to .nuspec#310
Conversation
Context: https://docs.microsoft.com/en-us/nuget/reference/nuspec#license Context: https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/nuget#important-nuget-package-metadata Context: https://docs.clearlydefined.io/curation-guidelines Certain internal Microsoft tools check NuGet license information by using [ClearlyDefined curated data][0] to determine verified license information for packages which don't "clearly define" their license. The `ILRepack` and `ILRepack.Lib` NuGet packages do no specify *any* license information within their `.nuspec` files. Update `build.groovy` so that the generated `.nuspec` files contain the [`<license/>][1] element: <license type="expression">Apache-2.0</license> The value of the `<license/>` element must be an [SPDX license][2] identifier. This is slightly complicated by the fact that I can't find an easy way to get [`com.ullink.nuget` to emit XML attributes][2]. Fortunately, if it processes a closure, we can get access to the underlying `MarkupBuilder` instance, which allows us to create an XML element that contains both attributes and content. [0]: https://github.com/clearlydefined/curated-data/ [1]: https://docs.microsoft.com/en-us/nuget/reference/nuspec#license [2]: https://spdx.org/licenses/ [3]: https://github.com/Itiviti/gradle-nuget-plugin/blob/045fc691a704cda3fd6afcc43acc7e820a868926/src/main/groovy/com/ullink/NuGetSpec.groovy#L43-L63
|
Thanks for the clean PR. LMK if you feel like releasing a patch (don't know how much you need it), and I can DM you a temporary API key for it. |
|
Hi @gluck thank you so much for everything you've done for .NET. This project is amazing and is still being super useful for the whole ecosystem. Would you be interested in adding me as an owner to this project so I could continue maintaining it, merging PRs, making releases? Ideally also I'd need to be an owner on https://www.nuget.org/packages/ILRepack to be able to publish new versions. If not, no problem, my current plan is to merge PRs into my fork and publish a NuGet with a different ID. Thanks again! |
|
Hi @KirillOsenkov , happy to do so, I've moved on from .Net, doesn't mean everybody should ! @timotei is that alright with you being both collaborators on this repo ? |
|
@gluck Sure 👍 I wasn't able to be properly involved in the past year(s) :(, so having another collaborator is great Welcome @KirillOsenkov 👋 |
|
Amazing! my nuget.org account is https://www.nuget.org/profiles/kirillosenkov |
Context: https://docs.microsoft.com/en-us/nuget/reference/nuspec#license
Context: https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/nuget#important-nuget-package-metadata
Context: https://docs.clearlydefined.io/curation-guidelines
Certain internal Microsoft tools check NuGet license information by
using ClearlyDefined curated data to determine verified license
information for packages which don't "clearly define" their license.
The
ILRepackandILRepack.LibNuGet packages do no specify anylicense information within their
.nuspecfiles.Update
build.groovyso that the generated.nuspecfiles containthe ` element:
The value of the
<license/>element must be an SPDX licenseidentifier.
This is slightly complicated by the fact that I can't find an easy
way to get
com.ullink.nugetto emit XML attributes.Fortunately, if it processes a closure, we can get access to the
underlying
MarkupBuilderinstance, which allows us to create anXML element that contains both attributes and content.