From d8f8486718072b040d27a0955a5778e2618116f3 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Thu, 5 May 2022 06:16:37 -0400 Subject: [PATCH] [build] Remove proguard submodule and use nupkg (#6983) * Bump to Guardsquare/proguard@b4ab30a5 [v7.1.1] Bump from ProGuard v7.0.1 to v7.1.1. Changes: https://github.com/Guardsquare/proguard/compare/912d149394fc96072905735649327d4101980832...b4ab30a5b7fbf2e58bdbe14df8ef1146063894e4 Attempts to build proguard without a cache in place have been failing: FAILURE: Build failed with an exception. * What went wrong: Could not determine the dependencies of task ':base:fatJar'. > Could not resolve all dependencies for configuration ':base:runtime'. > Could not resolve com.guardsquare:proguard-core:7.0.1. Required by: project :base > Could not resolve com.guardsquare:proguard-core:7.0.1. > Could not get resource 'https://jcenter.bintray.com/com/guardsquare/proguard-core/7.0.1/proguard-core-7.0.1.module'. > Could not GET 'https://jcenter.bintray.com/com/guardsquare/proguard-core/7.0.1/proguard-core-7.0.1.module'. > Read timed out Proguard v7.1.0 [moves from jcenter to Maven Central][0], which should fix this issue. [0]: https://github.com/Guardsquare/proguard/commit/87000a49ece9bc70ce2b3006bbd6ad5dbb1d3f62 * Remove proguard submodule, use nupkg * Remove external/proguard references * Fix line endings --- .gitmodules | 5 --- Configuration.props | 2 - .../automation/CredScanSuppressions.json | 8 ---- build-tools/create-vsix/VSPackage.resx.in | 1 - build-tools/create-vsix/create-vsix.targets | 4 +- build-tools/scripts/XAVersionInfo.targets | 3 -- .../Step_DetermineAzurePipelinesTestJobs.cs | 5 --- external/proguard | 1 - .../Xamarin.Android.Build.Tasks.targets | 2 +- .../Xamarin.Android.BuildInfo.txt.in | 1 - src/proguard/proguard.csproj | 12 ++++-- src/proguard/proguard.targets | 39 +++++-------------- 12 files changed, 21 insertions(+), 62 deletions(-) delete mode 160000 external/proguard diff --git a/.gitmodules b/.gitmodules index 83c95bab23b..8b2fa1df307 100644 --- a/.gitmodules +++ b/.gitmodules @@ -30,11 +30,6 @@ path = external/opentk url = https://github.com/mono/opentk.git branch = main -[submodule "external/proguard"] - path = external/proguard - url = https://github.com/Guardsquare/proguard.git - branch = master - ignore = dirty [submodule "external/robin-map"] path = external/robin-map url = https://github.com/Tessil/robin-map.git diff --git a/Configuration.props b/Configuration.props index 7bae0405520..f485f865154 100644 --- a/Configuration.props +++ b/Configuration.props @@ -110,7 +110,6 @@ $(MingwZlibRootDirectory)\i686-w64-mingw32 $(MingwZlibRootDirectory)\x86_64-w64-mingw32 libz.a - $(MSBuildThisFileDirectory)external\proguard $(MSBuildThisFileDirectory)external\sqlite $(MSBuildThisFileDirectory) $(MSBuildThisFileDirectory)src-ThirdParty\ @@ -168,7 +167,6 @@ $([System.IO.Path]::GetFullPath ('$(LinkerSourceDirectory)')) $([System.IO.Path]::GetFullPath ('$(SqliteSourceDirectory)')) $([System.IO.Path]::GetFullPath ('$(OpenTKSourceDirectory)')) - $([System.IO.Path]::GetFullPath ('$(ProGuardSourceDirectory)')) $(AndroidSdkFullPath)\platform-tools\ diff --git a/build-tools/automation/CredScanSuppressions.json b/build-tools/automation/CredScanSuppressions.json index 86e3b8d387a..d484f12ded2 100644 --- a/build-tools/automation/CredScanSuppressions.json +++ b/build-tools/automation/CredScanSuppressions.json @@ -36,14 +36,6 @@ { "file": "external\\android-api-docs\\docs\\Mono.Android\\en\\Javax.Crypto.Interfaces\\IPBEKey.xml", "_justification": "Android API documentation, does not contain a password." - }, - { - "file": "external\\proguard\\examples\\android\\debug.keystore", - "_justification": "Dummy keystore file from a proguard example." - }, - { - "file": "external\\proguard\\examples\\android-plugin\\debug.keystore", - "_justification": "Dummy keystore file from a proguard example." } ] } diff --git a/build-tools/create-vsix/VSPackage.resx.in b/build-tools/create-vsix/VSPackage.resx.in index d38a2dc768f..e1fbcd0c69e 100644 --- a/build-tools/create-vsix/VSPackage.resx.in +++ b/build-tools/create-vsix/VSPackage.resx.in @@ -135,7 +135,6 @@ Xamarin.Android Reference Assemblies and MSBuild support. Mono: @MONO_COMMIT@ Java.Interop: @JAVA_INTEROP_COMMIT@ - ProGuard: @PROGUARD_COMMIT@ SQLite: @SQLITE_COMMIT@ Xamarin.Android Tools: @XAMARIN_ANDROID_TOOLS_COMMIT@ diff --git a/build-tools/create-vsix/create-vsix.targets b/build-tools/create-vsix/create-vsix.targets index 40b7d3e37b6..7c12ffc96d8 100644 --- a/build-tools/create-vsix/create-vsix.targets +++ b/build-tools/create-vsix/create-vsix.targets @@ -72,13 +72,13 @@ + Replacements="@PACKAGE_VERSION@=$(ProductVersion);@PACKAGE_VERSION_BUILD@=$(XAVersionCommitCount);@PACKAGE_HEAD_REV@=$(XAVersionHash);@PACKAGE_HEAD_BRANCH@=$(XAVersionBranch);@MONO_COMMIT@=$(_BuildInfo_MonoCommit);@JAVA_INTEROP_COMMIT@=$(_BuildInfo_JavaInteropCommit);@SQLITE_COMMIT@=$(_BuildInfo_SqliteCommit);@XAMARIN_ANDROID_TOOLS_COMMIT@=$(_BuildInfo_XamarinAndroidToolsCommit);"> + Replacements="@MONO_COMMIT@=$(_BuildInfo_MonoCommit);@JAVA_INTEROP_COMMIT@=$(_BuildInfo_JavaInteropCommit);@SQLITE_COMMIT@=$(_BuildInfo_SqliteCommit);@XAMARIN_ANDROID_TOOLS_COMMIT@=$(_BuildInfo_XamarinAndroidToolsCommit);"> _BuildInfo_JavaInteropCommit - <_SubmoduleBranchInfo Include="external/proguard"> - _BuildInfo_ProguardCommit - <_SubmoduleBranchInfo Include="external/sqlite"> _BuildInfo_SqliteCommit diff --git a/build-tools/xaprepare/xaprepare/Steps/Step_DetermineAzurePipelinesTestJobs.cs b/build-tools/xaprepare/xaprepare/Steps/Step_DetermineAzurePipelinesTestJobs.cs index cb8f0f5d26e..f14f2ffeeb0 100644 --- a/build-tools/xaprepare/xaprepare/Steps/Step_DetermineAzurePipelinesTestJobs.cs +++ b/build-tools/xaprepare/xaprepare/Steps/Step_DetermineAzurePipelinesTestJobs.cs @@ -67,11 +67,6 @@ protected override async Task Execute (Context context) testAreas.Add ("Designer"); } - if (file.Contains ("external/proguard")) { - testAreas.Add ("MSBuild"); - testAreas.Add ("MSBuildDevice"); - } - if (file.Contains ("external/sqlite")) { testAreas.Add ("MSBuildDevice"); } diff --git a/external/proguard b/external/proguard deleted file mode 160000 index 912d149394f..00000000000 --- a/external/proguard +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 912d149394fc96072905735649327d4101980832 diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.targets index a0fb7f51a6e..93cf53d9822 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.targets +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.targets @@ -210,7 +210,7 @@ + Replacements="@MONO_COMMIT@=$(_BuildInfo_MonoCommit);@JAVA_INTEROP_COMMIT@=$(_BuildInfo_JavaInteropCommit);@SQLITE_COMMIT@=$(_BuildInfo_SqliteCommit);@XAMARIN_ANDROID_TOOLS_COMMIT@=$(_BuildInfo_XamarinAndroidToolsCommit);"> netstandard2.0 false - + - + + + + + + $(XAInstallPrefix)xbuild\Xamarin\Android\proguard\ - + \ No newline at end of file diff --git a/src/proguard/proguard.targets b/src/proguard/proguard.targets index 01221199a9f..ed8eef66c55 100644 --- a/src/proguard/proguard.targets +++ b/src/proguard/proguard.targets @@ -1,48 +1,27 @@ + <_InputJar>$(PkgXamarin_Android_Proguard)\proguard\lib\proguard.jar <_OutputJar>$(OutputPath)lib/proguard.jar + <_InputBat>$(PkgXamarin_Android_Proguard)\proguard\\bin\proguard.bat <_OutputBat>$(OutputPath)bin\proguard.bat + <_InputSh>$(PkgXamarin_Android_Proguard)\proguard\bin\proguard.sh <_OutputSh>$(OutputPath)bin/proguard.sh + <_InputLicense>$(PkgXamarin_Android_Proguard)\proguard\license.md <_OutputLicense>$(OutputPath)license.md + <_Inputs Include="$(_InputJar);$(_InputBat);$(_InputSh);$(_InputLicense)" /> <_Outputs Include="$(_OutputJar);$(_OutputBat);$(_OutputSh);$(_OutputLicense)" /> - - - - - - - - - -