In https://github.com/xamarin/AndroidX/pull/925, we converted the custom "samples" tests into NUnit unit tests, but did not remove the old tests.
Remove the `samples` directory and change the Cake targets like `ci-samples` to run the new NUnit tests.
Begin streamlining and updating the default project template. There are two goals here:
- Modernize appearance and metadata by removing "Xamarin" branding and verbiage, shifting more towards ".NET for Android" branding.
- Begin making the default project template more generic and configurable via `config.json`. The desire here is to reduce maintenance burden by making the default template flexible enough that library-specific templates (like `kotlin` or `tink`) are no longer required. (Currently we maintain 46 template sets across AndroidX and GPS repos, the majority of which only have minor differences.)
Reduce maintenance costs by creating a generic `PackageLicense.md` file that can be used by all packages. Instead of listing package-specific licensing, it points to the existing `THIRD-PARTY-NOTICES.txt` file which already contains package-specific licensing.
Additionally, this is done as `PackageLicense.md` instead of the root `LICENSE.md` because it is specific to the packages we ship and not necessarily to the code in this repository. That is, the package-specific wording does not apply to things like the `binderator` code that exists in this repository.
Also, mentions of `Xamarin` were replaced with `Microsoft`.
Finally, pull in the standard `dotnet` `LICENSE.txt` for the repository level license, a la:
- https://github.com/dotnet/runtime/blob/main/LICENSE.TXT
- https://github.com/dotnet/android/blob/main/LICENSE.TXT
There is some interesting content available in a Java `.pom` file that we can add to our package readme files:
- Developer(s)
- License(s)
- Description
- Project URL
Add this information, apply some formatting, and remove some less useful information that clutters the readme. Mockup of the new layout on nuget.org:
![image](https://github.com/user-attachments/assets/336a2662-0076-4c12-87c0-20bc6d91ebed)
Other changes:
- `binderator` changes were required to pull in the new fields. Switch to the in-tree version of `binderator` instead of publishing a new `dotnet tool` version.
- Our existing `readme.md` [doesn't work on nuget.org](https://www.nuget.org/packages/Xamarin.AndroidX.Core#readme-body-tab) because we are missing the `$(PackageReadmeFile)` property. Fix this.
- This `readme.md` is intentionally generic enough to be usable by all of our packages. Remove individual template copies.
Convert our existing `BuildAllDotNet`/`BuildAllMauiApp` samples to NUnit based unit tests. These tests use `dotnet new android|maui` instead of committed projects so that we always ensure we are testing against the current templates that our users will be using.
Additionally, move these tests to another stage, so they can run in parallel with other [test suite(s)](https://github.com/xamarin/AndroidX/pull/892).
This PR does not remove the existing `BuildAll*` samples, those will be removed in a future PR.
As the scope of `update-config.csx` has grown, it has become more and more painful that it isn't in an actual project editable in an IDE, making it harder to update or debug. As it shares code with `binderator`, like reading and writing `config.json`, move the functionality into `binderator`.
To help facilitate running this functionality, add new targets to `cake` for the various operations:
* `update-config`
Updates config.json to the latest versions found in Maven.
* `bump-config`
Increments the NuGet patch version of all packages in config.json.
* `sort-config`
Sorts config.json file using the canonical sort.
* `published-config`
Shows which NuGet package versions in config.json have been published to NuGet.org.
Note these run the in-tree version of `binderator`, there is no need to install the .NET Global tool version to run these targets.
Context: https://github.com/xamarin/AndroidX/issues/916
`api-diff` currently fails for `Xamarin.AndroidX.Car.App.App` `1.4.0` which is preventing us from updating it. The nature of this crash is documented in https://github.com/xamarin/AndroidX/issues/916.
We have chosen not to spend the resources at this time to fix this tooling error. Instead, we are going to go ahead and update `Xamarin.AndroidX.Car.App.App` to version `1.4.0` and are going to exclude it from running `api-diff`.