This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 167
/
Copy pathAnalytics.targets
84 lines (73 loc) · 4.6 KB
/
Analytics.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<Project>
<PropertyGroup>
<_GoogleAnalyticsAssemblyName>Google.Analytics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</_GoogleAnalyticsAssemblyName>
<_GoogleAnalyticsItemsFolder>GAnlytcs-3.20</_GoogleAnalyticsItemsFolder>
<_GoogleAnalyticsSDKBaseFolder>$(XamarinBuildDownloadDir)$(_GoogleAnalyticsItemsFolder)\</_GoogleAnalyticsSDKBaseFolder>
<_GoogleAnalyticsFrameworksBaseFolder>$(XamarinBuildDownloadDir)$(_GoogleAnalyticsItemsFolder)\GoogleAnalytics-3.20.0\Frameworks\</_GoogleAnalyticsFrameworksBaseFolder>
</PropertyGroup>
<ItemGroup Condition="('$(OutputType)'!='Library' OR '$(IsAppExtension)'=='True')">
<XamarinBuildDownload Include="$(_GoogleAnalyticsItemsFolder)">
<Url>https://dl.google.com/firebase/ios/analytics/6c1e3b250fd4941d/GoogleAnalytics-3.20.0.tar.gz</Url>
<Kind>Tgz</Kind>
</XamarinBuildDownload>
<NativeReference Include="$(_GoogleAnalyticsFrameworksBaseFolder)GoogleAnalytics.xcframework">
<Kind>Static</Kind>
<SmartLink>True</SmartLink>
<ForceLoad>True</ForceLoad>
<IsCxx>True</IsCxx>
<LinkerFlags>-ObjC -lz -lsqlite3</LinkerFlags>
<Frameworks>CoreData SystemConfiguration</Frameworks>
</NativeReference>
</ItemGroup>
<!-- -->
<!-- Targets to strip bitcode from specified frameworks -->
<!-- -->
<!-- Framework names to strip bitcode -->
<ItemGroup Condition="('$(OutputType)'!='Library' OR '$(IsAppExtension)'=='True')">
<_FrameworkNamesToStripBitcode Include="GoogleAnalytics" />
</ItemGroup>
<PropertyGroup>
<!-- Properties used to strip bitcode from frameworks when using Visual Studio for Mac -->
<_GoogleAnalyticsStripBitcodeFromFrameworksMasterAfterTargets Condition="'$(OS)'=='Unix'">_ExpandNativeReferences</_GoogleAnalyticsStripBitcodeFromFrameworksMasterAfterTargets>
<_GoogleAnalyticsStripBitcodeFromFrameworksMasterDependsOnTargets Condition="'$(OS)'=='Unix'">_GoogleAnalyticsStripBitcodeFromFrameworksOnMac</_GoogleAnalyticsStripBitcodeFromFrameworksMasterDependsOnTargets>
<!-- Properties used to strip bitcode from frameworks when using Visual Studio for Windows -->
<_GoogleAnalyticsStripBitcodeFromFrameworksMasterAfterTargets Condition="'$(OS)'!='Unix'">_ComputeFrameworkFilesToPublish</_GoogleAnalyticsStripBitcodeFromFrameworksMasterAfterTargets>
<_GoogleAnalyticsStripBitcodeFromFrameworksMasterDependsOnTargets Condition="'$(OS)'!='Unix'">_GoogleAnalyticsStripBitcodeFromFrameworksOnWindows</_GoogleAnalyticsStripBitcodeFromFrameworksMasterDependsOnTargets>
</PropertyGroup>
<Target Name="_GoogleAnalyticsStripBitcodeFromFrameworksMasterTarget"
Condition="'$(_GoogleAnalyticsStripBitcodeFromFrameworksMasterDependsOnTargets)'!='' AND ('$(OutputType)'!='Library' OR '$(IsAppExtension)'=='True') AND '$(_SdkIsSimulator)'=='False' AND @(_FrameworkNamesToStripBitcode->Count()) != 0"
AfterTargets="$(_GoogleAnalyticsStripBitcodeFromFrameworksMasterAfterTargets)"
DependsOnTargets="$(_GoogleAnalyticsStripBitcodeFromFrameworksMasterDependsOnTargets)" />
<Target Name="_GoogleAnalyticsStripBitcodeFromFrameworksOnMac">
<!-- Get the frameworks to strip bitcode -->
<FindInList
List="@(_FrameworkNativeReference)"
ItemSpecToFind="%(_FrameworkNamesToStripBitcode.Identity)"
MatchFileNameOnly="True">
<Output TaskParameter="ItemFound" ItemName="_FrameworksToStripBitcode"/>
</FindInList>
<!-- Find the bitcode_strip command -->
<Exec Command="xcrun -find bitcode_strip" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="_BitcodeStripCommand" />
</Exec>
<!-- Strip the bitcode from frameworks -->
<Exec Command="$(_BitcodeStripCommand) %(_FrameworksToStripBitcode.Identity) -r -o %(_FrameworksToStripBitcode.Identity)" />
</Target>
<Target Name="_GoogleAnalyticsStripBitcodeFromFrameworksOnWindows"
Condition="'$(IsMacEnabled)'=='true'">
<!-- Get the frameworks to strip bitcode -->
<FindInList
List="@(_FrameworkNativeReference)"
ItemSpecToFind="%(_FrameworkNamesToStripBitcode.Identity)"
MatchFileNameOnly="True">
<Output TaskParameter="ItemFound" ItemName="_FrameworksToStripBitcode"/>
</FindInList>
<!-- Strip the bitcode from frameworks -->
<Exec SessionId="$(BuildSessionId)"
Command=""%24(xcrun -find bitcode_strip)" %(_FrameworksToStripBitcode.Identity) -r -o %(_FrameworksToStripBitcode.Identity)" />
<CopyFileFromBuildServer
SessionId="$(BuildSessionId)"
File="%(_FrameworksToStripBitcode.Identity)"
TargetFile="%(_FrameworksToStripBitcode.Identity)" />
</Target>
</Project>