-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add Android workload manifests to SB .NET SDK #42125
Open
jonathanpeppers
wants to merge
9
commits into
dotnet:main
Choose a base branch
from
jonathanpeppers:android-source-build
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
503868e
Update to MAUI .NET 9 Preview 6 manifests
jonathanpeppers 73e84be
Add Android workload manifests to SB .NET SDK
jonathanpeppers 86de0c5
Merge branch 'main' into android-source-build
jonathanpeppers c00c168
Update SourceBuildPrebuiltBaseline.xml
jonathanpeppers 6ffb23a
Merge branch 'main' into android-source-build
jonathanpeppers d3191c4
Update SourceBuildPrebuiltBaseline.xml
jonathanpeppers c0883a0
Merge branch 'main' into android-source-build
jonathanpeppers 641d9a3
Conditionally add to `@(PackageDownload)`
jonathanpeppers 13223ae
Update src/Installer/redist-installer/targets/BundledManifests.targets
jonathanpeppers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
109 changes: 109 additions & 0 deletions
109
...s/9.0.100-preview.6/microsoft.net.sdk.android/34.99.0-preview.6.340/WorkloadManifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
{ | ||
"version": "34.99.0-preview.6.340", | ||
"workloads": { | ||
"android": { | ||
"description": ".NET SDK Workload for building Android applications.", | ||
"packs": [ | ||
"Microsoft.Android.Sdk.net9", | ||
"Microsoft.Android.Sdk.net8", | ||
"Microsoft.Android.Ref.34", | ||
"Microsoft.Android.Runtime.34.android-arm", | ||
"Microsoft.Android.Runtime.34.android-arm64", | ||
"Microsoft.Android.Runtime.34.android-x86", | ||
"Microsoft.Android.Runtime.34.android-x64", | ||
"Microsoft.Android.Templates" | ||
], | ||
"platforms": [ "win-x64", "win-arm64", "linux-x64", "linux-arm64", "osx-x64", "osx-arm64" ], | ||
"extends" : [ | ||
"microsoft-net-runtime-android-net8", | ||
"microsoft-net-runtime-android-aot-net8", | ||
"microsoft-net-runtime-android", | ||
"microsoft-net-runtime-android-aot" | ||
] | ||
}, | ||
"android-35": { | ||
"description": "Preview support for Android API-35.", | ||
"packs": [ | ||
"Microsoft.Android.Ref.35", | ||
"Microsoft.Android.Runtime.35.android-arm", | ||
"Microsoft.Android.Runtime.35.android-arm64", | ||
"Microsoft.Android.Runtime.35.android-x86", | ||
"Microsoft.Android.Runtime.35.android-x64" | ||
], | ||
"platforms": [ "win-x64", "win-arm64", "linux-x64", "linux-arm64", "osx-x64", "osx-arm64" ], | ||
"extends" : [ "android" ] | ||
} | ||
}, | ||
"packs": { | ||
"Microsoft.Android.Sdk.net9": { | ||
"kind": "sdk", | ||
"version": "34.99.0-preview.6.340", | ||
"alias-to": { | ||
"osx-x64": "Microsoft.Android.Sdk.Darwin", | ||
"osx-arm64": "Microsoft.Android.Sdk.Darwin", | ||
"win-x86": "Microsoft.Android.Sdk.Windows", | ||
"win-x64": "Microsoft.Android.Sdk.Windows", | ||
"win-arm64": "Microsoft.Android.Sdk.Windows", | ||
"linux-x64": "Microsoft.Android.Sdk.Linux", | ||
"linux-arm64": "Microsoft.Android.Sdk.Linux" | ||
} | ||
}, | ||
"Microsoft.Android.Sdk.net8": { | ||
"kind": "sdk", | ||
"version": "34.0.113", | ||
"alias-to": { | ||
"osx-x64": "Microsoft.Android.Sdk.Darwin", | ||
"osx-arm64": "Microsoft.Android.Sdk.Darwin", | ||
"win-x86": "Microsoft.Android.Sdk.Windows", | ||
"win-x64": "Microsoft.Android.Sdk.Windows", | ||
"win-arm64": "Microsoft.Android.Sdk.Windows", | ||
"linux-x64": "Microsoft.Android.Sdk.Linux", | ||
"linux-arm64": "Microsoft.Android.Sdk.Linux" | ||
} | ||
}, | ||
"Microsoft.Android.Ref.34": { | ||
"kind": "framework", | ||
"version": "34.99.0-preview.6.340" | ||
}, | ||
"Microsoft.Android.Runtime.34.android-arm": { | ||
"kind": "framework", | ||
"version": "34.99.0-preview.6.340" | ||
}, | ||
"Microsoft.Android.Runtime.34.android-arm64": { | ||
"kind": "framework", | ||
"version": "34.99.0-preview.6.340" | ||
}, | ||
"Microsoft.Android.Runtime.34.android-x86": { | ||
"kind": "framework", | ||
"version": "34.99.0-preview.6.340" | ||
}, | ||
"Microsoft.Android.Runtime.34.android-x64": { | ||
"kind": "framework", | ||
"version": "34.99.0-preview.6.340" | ||
}, | ||
"Microsoft.Android.Ref.35": { | ||
"kind": "framework", | ||
"version": "34.99.0-preview.6.340" | ||
}, | ||
"Microsoft.Android.Runtime.35.android-arm": { | ||
"kind": "framework", | ||
"version": "34.99.0-preview.6.340" | ||
}, | ||
"Microsoft.Android.Runtime.35.android-arm64": { | ||
"kind": "framework", | ||
"version": "34.99.0-preview.6.340" | ||
}, | ||
"Microsoft.Android.Runtime.35.android-x86": { | ||
"kind": "framework", | ||
"version": "34.99.0-preview.6.340" | ||
}, | ||
"Microsoft.Android.Runtime.35.android-x64": { | ||
"kind": "framework", | ||
"version": "34.99.0-preview.6.340" | ||
}, | ||
"Microsoft.Android.Templates": { | ||
"kind": "template", | ||
"version": "34.99.0-preview.6.340" | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
....0.100-preview.6/microsoft.net.sdk.android/34.99.0-preview.6.340/WorkloadManifest.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<Project> | ||
<ImportGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' "> | ||
<Import Project="Sdk.targets" Sdk="Microsoft.Android.Sdk.net9" | ||
Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '9.0')) " /> | ||
<Import Project="Sdk.targets" Sdk="Microsoft.Android.Sdk.net8" | ||
Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) " /> | ||
<Import Project="Eol.targets" Sdk="Microsoft.Android.Sdk.net9" | ||
Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) or $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) " /> | ||
</ImportGroup> | ||
|
||
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) "> | ||
<KnownFrameworkReference | ||
Update="Microsoft.Android" | ||
LatestRuntimeFrameworkVersion="34.0.113" | ||
TargetingPackVersion="34.0.113" | ||
/> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '8.0')) "> | ||
<SdkSupportedTargetPlatformIdentifier Include="android" DisplayName="Android" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<Project> | ||
|
||
<ItemGroup> | ||
<BundledManifests Include="Microsoft.NET.Sdk.Android" FeatureBand="$(MauiFeatureBand)" Version="$(XamarinAndroidWorkloadManifestVersion)" Condition="'$(DotNetBuildSourceOnly)' != 'true'" /> | ||
<BundledManifests Include="Microsoft.NET.Sdk.Android" FeatureBand="$(MauiFeatureBand)" Version="$(XamarinAndroidWorkloadManifestVersion)" IncludedInSource="true" /> | ||
<BundledManifests Include="Microsoft.NET.Sdk.iOS" FeatureBand="$(MauiFeatureBand)" Version="$(XamarinIOSWorkloadManifestVersion)" Condition="'$(DotNetBuildSourceOnly)' != 'true'" /> | ||
<BundledManifests Include="Microsoft.NET.Sdk.MacCatalyst" FeatureBand="$(MauiFeatureBand)" Version="$(XamarinMacCatalystWorkloadManifestVersion)" Condition="'$(DotNetBuildSourceOnly)' != 'true'" /> | ||
<BundledManifests Include="Microsoft.NET.Sdk.macOS" FeatureBand="$(MauiFeatureBand)" Version="$(XamarinMacOSWorkloadManifestVersion)" Condition="'$(DotNetBuildSourceOnly)' != 'true'" /> | ||
|
@@ -31,12 +31,14 @@ | |
<RestoredNupkgContentPath>$(NuGetPackageRoot)$([MSBuild]::ValueOrDefault('%(NupkgId)', '').ToLower())/$([MSBuild]::ValueOrDefault('%(Version)', '').ToLower())</RestoredNupkgContentPath> | ||
<MsiNupkgId>%(Identity).Manifest-%(FeatureBand).Msi.$(MsiArchitectureForWorkloadManifests)</MsiNupkgId> | ||
<RestoredMsiNupkgContentPath>$(NuGetPackageRoot)$([MSBuild]::ValueOrDefault('%(MsiNupkgId)', '').ToLower())/$([MSBuild]::ValueOrDefault('%(Version)', '').ToLower())</RestoredMsiNupkgContentPath> | ||
<IncludedInSource Condition="'%(IncludedInSource)' == ''">false</IncludedInSource> | ||
<PackageDownload Condition="'$(DotNetBuildSourceOnly)' != 'true' or '%(IncludedInSource)' != 'true'">true</PackageDownload> | ||
</BundledManifests> | ||
</ItemGroup> | ||
|
||
<!-- Restore workload manifests via PackageDownload --> | ||
<ItemGroup> | ||
<PackageDownload Include="@(BundledManifests->'%(NupkgId)')"> | ||
<PackageDownload Include="@(BundledManifests->'%(NupkgId)'->WithMetadataValue('PackageDownload', 'true'))"> | ||
<Version>[%(Version)]</Version> | ||
</PackageDownload> | ||
</ItemGroup> | ||
|
@@ -86,15 +88,37 @@ | |
|
||
<Target Name="LayoutManifests" | ||
DependsOnTargets="SetupBundledComponents"> | ||
|
||
<!-- Manifest sources that exist in-tree --> | ||
<ItemGroup> | ||
<SourceManifestContent Include="%(BundledManifests.RestoredNupkgContentPath)\data\*" | ||
Condition="'%(BundledManifests.IncludedInSource)' == 'true' and Exists('%(BundledManifests.RestoredNupkgContentPath)\data')" | ||
DestinationPath="%(BundledManifests.FeatureBand)/$([MSBuild]::ValueOrDefault('%(Identity)', '').ToLower())/%(BundledManifests.Version)" | ||
RestoredNupkgContentPath="%(RestoredNupkgContentPath)" | ||
WorkloadManifestId="%(Identity)" /> | ||
|
||
<SourceManifestContent Include="%(BundledManifests.RestoredNupkgContentPath)\data\localize\*" | ||
Condition="'%(BundledManifests.IncludedInSource)' == 'true' and Exists('%(RestoredNupkgContentPath)\data\localize')" | ||
DestinationPath="%(BundledManifests.FeatureBand)/$([MSBuild]::ValueOrDefault('%(Identity)', '').ToLower())/%(BundledManifests.Version)/localize" /> | ||
</ItemGroup> | ||
|
||
<!-- Do not copy for source build, should already be in-tree --> | ||
<Copy Condition="'$(DotNetBuildSourceOnly)' != 'true'" | ||
SourceFiles="@(SourceManifestContent)" | ||
DestinationFolder="sdk-manifests/%(DestinationPath)" | ||
SkipUnchangedFiles="true" /> | ||
Comment on lines
+105
to
+109
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is for convenience of someone updating the manifests (likely me). We could put it behind a property like |
||
|
||
<ItemGroup> | ||
<ManifestContent Include="@(SourceManifestContent->'sdk-manifests/%(DestinationPath)/%(FileName)%(Extension)')" /> | ||
|
||
<ManifestContent Include="%(BundledManifests.RestoredNupkgContentPath)\data\*" | ||
Condition="Exists('%(RestoredNupkgContentPath)\data')" | ||
DestinationPath="%(FeatureBand)/$([MSBuild]::ValueOrDefault('%(Identity)', '').ToLower())/%(Version)" | ||
Condition="'%(BundledManifests.IncludedInSource)' != 'true' and Exists('%(BundledManifests.RestoredNupkgContentPath)\data')" | ||
DestinationPath="%(BundledManifests.FeatureBand)/$([MSBuild]::ValueOrDefault('%(Identity)', '').ToLower())/%(BundledManifests.Version)" | ||
RestoredNupkgContentPath="%(RestoredNupkgContentPath)" | ||
WorkloadManifestId="%(Identity)" /> | ||
|
||
<ManifestContent Include="%(BundledManifests.RestoredNupkgContentPath)\data\localize\*" | ||
Condition="Exists('%(RestoredNupkgContentPath)\data\localize')" | ||
Condition="'%(BundledManifests.IncludedInSource)' != 'true' and Exists('%(RestoredNupkgContentPath)\data\localize')" | ||
DestinationPath="%(BundledManifests.FeatureBand)/$([MSBuild]::ValueOrDefault('%(Identity)', '').ToLower())/%(BundledManifests.Version)/localize" /> | ||
</ItemGroup> | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to not specialize this for source-build? e.g. the MSFT build would also use the version from the SDK repo. It is best to avoid unnecessary differences between the two builds. Keeping them the same helps flush out issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can rework this to use a property like
-p:UpdateManifestSources=true
, and then it wouldn't need to ever check$(DotNetBuildSourceOnly)
. Someone would only set this property when updating the manifest sources.Is the build green (or need a rerun)? I don't think I've seen it fully green yet, so just wondering if it works before I refactor it. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I think this got past the pre-built errors now, but some of the smoke tests run into:
I'll see if I can reproduce this on GitHub codespaces.