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

[android][ios] Add SDK and workload to support library mode #83487

Merged
merged 10 commits into from
Mar 18, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions eng/testing/tests.android.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@
</PropertyGroup>

<Import Project="$(MonoProjectRoot)\msbuild\common\LibraryBuilder.props" />
<Import Project="$(MonoProjectRoot)\msbuild\android\build\AndroidApp.props" />
<Import Project="$(MonoProjectRoot)\msbuild\android\build\AndroidApp.InTree.targets" />
<Import Project="$(MonoProjectRoot)\msbuild\android\build\AndroidBuild.props" />
<Import Project="$(MonoProjectRoot)\msbuild\android\build\AndroidBuild.InTree.targets" />

<PropertyGroup>
<AndroidBuildAppDependsOn>PrepareForAndroidBuildApp;$(AndroidBuildAppDependsOn);_CopyTestArchive</AndroidBuildAppDependsOn>
<BundleTestAndroidAppDependsOn>AndroidBuildApp</BundleTestAndroidAppDependsOn>
<AndroidBuildDependsOn>PrepareForAndroidBuild;$(AndroidBuildDependsOn);_CopyTestArchive</AndroidBuildDependsOn>
<BundleTestAndroidAppDependsOn>AndroidBuild</BundleTestAndroidAppDependsOn>
</PropertyGroup>

<!-- Target that kicks off the whole test build and run flow -->
<Target Name="BundleTestAndroidApp" DependsOnTargets="$(BundleTestAndroidAppDependsOn)" />

<Target Name="PrepareForAndroidBuildApp">
<Target Name="PrepareForAndroidBuild">
<Error Condition="!Exists('$(MicrosoftNetCoreAppRuntimePackRidDir)')" Text="MicrosoftNetCoreAppRuntimePackRidDir=$(MicrosoftNetCoreAppRuntimePackRidDir) doesn't exist" />

<WriteLinesToFile File="$(PublishDir)xunit-excludes.txt" Lines="$(XunitExcludesTxtFileContent)" Overwrite="true" />

<PropertyGroup>
<MainLibraryFileName Condition="'$(MainLibraryFileName)' == ''">AndroidTestRunner.dll</MainLibraryFileName>

<AndroidAppDir>$(PublishDir)</AndroidAppDir>
<AndroidAppBundleDir>$(BundleDir)</AndroidAppBundleDir>
<AndroidBuildDir>$(PublishDir)</AndroidBuildDir>
<AndroidBundleDir>$(BundleDir)</AndroidBundleDir>
</PropertyGroup>

<ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions eng/testing/tests.ioslike.targets
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@

<Import Project="$(MonoProjectRoot)\msbuild\common\LibraryBuilder.props"
Condition="'$(BuildTestsOn)' == 'local'" />
<Import Project="$(MonoProjectRoot)\msbuild\apple\build\AppleApp.props"
<Import Project="$(MonoProjectRoot)\msbuild\apple\build\AppleBuild.props"
Condition="'$(BuildTestsOn)' == 'local'" />
<Import Project="$(MonoProjectRoot)\msbuild\apple\build\AppleApp.InTree.targets"
<Import Project="$(MonoProjectRoot)\msbuild\apple\build\AppleBuild.InTree.targets"
Condition="'$(BuildTestsOn)' == 'local'" />

<PropertyGroup>
<AppleBuildAppDependsOn>PrepareForAppleBuildApp;$(AppleBuildAppDependsOn);_CopyTestArchive</AppleBuildAppDependsOn>
<AppleBuildDependsOn>PrepareForAppleBuildApp;$(AppleBuildDependsOn);_CopyTestArchive</AppleBuildDependsOn>
steveisok marked this conversation as resolved.
Show resolved Hide resolved

