forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAndroidSampleApp.csproj
More file actions
61 lines (55 loc) · 3.21 KB
/
AndroidSampleApp.csproj
File metadata and controls
61 lines (55 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == ''">Mono</RuntimeFlavor>
<OutputType>Exe</OutputType>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<RuntimeIdentifier>android-$(TargetArchitecture)</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>Link</TrimMode>
<ForceAOT Condition="'$(ForceAOT)' == ''">false</ForceAOT>
<RunAOTCompilation Condition="'$(RunAOTCompilation)' == ''">$(ForceAOT)</RunAOTCompilation>
<StripDebugSymbols Condition="'$(Configuration)' == 'Release'">true</StripDebugSymbols>
<AppName>HelloAndroid</AppName>
<MainLibraryFileName>$(AssemblyName).dll</MainLibraryFileName>
<EnableDefaultAssembliesToBundle>true</EnableDefaultAssembliesToBundle>
<!-- With Mono AOT on Android we default to not using AOT data file optimization as it can degrade runtime performance for small binary size improvements. -->
<_UseAotDataFile Condition="'$(RunAOTCompilation)' == 'true'">false</_UseAotDataFile>
</PropertyGroup>
<ItemGroup>
<RuntimeComponents Condition="'$(RuntimeFlavor)' == 'Mono' and '$(DiagnosticPorts)' != ''" Include="diagnostics_tracing" />
<RuntimeHeaders Include="$(SharedNativeRoot)" Condition="'$(RuntimeFlavor)' != 'Mono'"/>
</ItemGroup>
<Import Project="$(MonoProjectRoot)\msbuild\android\build\AndroidBuild.props" />
<PropertyGroup>
<!-- Import after SDK targets in order to override R2R-related targets in the SDK -->
<AfterMicrosoftNETSdkTargets>$(MonoProjectRoot)\msbuild\android\build\AndroidBuild.InTree.targets</AfterMicrosoftNETSdkTargets>
</PropertyGroup>
<Target Name="RunAppBundle"
Condition="'$(ArchiveTests)' != 'true' and '$(DeployAndRun)' == 'true'"
AfterTargets="_AfterAndroidBuild"
DependsOnTargets="$(AndroidBuildDependsOn)" >
<Exec Command="$(DotNetTool) xharness android test --package-name=net.dot.HelloAndroid --instrumentation=net.dot.MonoRunner --app=$(AndroidBundleDir)/bin/HelloAndroid.apk --expected-exit-code=42 --output-directory=$(AndroidBundleDir)/log" />
</Target>
<Target Name="CopySampleAppToHelixTestDir"
Condition="'$(ArchiveTests)' == 'true'"
AfterTargets="_AfterAndroidBuild"
DependsOnTargets="$(AndroidBuildDependsOn)" >
<PropertyGroup>
<!-- Helix properties -->
<!-- AnyCPU as Platform-->
<OSPlatformConfig>$(TargetOS).AnyCPU.$(Configuration)</OSPlatformConfig>
<!-- <OSPlatformConfig>$(TargetOS).$(Platform).$(Configuration)</OSPlatformConfig> -->
<HelixArchiveRoot>$(ArtifactsDir)helix/</HelixArchiveRoot>
<HelixArchiveRunOnlyRoot>$(HelixArchiveRoot)runonly/</HelixArchiveRunOnlyRoot>
<HelixArchiveRunOnlyAppsDir>$(HelixArchiveRunOnlyRoot)$(OSPlatformConfig)/</HelixArchiveRunOnlyAppsDir>
</PropertyGroup>
<ItemGroup>
<_apkFiles Include="$(ApkBundlePath)" />
</ItemGroup>
<Copy SourceFiles="@(_apkFiles)"
DestinationFolder="$(HelixArchiveRunOnlyAppsDir)/%(RecursiveDir)" />
<Message Importance="High" Text="ApkBundlePath: $(ApkBundlePath)"/>
<Message Importance="High" Text="TestArchiveTestsDir: $(TestArchiveTestsDir)"/>
</Target>
</Project>