Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Changes: Guardsquare/proguard@proguard5.3.2...proguard6.2.2

This updates our `external/proguard` submodule from:

	https://github.com/xamarin/proguard

To the official ProGuard source on Github:

	https://github.com/Guardsquare/proguard/

To build only `proguard.jar` and no other optional components, I was
able to build `:core` and copy `core.jar` to the proper location.

I also added `ignore = dirty` setting, since we lost control of the
`.gitignore` setup in the `external/proguard` git submodule.  Otherwise
we will always show changes to `external/proguard` after a build.

Note: xamarin/proguard@6d834737 corresponds roughly to
Guardsquare/proguard@b91da636, "missing" only the ignorable
commits:

  * xamarin/proguard@1358e520: Add legal NOTICES
  * xamarin/proguard@905836d0: Ignore generated directories
  • Loading branch information
jonathanpeppers committed May 14, 2020
1 parent 9de5abd commit 0ec53c5
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
branch = master
[submodule "external/proguard"]
path = external/proguard
url = https://github.com/xamarin/proguard.git
url = https://github.com/Guardsquare/proguard.git
branch = master
ignore = dirty
[submodule "external/sqlite"]
path = external/sqlite
url = https://github.com/xamarin/sqlite.git
Expand Down
12 changes: 12 additions & 0 deletions Documentation/release-notes/4683.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### ProGuard version update to 6.2.2

The version of ProGuard included in Xamarin.Android has been updated
from 5.3.2 to [6.2.2][proguard], bringing in a number of improvements
and bug fixes.

> [!NOTE]
> ProGuard is only relevant for projects configured to use the older
> DX DEX compiler. Project authors are recommended to update to the
> newer D8 DEX compiler at their earliest convenience.
[proguard]: https://www.guardsquare.com/products/proguard/manual/versions
8 changes: 8 additions & 0 deletions build-tools/automation/CredScanSuppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@
{
"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."
}
]
}
2 changes: 1 addition & 1 deletion build-tools/installers/create-installers.targets
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
<_MSBuildFiles Include="$(MSBuildSrcDir)\pdb2mdb.exe" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\pdb2mdb.pdb" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\proguard\lib\proguard.jar"/>
<_MSBuildFiles Include="$(MSBuildSrcDir)\proguard\license.html" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\proguard\license.md" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\startup.aotprofile" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\startup-xf.aotprofile" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\r8.jar" />
Expand Down
4 changes: 2 additions & 2 deletions build-tools/xaprepare/xaprepare/ThirdPartyNotices/proguard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ namespace Xamarin.Android.Prepare
[TPN]
class proguard_xamarin_proguard_TPN : ThirdPartyNotice
{
static readonly Uri url = new Uri ("https://github.com/xamarin/proguard/");
static readonly Uri url = new Uri ("https://github.com/Guardsquare/proguard");

public override string LicenseFile => CommonLicenses.GPLv2Path;
public override string Name => "xamarin/proguard";
public override string Name => "Guardsquare/proguard";
public override Uri SourceUrl => url;
public override string LicenseText => String.Empty;

Expand Down
2 changes: 1 addition & 1 deletion external/proguard
14 changes: 7 additions & 7 deletions src/proguard/proguard.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
<_OutputJar>$(OutputPath)lib\proguard.jar</_OutputJar>
<_OutputBat>$(OutputPath)bin\proguard.bat</_OutputBat>
<_OutputSh>$(OutputPath)bin\proguard.sh</_OutputSh>
<_OutputLicense>$(OutputPath)license.html</_OutputLicense>
<_OutputLicense>$(OutputPath)license.md</_OutputLicense>
</PropertyGroup>
<ItemGroup>
<_Outputs Include="$(_OutputJar);$(_OutputBat);$(_OutputSh);$(_OutputLicense)" />
</ItemGroup>
<Target Name="_BuildProGuard"
Inputs="$(MSBuildThisFile);$(ProGuardSourceFullPath)\buildscripts\build.xml"
Inputs="$(MSBuildThisFile)"
Outputs="@(_Outputs)">
<Exec
Command="&quot;$(GradleWPath)&quot; proguardJar $(GradleArgs)"
Command="&quot;$(GradleWPath)&quot; jar $(GradleArgs)"
EnvironmentVariables="JAVA_HOME=$(JavaSdkDirectory);APP_HOME=$(GradleHome)"
WorkingDirectory="$(ProGuardSourceFullPath)\buildscripts"
WorkingDirectory="$(ProGuardSourceFullPath)\core"
/>
<MakeDir Directories="$(OutputPath)" />
<Copy
SourceFiles="..\..\external\proguard\lib\proguard.jar"
SourceFiles="..\..\external\proguard\core\build\libs\core.jar"
DestinationFiles="$(_OutputJar)"
/>
<Copy
Expand All @@ -30,7 +30,7 @@
DestinationFiles="$(_OutputSh)"
/>
<Copy
SourceFiles="..\..\external\proguard\docs\license.html"
SourceFiles="..\..\external\proguard\docs\license.md"
DestinationFiles="$(_OutputLicense)"
/>
<Touch Files="@(_Outputs)" />
Expand All @@ -40,7 +40,7 @@
<Exec
Command="&quot;$(GradleWPath)&quot; clean $(GradleArgs)"
EnvironmentVariables="JAVA_HOME=$(JavaSdkDirectory);APP_HOME=$(GradleHome)"
WorkingDirectory="$(ProGuardSourceFullPath)\buildscripts"
WorkingDirectory="$(ProGuardSourceFullPath)\core"
/>
</Target>
<Target Name="CoreCompile" />
Expand Down

0 comments on commit 0ec53c5

Please sign in to comment.