<BundleTestAppleAppDependsOn Condition="'$(BuildTestsOn)' == 'local'">AppleBuildApp</BundleTestAppleAppDependsOn>
<BundleTestAppleAppDependsOn Condition="'$(BuildTestsOn)' == 'local'">AppleBuild</BundleTestAppleAppDependsOn>
<BundleTestAppleAppDependsOn Condition="'$(BuildTestsOnHelix)' == 'true'">$(BundleTestAppleAppDependsOn);_BundleAOTTestAppleAppForHelix;_CopyTestArchive</BundleTestAppleAppDependsOn>
</PropertyGroup>

Expand Down Expand Up @@ -138,8 +138,8 @@
<Optimized Condition="'$(Configuration)' == 'Release'">true</Optimized>
<MainLibraryFileName Condition="'$(MainLibraryFileName)' == ''">AppleTestRunner.dll</MainLibraryFileName>

<AppleAppDir>$(PublishDir)</AppleAppDir>
<AppleAppBundleDir>$(BundleDir)</AppleAppBundleDir>
<AppleBuildDir>$(PublishDir)</AppleBuildDir>
<AppleBundleDir>$(BundleDir)</AppleBundleDir>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<!-- This depends on the root Directory.Build.props imported this file -->

<Import Project="$(MSBuildThisFileDirectory)AppleApp.props" />
<Import Project="$(MSBuildThisFileDirectory)AndroidBuild.props" />
<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<EnableTargetingPackDownload>false</EnableTargetingPackDownload>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<UsingTask TaskName="RuntimeConfigParserTask" AssemblyFile="$(MonoTargetsTasksAssemblyPath)" />

<Import Project="..\..\common\LibraryBuilder.targets" />
<Import Project="$(MSBuildThisFileDirectory)AndroidApp.targets" />
<Import Project="$(MSBuildThisFileDirectory)AndroidBuild.targets" />

<!-- TODO: this breaks runtime tests on Helix due to the file not being there for some reason. Once this is fixed we can remove the UpdateRuntimePack target here -->
<!--<Import Project="$(RepositoryEngineeringDir)targetingpacks.targets" Condition="'$(TargetingpacksTargetsImported)' != 'true'"/>-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

<_IsLibraryMode Condition="'$(NativeLib)' != ''">true</_IsLibraryMode>

<AndroidBuildAppAfterThisTarget Condition="'$(AndroidBuildAppAfterThisTarget)' == ''">Publish</AndroidBuildAppAfterThisTarget>
<AndroidBuildAppDependsOn>
<AndroidBuildAfterThisTarget Condition="'$(AndroidBuildAfterThisTarget)' == ''">Publish</AndroidBuildAfterThisTarget>
<AndroidBuildDependsOn>
_InitializeCommonProperties;
_BeforeAndroidBuildApp;
_BeforeAndroidBuild;
_AndroidResolveReferences;
_AndroidPrepareProfiledAot;
_AndroidAotCompileApp;
_AndroidAotCompile;
_BuildNativeLibrary;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should make this into a property and set the one that should be used depending if its app build or library build before importing AndroidBuild.props. In library builder SDK we could always set the property to _BuildNativeLibrary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer doing this in a follow up.

_AndroidGenerateAppBundle;
_AfterAndroidBuildApp
</AndroidBuildAppDependsOn>
_AfterAndroidBuild
</AndroidBuildDependsOn>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,28 +1,43 @@
<Project>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should move the app specific properties and targets into a separate file that we import in the case we build and app instead of a library, or for in-tree where we currently only build apps, we can always import in the in-tree targets file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer doing this in a follow up

<UsingTask TaskName="AndroidAppBuilderTask"
AssemblyFile="$(AndroidAppBuilderTasksAssemblyPath)" />

<PropertyGroup>
<AndroidGenerateAppBundle Condition="'$(AndroidGenerateAppBundle)' == '' and '$(GenerateAppBundle)' != ''">$(GenerateAppBundle)</AndroidGenerateAppBundle>
steveisok marked this conversation as resolved.
Show resolved Hide resolved
<AndroidGenerateAppBundle Condition="'$(AndroidGenerateAppBundle)' == ''">true</AndroidGenerateAppBundle>
<!-- Unable to properly integrate nativelib into app build, so not supported for now. -->
<AndroidGenerateAppBundle Condition="'$(_IsLibraryMode)' == 'true'">false</AndroidGenerateAppBundle>

