-
Notifications
You must be signed in to change notification settings - Fork 534
/
Copy pathXamarin.Android.Application.targets
55 lines (53 loc) · 2.81 KB
/
Xamarin.Android.Application.targets
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
<?xml version="1.0" encoding="UTF-8" ?>
<!--
***********************************************************************************************
Xamarin.Android.Application.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (C) 2019 Microsoft Corporation. All rights reserved.
***********************************************************************************************
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="Xamarin.Android.Tasks.GetAndroidActivityName" AssemblyFile="Xamarin.Android.Build.Tasks.dll" />
<Target Name="StartAndroidActivity"
DependsOnTargets="_ResolveMonoAndroidSdks;_GetAndroidPackageName">
<GetAndroidActivityName
Condition=" '$(AndroidLaunchActivity)' == '' "
ManifestFile="$(IntermediateOutputPath)android\AndroidManifest.xml">
<Output TaskParameter="ActivityName" PropertyName="AndroidLaunchActivity" />
</GetAndroidActivityName>
<Exec Command=""$(AdbToolPath)adb" $(AdbTarget) shell am start -n "$(_AndroidPackage)/$(AndroidLaunchActivity)"" />
</Target>
<Target Name="StopAndroidPackage"
DependsOnTargets="_ResolveMonoAndroidSdks;_GetAndroidPackageName">
<Exec Command=""$(AdbToolPath)adb" $(AdbTarget) shell am force-stop "$(_AndroidPackage)"" />
</Target>
<PropertyGroup>
<AndroidAotCustomProfilePath Condition=" '$(AndroidAotCustomProfilePath)' == '' ">custom.aprof</AndroidAotCustomProfilePath>
<AndroidAotProfilerPort Condition=" '$(AndroidAotProfilerPort)' == '' ">9999</AndroidAotProfilerPort>
<_BeginAotProfilingDependsOnTargets>
_SetupAotProfiling;
Build;
Install;
_SetAotProfilingPropsOnDevice;
StartAndroidActivity;
</_BeginAotProfilingDependsOnTargets>
</PropertyGroup>
<Target Name="_SetupAotProfiling">
<PropertyGroup>
<AndroidEmbedProfilers>aot</AndroidEmbedProfilers>
</PropertyGroup>
</Target>
<Target Name="_SetAotProfilingPropsOnDevice">
<Exec Command=""$(AdbToolPath)adb" $(AdbTarget) shell setprop debug.mono.profile aot:port=$(AndroidAotProfilerPort)" />
</Target>
<Target Name="BuildAndStartAotProfiling"
DependsOnTargets="$(_BeginAotProfilingDependsOnTargets)">
</Target>
<Target Name="FinishAotProfiling"
DependsOnTargets="_ResolveSdks">
<Exec Command=""$(AdbToolPath)adb" $(AdbTarget) forward tcp:$(AndroidAotProfilerPort) tcp:$(AndroidAotProfilerPort)" />
<Exec Command=""$(MonoAndroidBinDirectory)aprofutil" $(AProfUtilExtraOptions) -s -v -p $(AndroidAotProfilerPort) -o "$(AndroidAotCustomProfilePath)"" />
</Target>
</Project>