xamarin / AndroidX

AndroidX bindings for .NET for Android
MIT License
182 stars 45 forks source link

[IMPROVEMENT] Nuget Readme included in the package #790

Closed moljac closed 1 year ago

moljac commented 1 year ago

Does this change any of the generated binding API's?

No.

Describe your contribution

NuGet best practices recommend adding readme.[txt,md] to each package. Otherwise following warning is emitted:

The package  is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why package readmes are important.

This PR adds readme.md to NuGet packages.

https://devblogs.microsoft.com/nuget/add-a-readme-to-your-nuget-package/

https://devblogs.microsoft.com/nuget/write-a-high-quality-readme-for-nuget-packages/

https://github.com/NuGet/Home/issues/12070

https://raw.githubusercontent.com/lyndaidaii/NuGetReadMeTemplate/main/README.md

Verification

tree output/Xamarin.AndroidX.Wear.Compose.Navigation.1.2.0.1/

Result:

output/Xamarin.AndroidX.Wear.Compose.Navigation.1.2.0.1/
├── LICENSE.md
├── THIRD-PARTY-NOTICES.txt
├── Xamarin.AndroidX.Wear.Compose.Navigation.nuspec
├── [Content_Types].xml
├── _rels
├── aar
│   └── androidx.wear.compose.compose-navigation.aar
├── build
│   ├── monoandroid12.0
│   │   └── Xamarin.AndroidX.Wear.Compose.Navigation.targets
│   └── net6.0-android31.0
│       └── Xamarin.AndroidX.Wear.Compose.Navigation.targets
├── buildTransitive
│   ├── monoandroid12.0
│   │   └── Xamarin.AndroidX.Wear.Compose.Navigation.targets
│   └── net6.0-android31.0
│       └── Xamarin.AndroidX.Wear.Compose.Navigation.targets
├── icon.png
├── lib
│   ├── monoandroid12.0
│   │   ├── Xamarin.AndroidX.Wear.Compose.Navigation.dll
│   │   ├── Xamarin.AndroidX.Wear.Compose.Navigation.pdb
│   │   └── Xamarin.AndroidX.Wear.Compose.Navigation.xml
│   └── net6.0-android31.0
│       ├── Xamarin.AndroidX.Wear.Compose.Navigation.dll
│       ├── Xamarin.AndroidX.Wear.Compose.Navigation.pdb
│       └── Xamarin.AndroidX.Wear.Compose.Navigation.xml
├── package
│   └── services
│       └── metadata
│           └── core-properties
│               └── a2137d8722094644be43e3b1900c4cc1.psmdcp
├── proguard
│   └── proguard.txt
└── readme.md

17 directories, 19 files
jonpryor commented 1 year ago

The **/*NuGetReadMe.cshtml files look nearly identical (are identical?). Is there a way to share these files to simplify future updates?

(These may need to be updated in the future, if/when we ever migrate to the dotnet org…)

moljac commented 1 year ago

The **/*NuGetReadMe.cshtml files look nearly identical (are identical?). Is there a way to share these files to simplify future updates?

"nearly identical" I would say. But some will be quite different. For example, for "no-bindings" group/template I need to add conditional description, because this group contains several completely different packages from different maven group ids and different authors.

It would be too much effort for now.

This PR is quick workaround to obey nuget's warnings about nice-to-haves.

(These may need to be updated in the future, if/when we ever migrate to the dotnet org…)

if and when priority of MAUI activities reduce.