<EnableDefaultAssembliesToBundle Condition="'$(EnableDefaultAssembliesToBundle)' == ''">false</EnableDefaultAssembliesToBundle>
</PropertyGroup>

<Target Name="AndroidBuildApp" AfterTargets="$(AndroidBuildAppAfterThisTarget)" />
<UsingTask Condition="'$(AndroidGenerateAppBundle)' == 'true'"
TaskName="AndroidAppBuilderTask"
AssemblyFile="$(AndroidAppBuilderTasksAssemblyPath)" />

<Target Name="AndroidBuild" AfterTargets="$(AndroidBuildAfterThisTarget)" />

<Target Name="_AndroidCoreBuild" BeforeTargets="AndroidBuildApp" DependsOnTargets="$(AndroidBuildAppDependsOn)" />
<Target Name="_AndroidCoreBuild" BeforeTargets="AndroidBuild" DependsOnTargets="$(AndroidBuildDependsOn)" />

<Target Name="_InitializeCommonProperties">
<Error Condition="'$(IntermediateOutputPath)' == ''" Text="%24(IntermediateOutputPath) property needs to be set" />

<PropertyGroup>
<_MobileIntermediateOutputPath>$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath), 'mobile'))</_MobileIntermediateOutputPath>
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">$(PlatformTarget)</TargetArchitecture>
</PropertyGroup>

<PropertyGroup>
<BundleDir>$(AndroidAppBundleDir)</BundleDir>
<_MonoHeaderPath>$(MicrosoftNetCoreAppRuntimePackNativeDir)include\mono-2.0</_MonoHeaderPath>
<_AotModuleTablePath>$(AndroidAppBundleDir)\modules.c</_AotModuleTablePath>
<MicrosoftNetCoreAppRuntimePackDir Condition="'$(MicrosoftNetCoreAppRuntimePackDir)' == ''">%(ResolvedRuntimePack.PackageDirectory)</MicrosoftNetCoreAppRuntimePackDir>
<MicrosoftNetCoreAppRuntimePackRidDir Condition="'$(MicrosoftNetCoreAppRuntimePackRidDir)' == ''">$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackDir), 'runtimes', '$(TargetOS)-$(TargetArchitecture)'))</MicrosoftNetCoreAppRuntimePackRidDir>
<MicrosoftNetCoreAppRuntimePackRidDir>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidDir)))</MicrosoftNetCoreAppRuntimePackRidDir>
<MicrosoftNetCoreAppRuntimePackRidNativeDir>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidDir), 'native'))</MicrosoftNetCoreAppRuntimePackRidNativeDir>
</PropertyGroup>

<PropertyGroup>
<AndroidBuildDir Condition="'$(AndroidBuildDir)' == ''">$([MSBuild]::NormalizeDirectory($(PublishDir)))</AndroidBuildDir>
<AndroidBundleDir Condition="'$(AndroidBundleDir)' == ''">$([MSBuild]::NormalizeDirectory('$(OutDir)', 'Bundle'))</AndroidBundleDir>

<BundleDir>$(AndroidBundleDir)</BundleDir>
<_MonoHeaderPath>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'include', 'mono-2.0'))</_MonoHeaderPath>
<_AotModuleTablePath>$(AndroidBundleDir)\modules.c</_AotModuleTablePath>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -40,36 +55,41 @@
Include="$(RuntimeComponents)" />

<_RuntimeLibraries
Include="$(AndroidAppDir)\*-stub-static.a" />
Include="$(AndroidBuildDir)\*-stub-static.a" />
<_RuntimeLibraries
Include="$(AndroidAppDir)\*.a"
Exclude="$(AndroidAppDir)\*-static.a" />
Include="$(AndroidBuildDir)\*.a"
Exclude="$(AndroidBuildDir)\*-static.a" />

