|
10 | 10 | <!-- Path to .aar file within the extracted contents of the cached download --> |
11 | 11 | <_XbdAarFile_>m2repository\com\android\support\$AarKey$\$AarVersion$\$AarKey$-$AarVersion$.aar</_XbdAarFile_> |
12 | 12 |
|
13 | | - <!-- Path to .aar file within the Android SDK --> |
14 | | - <_XbdAarFileInSdk_>$(AndroidSdkPath)\extras\android\$(_XbdAarFile_)</_XbdAarFileInSdk_> |
| 13 | + <!-- Full path to .aar file, assuming we had to download to the cache - we reset this later if it is in the sdk --> |
| 14 | + <_XbdAarFileFullPath_>$(XamarinBuildDownloadDir)\$(_XbdKey_)\$(_XbdAarFile_)</_XbdAarFileFullPath_> |
15 | 15 |
|
16 | 16 | <!-- Assembly name to embed .aar in --> |
17 | 17 | <_XbdAssemblyName_>$XbdAssemblyName$</_XbdAssemblyName_> |
18 | 18 | </PropertyGroup> |
19 | 19 |
|
20 | | - <!-- If the Android SDK does NOT have Support Libs installed --> |
21 | | - <PropertyGroup Condition="!Exists('$(_XbdAarFileInSdk_)')"> |
22 | | - <_XbdAarFileFullPath_>$(XamarinBuildDownloadDir)$(_XbdKey_)\$(_XbdAarFile_)</_XbdAarFileFullPath_> |
23 | | - </PropertyGroup> |
24 | | - |
25 | | - <!-- If the Android SDK DOES have Support Libs installed --> |
26 | | - <PropertyGroup Condition="Exists('$(_XbdAarFileInSdk_)')"> |
27 | | - <_XbdAarFileFullPath_>$(_XbdAarFileInSdk_)</_XbdAarFileFullPath_> |
28 | | - </PropertyGroup> |
29 | | - |
30 | 20 | <ItemGroup> |
31 | | - <XamarinBuildDownload Include="$(_XbdKey_)" Condition="!Exists('$(_XbdAarFileInSdk_)')"> |
| 21 | + <XamarinBuildDownload Include="$(_XbdKey_)" Condition="!Exists('$(AndroidSdkDirectory)\extras\android\$(_XbdAarFile_)')"> |
32 | 22 | <Url>$(_XbdUrl_)</Url> |
33 | 23 | <Kind>Zip</Kind> |
34 | 24 | <Sha1>$(_XbdSha1_)</Sha1> |
|
40 | 30 | </ItemGroup> |
41 | 31 |
|
42 | 32 | <Target Name="_XbdRestoreItems_"> |
| 33 | + <!-- Check if the aar file is in the android sdk already and change the path to use to it, if it's found --> |
| 34 | + <CreateProperty Value="$(AndroidSdkDirectory)\extras\android\$(_XbdAarFile_)" Condition="Exists('$(AndroidSdkDirectory)\extras\android\$(_XbdAarFile_)')"> |
| 35 | + <Output PropertyName="_XbdAarFileFullPath_" TaskParameter="Value" /> |
| 36 | + </CreateProperty> |
| 37 | + |
43 | 38 | <ItemGroup> |
44 | 39 | <XamarinBuildDownloadRestoreAssemblyAar Include="$(_XbdAarFileFullPath_)"> |
45 | 40 | <LogicalName>__AndroidLibraryProjects__.zip</LogicalName> |
|
0 commit comments