-
Notifications
You must be signed in to change notification settings - Fork 534
/
Copy pathXamarin.Android.EmbeddedResource.targets
95 lines (83 loc) · 5.35 KB
/
Xamarin.Android.EmbeddedResource.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
85
86
87
88
89
90
91
92
93
94
95
<!--
***********************************************************************************************
Xamarin.Android.EmbeddedResource.targets
This file contains MSBuild targets related to the creation or
extraction of `__AndroidLibraryProjects__.zip` or
`__AndroidNativeLibraries__.zip`. These are packaged as
`EmbeddedResource` files in Xamarin.Android assemblies. The actual
creation of these files has moved to Xamarin.Android.Legacy.targets.
This file is used by all project types, including binding projects.
***********************************************************************************************
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="Xamarin.Android.Tasks.GetImportedLibraries" AssemblyFile="Xamarin.Android.Build.Tasks.dll" />
<UsingTask TaskName="Xamarin.Android.Tasks.ReadImportedLibrariesCache" AssemblyFile="Xamarin.Android.Build.Tasks.dll" />
<UsingTask TaskName="Xamarin.Android.Tasks.ReadLibraryProjectImportsCache" AssemblyFile="Xamarin.Android.Build.Tasks.dll" />
<UsingTask TaskName="Xamarin.Android.Tasks.ResolveLibraryProjectImports" AssemblyFile="Xamarin.Android.Build.Tasks.dll" />
<PropertyGroup>
<_LibraryProjectImportsDirectoryName Condition=" '$(_LibraryProjectImportsDirectoryName)' == '' ">jl</_LibraryProjectImportsDirectoryName>
<_NativeLibraryImportsDirectoryName Condition=" '$(_NativeLibraryImportsDirectoryName)' == '' ">nl</_NativeLibraryImportsDirectoryName>
<_AndroidLibraryImportsCache>$(IntermediateOutputPath)libraryimports.cache</_AndroidLibraryImportsCache>
<_AndroidLibraryProjectImportsCache>$(IntermediateOutputPath)libraryprojectimports.cache</_AndroidLibraryProjectImportsCache>
<_AndroidLibrayProjectIntermediatePath Condition=" '$(_AndroidLibrayProjectIntermediatePath)' == '' ">$(IntermediateOutputPath)lp\</_AndroidLibrayProjectIntermediatePath>
<_AndroidLibrayProjectAssemblyMapFile>$(_AndroidLibrayProjectIntermediatePath)map.cache</_AndroidLibrayProjectAssemblyMapFile>
</PropertyGroup>
<Target Name="_ResolveLibraryProjectImports"
DependsOnTargets="$(CoreResolveReferencesDependsOn)"
Inputs="$(ProjectAssetsFile);$(MSBuildProjectFullPath);@(_MonoAndroidReferencePath);@(_MonoAndroidReferenceDependencyPaths);@(AndroidAarLibrary);$(_AndroidBuildPropertiesCache)"
Outputs="$(_AndroidStampDirectory)_ResolveLibraryProjectImports.stamp">
<ResolveLibraryProjectImports
ContinueOnError="$(DesignTimeBuild)"
CacheFile="$(_AndroidLibraryProjectImportsCache)"
DesignTimeBuild="$(DesignTimeBuild)"
Assemblies="@(_MonoAndroidReferencePath);@(_MonoAndroidReferenceDependencyPaths)"
AarLibraries="@(AndroidAarLibrary)"
ImportsDirectory="$(_LibraryProjectImportsDirectoryName)"
NativeImportsDirectory="$(_NativeLibraryImportsDirectoryName)"
OutputDirectory="$(IntermediateOutputPath)"
AssemblyIdentityMapFile="$(_AndroidLibrayProjectAssemblyMapFile)"
OutputImportDirectory="$(_AndroidLibrayProjectIntermediatePath)"
/>
<Touch Files="$(_AndroidStampDirectory)_ResolveLibraryProjectImports.stamp" AlwaysCreate="true" />
</Target>
<Target Name="_ExtractLibraryProjectImports" DependsOnTargets="_ResolveLibraryProjectImports">
<ReadLibraryProjectImportsCache
CacheFile="$(_AndroidLibraryProjectImportsCache)">
<Output TaskParameter="ResolvedResourceDirectories" ItemName="LibraryResourceDirectories" />
<Output TaskParameter="ResolvedAssetDirectories" ItemName="LibraryAssetDirectories" />
<Output TaskParameter="ResolvedEnvironmentFiles" ItemName="LibraryEnvironments" />
<Output TaskParameter="ResolvedResourceDirectoryStamps" ItemName="_LibraryResourceDirectoryStamps" />
</ReadLibraryProjectImportsCache>
</Target>
<Target Name="_BuildLibraryImportsCache"
Inputs="$(_AndroidLibraryProjectImportsCache)"
Outputs="$(_AndroidStampDirectory)_BuildLibraryImportsCache.stamp">
<GetImportedLibraries
TargetDirectory="$(_AndroidLibrayProjectIntermediatePath)"
CacheFile="$(_AndroidLibraryImportsCache)"
/>
<Touch Files="$(_AndroidStampDirectory)_BuildLibraryImportsCache.stamp" AlwaysCreate="true" />
<ItemGroup>
<FileWrites Include="$(_AndroidStampDirectory)_BuildLibraryImportsCache.stamp" />
</ItemGroup>
</Target>
<PropertyGroup>
<_GetLibraryImportsDependsOnTargets Condition=" '$(_AndroidIsBindingProject)' == 'true' ">
_ExtractLibraryProjectImports;
_BuildLibraryImportsCache;
</_GetLibraryImportsDependsOnTargets>
<_GetLibraryImportsDependsOnTargets Condition=" '$(_AndroidIsBindingProject)' != 'true' ">
_ExtractLibraryProjectImports;
_AddMultiDexDependencyJars;
_BuildLibraryImportsCache;
</_GetLibraryImportsDependsOnTargets>
</PropertyGroup>
<Target Name="_GetLibraryImports" DependsOnTargets="$(_GetLibraryImportsDependsOnTargets)">
<ReadImportedLibrariesCache CacheFile="$(_AndroidLibraryImportsCache)">
<Output TaskParameter="Jars" ItemName="ExtractedJarImports" />
<Output TaskParameter="NativeLibraries" ItemName="ExtractedNativeLibraryImports" />
<Output TaskParameter="NativeLibraries" ItemName="AndroidNativeLibrary" />
<Output TaskParameter="ManifestDocuments" ItemName="ExtractedManifestDocuments" />
</ReadImportedLibrariesCache>
</Target>
</Project>