<_RuntimeLibraries Remove="$(AndroidAppDir)\libmono-component-%(_UsedComponents.Identity)-stub-static.a" />
<_RuntimeLibraries Include="$(AndroidAppDir)\libmono-component-%(_UsedComponents.Identity)-static.a" />
<_RuntimeLibraries Remove="$(AndroidBuildDir)\libmono-component-%(_UsedComponents.Identity)-stub-static.a" />
<_RuntimeLibraries Include="$(AndroidBuildDir)\libmono-component-%(_UsedComponents.Identity)-static.a" />
</ItemGroup>
</Target>

<Target Name="_BeforeAndroidBuildApp">
<Target Name="_BeforeAndroidBuild">
<PropertyGroup>
<_AndroidRuntimeConfigFilePath Condition="'$(_AndroidRuntimeConfigFilePath)' == ''">$([MSBuild]::NormalizePath($(AndroidAppDir), '$(AssemblyName).runtimeconfig.json'))</_AndroidRuntimeConfigFilePath>
<_ParsedRuntimeConfigFilePath Condition="'$(_ParsedRuntimeConfigFilePath)' == ''">$([MSBuild]::NormalizePath($(AndroidAppDir), 'runtimeconfig.bin'))</_ParsedRuntimeConfigFilePath>
<_AndroidRuntimeConfigFilePath Condition="'$(_AndroidRuntimeConfigFilePath)' == ''">$([MSBuild]::NormalizePath($(AndroidBuildDir), '$(AssemblyName).runtimeconfig.json'))</_AndroidRuntimeConfigFilePath>
<_ParsedRuntimeConfigFilePath Condition="'$(_ParsedRuntimeConfigFilePath)' == ''">$([MSBuild]::NormalizePath($(AndroidBuildDir), 'runtimeconfig.bin'))</_ParsedRuntimeConfigFilePath>
</PropertyGroup>

<RemoveDir Directories="$(AndroidAppBundleDir)" />
<RemoveDir Directories="$(AndroidBundleDir)" />
</Target>

<Target Name="_AndroidResolveReferences">
<ItemGroup Condition="'$(EnableDefaultAssembliesToBundle)' == 'true'">
mdh1418 marked this conversation as resolved.
Show resolved Hide resolved
<AndroidAssembliesToBundle Remove="@(AndroidAssembliesToBundle)" />
<AndroidAssembliesToBundle Include="$(PublishDir)\**\*.dll" />
</ItemGroup>

<ItemGroup>
<AppAssembliesInternal Remove="@(AppAssembliesInternal)" />
<AppAssembliesInternal Include="@(AndroidAssembliesToBundle)">
<_AssembliesToBundleInternal Remove="@(_AssembliesToBundleInternal)" />
<_AssembliesToBundleInternal Include="@(AndroidAssembliesToBundle)">
<_InternalForceInterpret>%(AndroidAssembliesToBundle._InternalForceInterpret)</_InternalForceInterpret>
<_IsNative>%(AndroidAssembliesToBundle._IsNative)</_IsNative>
</AppAssembliesInternal>
</_AssembliesToBundleInternal>
</ItemGroup>
</Target>

<Target Name="_AndroidBeforeAotCompileApp">
<Target Name="_AndroidBeforeAotCompile">
<PropertyGroup>
<_AOTMode Condition="'$(UseMonoJustInterp)' != 'true'">Normal</_AOTMode>
<_AOTMode Condition="'$(UseMonoJustInterp)' == 'true'">JustInterp</_AOTMode>
Expand Down Expand Up @@ -107,22 +127,22 @@
</PropertyGroup>

<ItemGroup>
<_AotInputAssemblies Include="@(AppAssembliesInternal)"
Condition="'%(AppAssembliesInternal._InternalForceInterpret)' != 'true'">
<_AotInputAssemblies Include="@(_AssembliesToBundleInternal)"
Condition="'%(_AssembliesToBundleInternal._InternalForceInterpret)' != 'true'">
<AotArguments>$(AotArguments)</AotArguments>
<ProcessArguments>$(ProcessArguments)</ProcessArguments>
</_AotInputAssemblies>

