Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[One .NET] dotnet workload install android or android-aot #6045

Merged

Conversation

jonathanpeppers
Copy link
Member

@jonathanpeppers jonathanpeppers commented Jun 23, 2021

Context: https://github.com/dotnet/maui/tree/ef4518bf502ffa6760625c4cb53fa0cb015bc6d1/src/Workload#net-maui-workload-ids

Right now to install the Android workload you would run:

dotnet workload install microsoft-android-sdk-full

Let's shorten this to be:

dotnet workload install android

We can also create a new workload that extends android, and includes
AOT support:

dotnet workload install android-aot

To test this behavior on our CI, I reworked the ExtractWorkloadPacks
to run dotnet workload install commands. This should give us more
confidence that our workload can be installed -- and our MSBuild tests
will consume the installed workload.

Other changes:

  • Added our Microsoft.Android.Runtime.* packs to the
    WorkloadManifest.json. This was mostly omitted by mistake;
    however, runtime packs aren't resolved either due to:
    Allow runtime packs to be resolved from the packs folder sdk#14044

  • Call setup-test-environment.yaml in dotnet_create_msi job

  • Delete dotnet/metadata folder in Step_InstallDotNetPreview

@jonathanpeppers jonathanpeppers force-pushed the dotnet-workload-install-android branch 2 times, most recently from 4e62b46 to 50494a5 Compare June 25, 2021 18:51
@mhutch
Copy link
Contributor

mhutch commented Jun 25, 2021

I know it's in another manifest, but resumably microsoft-net-runtime-android-aot should be renamed to android-aot as well?

@jonathanpeppers
Copy link
Member Author

@mhutch microsoft-net-runtime-android-aot is abstract, so users wouldn't see it:

https://github.com/dotnet/runtime/blob/333c4e72b83a08288db929ac56c0e336c936b655/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.json.in#L29-L30

I can add an android-aot workload that extends it? Then we can put a description for it in this repo as well.

@jonathanpeppers jonathanpeppers force-pushed the dotnet-workload-install-android branch from 50494a5 to c2ab215 Compare June 28, 2021 21:12
@jonathanpeppers jonathanpeppers marked this pull request as ready for review June 28, 2021 21:13
jonathanpeppers added a commit to jonathanpeppers/xamarin-macios that referenced this pull request Jun 29, 2021
Context: dotnet/android#6045

We are aiming to simplify the .NET workload ids to short names like:

    dotnet workload install maui
    dotnet workload install android
    dotnet workload install ios
    dotnet workload install maccatalyst
    dotnet workload install macos
    dotnet workload install tvos

Updated the workload ids here, as well as the `.stamp-install-workloads`
make target.

Other changes:

* Updated descriptions to match Android. Still waiting on an *official*
description we should be using for each workload.

* Fixed trailing `,` that showed up as JSON errors in VS Code.
rolfbjarne pushed a commit to xamarin/xamarin-macios that referenced this pull request Jun 29, 2021
Context: dotnet/android#6045

We are aiming to simplify the .NET workload ids to short names like:

    dotnet workload install maui
    dotnet workload install android
    dotnet workload install ios
    dotnet workload install maccatalyst
    dotnet workload install macos
    dotnet workload install tvos

Updated the workload ids here, as well as the `.stamp-install-workloads`
make target.

Other changes:

* Updated descriptions to match Android. Still waiting on an *official*
description we should be using for each workload.

* Fixed trailing `,` that showed up as JSON errors in VS Code.
@jonathanpeppers jonathanpeppers force-pushed the dotnet-workload-install-android branch 3 times, most recently from dd3936d to 13ba85b Compare June 30, 2021 16:23
@jonathanpeppers jonathanpeppers changed the title [One .NET] dotnet workload install android or android-full [One .NET] dotnet workload install android or android-aot Jun 30, 2021
@jonathanpeppers
Copy link
Member Author

Discussed with @jonpryor and I think the plan is to have two top-level workloads:

  • android: what we have today, includes bundletool
  • android-aot: extends android and includes AOT support

So the maui workload can chose to extend android if needed. You can install android-aot if you want everything.

Context: https://github.com/dotnet/maui/tree/ef4518bf502ffa6760625c4cb53fa0cb015bc6d1/src/Workload#net-maui-workload-ids

Right now to install the Android workload you would run:

    dotnet workload install microsoft-android-sdk-full

Let's shorten this to be:

    dotnet workload install android

We can also create a new workload that extends `android`, and includes
AOT support:

    dotnet workload install android-aot

To test this behavior on our CI, I reworked the `ExtractWorkloadPacks`
to run `dotnet workload install` commands. This should give us more
confidence that our workload can be installed -- and our MSBuild tests
will consume the installed workload.

Other changes:

* Added our `Microsoft.Android.Runtime.*` packs to the
  `WorkloadManifest.json`. This was mostly omitted by mistake;
  however, runtime packs aren't resolved either due to:
  dotnet/sdk#14044

* Call `setup-test-environment.yaml` in `dotnet_create_msi` job

* Delete `dotnet/metadata` folder in `Step_InstallDotNetPreview`
@jonathanpeppers jonathanpeppers force-pushed the dotnet-workload-install-android branch from 13ba85b to 6ec79a3 Compare June 30, 2021 17:05
Use $(AndroidToolchainDirectory) and random file name as a temporary directory.
@jonathanpeppers jonathanpeppers force-pushed the dotnet-workload-install-android branch from e2d3730 to 54a074a Compare July 6, 2021 15:08
@jonathanpeppers jonathanpeppers force-pushed the dotnet-workload-install-android branch from 696eaed to 143992b Compare July 6, 2021 19:30
@jonpryor jonpryor merged commit 600e993 into dotnet:main Jul 6, 2021
@jonathanpeppers jonathanpeppers deleted the dotnet-workload-install-android branch July 6, 2021 23:42
@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants