|
4 | 4 | <_Destination>$(MicrosoftAndroidSdkOutDir)</_Destination>
|
5 | 5 | <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
|
6 | 6 | <_BundleToolDownloadLocation>$(AndroidToolchainCacheDirectory)\bundletool-all-$(XABundleToolVersion).jar</_BundleToolDownloadLocation>
|
7 |
| - <_BundleToolExtractLocation>$(AndroidToolchainCacheDirectory)\bundletool-unzip</_BundleToolExtractLocation> |
| 7 | + <_BundleToolCopyLocation>$(AndroidToolchainCacheDirectory)\bundletool-all-$(XABundleToolVersion)-copy.jar</_BundleToolCopyLocation> |
| 8 | + <_BundleToolExtractLocation>$(AndroidToolchainCacheDirectory)\bundletool-unzip-$(XABundleToolVersion)</_BundleToolExtractLocation> |
8 | 9 | <_JarPath Condition=" '$(JavaSdkDirectory)' != '' ">$(JavaSdkDirectory)/bin/jar</_JarPath>
|
9 | 10 | <_JarPath Condition=" '$(_JarPath)' == '' ">jar</_JarPath>
|
10 | 11 | </PropertyGroup>
|
|
21 | 22 | DependsOnTargets="_DownloadBundleTool"
|
22 | 23 | Inputs="$(_BundleToolDownloadLocation)"
|
23 | 24 | Outputs="$(_Destination)bundletool.jar" >
|
24 |
| - <!-- Strip aapt2 from bundletool.jar, as we pass it our own path to aapt2. |
25 |
| - This simplifies macOS signing/hardening and reduces our installation footprint slightly. --> |
| 25 | + <!-- Strip unused jna content and aapt2 from bundletool.jar, as we pass it our own path to aapt2. |
| 26 | + This simplifies signing/hardening and reduces our installation footprint slightly. --> |
26 | 27 | <RemoveDir Directories="$(_BundleToolExtractLocation)" />
|
27 | 28 | <MakeDir Directories="$(_BundleToolExtractLocation)" />
|
28 |
| - <Exec WorkingDirectory="$(_BundleToolExtractLocation)" Command="$(_JarPath) -xf "$(_BundleToolDownloadLocation)"" /> |
29 |
| - <Delete Files="$(_BundleToolDownloadLocation);$(_BundleToolExtractLocation)\linux\aapt2;$(_BundleToolExtractLocation)\macos\aapt2;$(_BundleToolExtractLocation)\windows\aapt2.exe" /> |
30 |
| - <Exec WorkingDirectory="$(_BundleToolExtractLocation)" Command="$(_JarPath) -cmf META-INF/MANIFEST.MF "$(_BundleToolDownloadLocation)" ." /> |
31 |
| - <RemoveDir Directories="$(_BundleToolExtractLocation)" /> |
32 | 29 | <Copy
|
33 | 30 | SourceFiles="$(_BundleToolDownloadLocation)"
|
| 31 | + DestinationFiles="$(_BundleToolCopyLocation)" |
| 32 | + SkipUnchangedFiles="True" |
| 33 | + /> |
| 34 | + <Exec WorkingDirectory="$(_BundleToolExtractLocation)" Command="$(_JarPath) -xf "$(_BundleToolCopyLocation)"" /> |
| 35 | + <Delete Files="$(_BundleToolCopyLocation)" /> |
| 36 | + <Delete Files="$(_BundleToolExtractLocation)\linux\aapt2;$(_BundleToolExtractLocation)\macos\aapt2;$(_BundleToolExtractLocation)\windows\aapt2.exe" /> |
| 37 | + <RemoveDir Directories="$(_BundleToolExtractLocation)\com\sun\jna" /> |
| 38 | + <Exec WorkingDirectory="$(_BundleToolExtractLocation)" Command="$(_JarPath) -cmf META-INF/MANIFEST.MF "$(_BundleToolCopyLocation)" ." /> |
| 39 | + <RemoveDir Directories="$(_BundleToolExtractLocation)" /> |
| 40 | + <Copy |
| 41 | + SourceFiles="$(_BundleToolCopyLocation)" |
34 | 42 | DestinationFiles="$(_Destination)bundletool.jar"
|
35 | 43 | SkipUnchangedFiles="True"
|
36 | 44 | />
|
|
0 commit comments