<_AOT_InternalForceInterpretAssemblies Include="@(AppAssembliesInternal->WithMetadataValue('_InternalForceInterpret', 'true'))" />
<AppAssembliesInternal Remove="@(AppAssembliesInternal)" />
<_AOT_InternalForceInterpretAssemblies Include="@(_AssembliesToBundleInternal->WithMetadataValue('_InternalForceInterpret', 'true'))" />
<_AssembliesToBundleInternal Remove="@(_AssembliesToBundleInternal)" />
</ItemGroup>

<MakeDir Directories="$(_MobileIntermediateOutputPath)" />
</Target>

<Target Name="_AndroidPrepareProfiledAot"
Condition="'$(NetTraceFilePath)' != '' and '$(ForceFullAOT)' != 'true'"
DependsOnTargets="_AndroidBeforeAotCompileApp">
DependsOnTargets="_AndroidBeforeAotCompile">
<PropertyGroup>
<_ToolPath>$([System.IO.Path]::GetDirectoryName('$(DotnetPgoToolPath)'))</_ToolPath>
</PropertyGroup>
Expand All @@ -136,9 +156,9 @@
</NetTraceToMibcConverter>
</Target>

<Target Name="_AndroidAotCompileApp"
<Target Name="_AndroidAotCompile"
Condition="'$(RunAOTCompilation)' == 'true'"
DependsOnTargets="_AndroidBeforeAotCompileApp">
DependsOnTargets="_AndroidBeforeAotCompile">

<PropertyGroup Condition="'$(_IsLibraryMode)' == 'true'">
<_EnableUnmanagedCallersOnlyMethodsExport>true</_EnableUnmanagedCallersOnlyMethodsExport>
Expand Down Expand Up @@ -175,11 +195,11 @@
OutputType="AsmOnly"
UseAotDataFile="$(_UseAotDataFile)"
UseLLVM="$(MonoEnableLLVM)">
<Output TaskParameter="CompiledAssemblies" ItemName="AppAssembliesInternal" />
<Output TaskParameter="CompiledAssemblies" ItemName="_AssembliesToBundleInternal" />
</MonoAOTCompiler>

<ItemGroup>
<AppAssembliesInternal Include="@(_AOT_InternalForceInterpretAssemblies)" />
<_AssembliesToBundleInternal Include="@(_AOT_InternalForceInterpretAssemblies)" />
</ItemGroup>
</Target>

Expand All @@ -194,8 +214,8 @@
</ItemGroup>

<AndroidAppBuilderTask
AppDir="$(AndroidAppDir)"
Assemblies="@(AppAssembliesInternal)"
AppDir="$(AndroidBuildDir)"
Assemblies="@(_AssembliesToBundleInternal)"
DiagnosticPorts="$(DiagnosticPorts)"
EnvironmentVariables="@(AndroidEnv)"
ExtraLinkerArguments="@(ExtraAppLinkerArgs)"
Expand All @@ -206,7 +226,7 @@
MainLibraryFileName="$(MainLibraryFileName)"
MonoRuntimeHeaders="$(_MonoHeaderPath)"
NativeDependencies="@(_NativeDependencies)"
OutputDir="$(AndroidAppBundleDir)"
OutputDir="$(AndroidBundleDir)"
ProjectName="$(AssemblyName)"
RuntimeComponents="$(RuntimeComponents)"
RuntimeIdentifier="$(RuntimeIdentifier)"
Expand All @@ -220,7 +240,7 @@
<Message Importance="High" Text="Apk: $(ApkBundlePath)"/>
</Target>

<Target Name="_AfterAndroidBuildApp">
<Target Name="_AfterAndroidBuild">

</Target>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<!-- This depends on the root Directory.Build.props imported this file -->

<Import Project="$(MSBuildThisFileDirectory)AndroidApp.props" />
<Import Project="$(MSBuildThisFileDirectory)AppleBuild.props" />
<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<EnableTargetingPackDownload>false</EnableTargetingPackDownload>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<Import Project="..\..\common\LibraryBuilder.targets" />
<Import Project="$(MSBuildThisFileDirectory)AppleApp.targets" />
<Import Project="$(MSBuildThisFileDirectory)AppleBuild.targets" />

<!-- Use local runtime pack -->
<Target Name="UpdateRuntimePack" AfterTargets="ResolveFrameworkReferences">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
AppleApp.LocalBuild* files are meant for projects that want to use
AppleBuild.LocalBuild* files are meant for projects that want to use
a local build of `dotnet/runtime` repo.

Two ways to use this:
Expand All @@ -19,7 +19,7 @@
$(AppleBuildSupportDir) - directory which has all the tasks, targets, and runtimepack
-->
<Project>
<Import Project="$(MSBuildThisFileDirectory)AppleApp.props" />
<Import Project="$(MSBuildThisFileDirectory)AppleBuild.props" />

<PropertyGroup>
<_NetCoreAppCurrent>net8.0</_NetCoreAppCurrent>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
AppleApp.LocalBuild* files are meant for projects that want to use
AppleBuild.LocalBuild* files are meant for projects that want to use
a local build of `dotnet/runtime` repo.

Two ways to use this:
Expand All @@ -20,7 +20,7 @@
$(AppleBuildSupportDir)
-->
<Project>
<Import Project="$(MSBuildThisFileDirectory)AppleApp.targets" />
<Import Project="$(MSBuildThisFileDirectory)AppleBuild.targets" />
<UsingTask TaskName="MonoAOTCompiler" AssemblyFile="$(MonoAOTCompilerTasksAssemblyPath)" />
<UsingTask TaskName="RuntimeConfigParserTask" AssemblyFile="$(MonoTargetsTasksAssemblyPath)" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- iOS/tvOS device + arm64 simulators need to AOT -->
<PropertyGroup Condition="'$(TargetOS)' == 'ios' or '$(TargetOS)' == 'tvos' or (('$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'tvossimulator') And '$(TargetArchitecture)' == 'arm64')">
<RunAOTCompilation Condition="'$(RunAOTCompilation)' == ''">true</RunAOTCompilation>
<iOSLikeDedup>true</iOSLikeDedup>
<iOSLikeDedup Condition="'$(iOSLikeDedup)' == ''">true</iOSLikeDedup>
steveisok marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>

<!-- iOS/tvOS arm64 simulators do not support JIT, so force interpreter fallback, devices should FullAOT -->
Expand All @@ -18,17 +18,16 @@
<!--<ShouldILStrip Condition="'$(RunAOTCompilation)' == 'true' and '$(MonoForceInterpreter)' != 'true'">true</ShouldILStrip>-->

<_IsLibraryMode Condition="'$(NativeLib)' != ''">true</_IsLibraryMode>
<_NativeLibraryTarget Condition="'$(_IsLibraryMode)' == 'true'">_BuildNativeLibrary;</_NativeLibraryTarget>

<AppleBuildAppAfterThisTarget Condition="'$(AppleBuildAppAfterThisTarget)' == ''">Publish</AppleBuildAppAfterThisTarget>
<AppleBuildAppDependsOn>
<AppleBuildAfterThisTarget Condition="'$(AppleBuildAfterThisTarget)' == ''">Publish</AppleBuildAfterThisTarget>
<AppleBuildDependsOn>
_InitializeCommonProperties;
_BeforeAppleBuildApp;
_BeforeAppleBuild;
_AppleResolveReferences;
_AppleAotCompileApp;
$(_NativeLibraryTarget)
_AppleAotCompile;
_BuildNativeLibrary;
_AppleGenerateAppBundle;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should make this into a property and set the one that should be used depending if its app build or library build before importing AppleBuild.props. In library builder SDK we could always set the property to _BuildNativeLibrary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer doing this in a follow up

_AfterAppleBuildApp
</AppleBuildAppDependsOn>
_AfterAppleBuild
</AppleBuildDependsOn>
</PropertyGroup>
</Project>
Loading