forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See bazelbuild#3777 The Android SDK provides a very old proguard and will be removing it soon, so we need to bundle our own. Change-Id: I054c54130bef1befc8591598768184fe23f76161 RELNOTES: None
- Loading branch information
1 parent
74776b4
commit b4ebfd7
Showing
853 changed files
with
144,779 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
licenses(["restricted"]) # GNU GPL v2 | ||
|
||
filegroup( | ||
name = "srcs", | ||
srcs = glob(["**"]), | ||
visibility = ["//third_party:__pkg__"], | ||
) | ||
|
||
filegroup( | ||
name = "embedded_tools", | ||
srcs = [ | ||
"BUILD.tools", | ||
"proguard5.3.3/docs/GPL.html", | ||
"proguard5.3.3/lib/proguard.jar", | ||
], | ||
visibility = ["//src:__pkg__"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
java_import( | ||
name = "proguard_import", | ||
jars = ["proguard5.3.3/lib/proguard.jar"], | ||
) | ||
|
||
java_binary( | ||
name = "proguard", | ||
main_class = "proguard.ProGuard", | ||
runtime_deps = [":proguard_import"], | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
ProGuard, Java class file shrinker, optimizer, obfuscator, and preverifier | ||
========================================================================== | ||
|
||
This distribution contains the following directories: | ||
|
||
- bin : simple wrapper scripts to run ProGuard, its GUI, and ReTrace | ||
- lib : the main jars, compiled and ready to use with "java -jar ...." | ||
- docs : the complete documentation, licenses, etc. in html format | ||
- examples : some example configuration files | ||
- src : the source code | ||
- buildscripts : various alternative build scripts | ||
|
||
|
||
The best place to start is docs/index.html | ||
|
||
|
||
Example | ||
------- | ||
|
||
If you want to give ProGuard a spin right away, try processing the ProGuard | ||
jar itself: | ||
|
||
cd examples | ||
java -jar ../lib/proguard.jar @proguard.pro | ||
|
||
The resulting proguard_out.jar contains the same application, but it's a lot | ||
smaller. | ||
|
||
Enjoy! | ||
|
||
http://proguard.sourceforge.net/ | ||
|
||
Copyright (c) 2002-2017 Eric Lafortune @ GuardSquare |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@ECHO OFF | ||
|
||
REM Start-up script for ProGuard -- free class file shrinker, optimizer, | ||
REM obfuscator, and preverifier for Java bytecode. | ||
REM | ||
REM Note: when passing file names containing spaces to this script, | ||
REM you'll have to add escaped quotes around them, e.g. | ||
REM "\"C:/My Directory/My File.txt\"" | ||
|
||
IF EXIST "%PROGUARD_HOME%" GOTO home | ||
SET PROGUARD_HOME=%~dp0\.. | ||
:home | ||
|
||
java -jar "%PROGUARD_HOME%\lib\proguard.jar" %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
# | ||
# Start-up script for ProGuard -- free class file shrinker, optimizer, | ||
# obfuscator, and preverifier for Java bytecode. | ||
# | ||
# Note: when passing file names containing spaces to this script, | ||
# you'll have to add escaped quotes around them, e.g. | ||
# "\"/My Directory/My File.txt\"" | ||
|
||
# Account for possibly missing/basic readlink. | ||
# POSIX conformant (dash/ksh/zsh/bash). | ||
PROGUARD=`readlink -f "$0" 2>/dev/null` | ||
if test "$PROGUARD" = '' | ||
then | ||
PROGUARD=`readlink "$0" 2>/dev/null` | ||
if test "$PROGUARD" = '' | ||
then | ||
PROGUARD="$0" | ||
fi | ||
fi | ||
|
||
PROGUARD_HOME=`dirname "$PROGUARD"`/.. | ||
|
||
java -jar "$PROGUARD_HOME/lib/proguard.jar" "$@" |
14 changes: 14 additions & 0 deletions
14
third_party/java/proguard/proguard5.3.3/bin/proguardgui.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@ECHO OFF | ||
|
||
REM Start-up script for the GUI of ProGuard -- free class file shrinker, | ||
REM optimizer, obfuscator, and preverifier for Java bytecode. | ||
REM | ||
REM Note: when passing file names containing spaces to this script, | ||
REM you'll have to add escaped quotes around them, e.g. | ||
REM "\"C:/My Directory/My File.txt\"" | ||
|
||
IF EXIST "%PROGUARD_HOME%" GOTO home | ||
SET PROGUARD_HOME=%~dp0\.. | ||
:home | ||
|
||
java -jar "%PROGUARD_HOME%\lib\proguardgui.jar" %* |
27 changes: 27 additions & 0 deletions
27
third_party/java/proguard/proguard5.3.3/bin/proguardgui.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
# | ||
# Start-up script for the GUI of ProGuard -- free class file shrinker, | ||
# optimizer, obfuscator, and preverifier for Java bytecode. | ||
# | ||
# Note: when passing file names containing spaces to this script, | ||
# you'll have to add escaped quotes around them, e.g. | ||
# "\"/My Directory/My File.txt\"" | ||
|
||
# Account for possibly missing/basic readlink. | ||
# POSIX conformant (dash/ksh/zsh/bash). | ||
PROGUARD=`readlink -f "$0" 2>/dev/null` | ||
if test "$PROGUARD" = '' | ||
then | ||
PROGUARD=`readlink "$0" 2>/dev/null` | ||
if test "$PROGUARD" = '' | ||
then | ||
PROGUARD="$0" | ||
fi | ||
fi | ||
|
||
PROGUARD_HOME=`dirname "$PROGUARD"`/.. | ||
|
||
# On Linux, Java 1.6.0_24 and higher hang when starting the GUI: | ||
# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7027598 | ||
# We're using the -D option as a workaround. | ||
java -DsuppressSwingDropSupport=true -jar "$PROGUARD_HOME/lib/proguardgui.jar" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@ECHO OFF | ||
|
||
REM Start-up script for Retrace -- companion tool for ProGuard, free class file | ||
REM shrinker, optimizer, obfuscator, and preverifier for Java bytecode. | ||
REM | ||
REM Note: when passing file names containing spaces to this script, | ||
REM you'll have to add escaped quotes around them, e.g. | ||
REM "\"C:/My Directory/My File.txt\"" | ||
|
||
IF EXIST "%PROGUARD_HOME%" GOTO home | ||
SET PROGUARD_HOME=%~dp0\.. | ||
:home | ||
|
||
java -jar "%PROGUARD_HOME%\lib\retrace.jar" %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
# | ||
# Start-up script for Retrace -- companion tool for ProGuard, free class file | ||
# shrinker, optimizer, obfuscator, and preverifier for Java bytecode. | ||
# | ||
# Note: when passing file names containing spaces to this script, | ||
# you'll have to add escaped quotes around them, e.g. | ||
# "\"/My Directory/My File.txt\"" | ||
|
||
# Account for possibly missing/basic readlink. | ||
# POSIX conformant (dash/ksh/zsh/bash). | ||
PROGUARD=`readlink -f "$0" 2>/dev/null` | ||
if test "$PROGUARD" = '' | ||
then | ||
PROGUARD=`readlink "$0" 2>/dev/null` | ||
if test "$PROGUARD" = '' | ||
then | ||
PROGUARD="$0" | ||
fi | ||
fi | ||
|
||
PROGUARD_HOME=`dirname "$PROGUARD"`/.. | ||
|
||
java -jar "$PROGUARD_HOME/lib/retrace.jar" "$@" |
42 changes: 42 additions & 0 deletions
42
third_party/java/proguard/proguard5.3.3/buildscripts/README
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
ProGuard, Java class file shrinker, optimizer, obfuscator, and preverifier | ||
========================================================================== | ||
|
||
This directory contains a number of alternative ways to build ProGuard: | ||
|
||
- build.sh : a shell script for GNU/Linux | ||
- makefile : a makefile for GNU/Linux | ||
- build.gradle : a Gradle build file for all platforms | ||
- build.xml : an Ant build file for all platforms | ||
- maven/pom.xml : a Maven POM for building the Maven artifacts | ||
|
||
- As a final alternative, you can also easily compile the code from the | ||
command line: | ||
|
||
mkdir classes | ||
javac -sourcepath src -d classes src/proguard/ProGuard.java | ||
javac -sourcepath src -d classes src/proguard/gui/ProGuardGUI.java | ||
javac -sourcepath src -d classes src/proguard/retrace/ReTrace.java | ||
|
||
For the ProGuard Gradle task: | ||
|
||
javac -sourcepath src -d classes -classpath ..... \ | ||
src/proguard/gradle/ProGuardTask.java | ||
|
||
For the ProGuard Ant task: | ||
|
||
javac -sourcepath src -d classes -classpath lib/ant.jar \ | ||
src/proguard/ant/ProGuardTask.java | ||
|
||
For the Java Micro Edition Wireless Tool Kit (JME WTK) obfuscator plug-in: | ||
|
||
javac -sourcepath src -d classes -classpath wtklib/kenv.zip \ | ||
src/proguard/wtk/ProGuardObfuscator.java | ||
|
||
Depending on the scripts, you may still need to install Gradle, Ant, Maven, | ||
and the JME WTK yourself. | ||
|
||
Enjoy! | ||
|
||
http://proguard.sourceforge.net/ | ||
|
||
Copyright (c) 2002-2017 Eric Lafortune @ GuardSquare |
111 changes: 111 additions & 0 deletions
111
third_party/java/proguard/proguard5.3.3/buildscripts/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
apply plugin: 'java' | ||
|
||
defaultTasks 'proguardJar', 'retraceJar', 'proguardguiJar' | ||
|
||
sourceCompatibility = JavaVersion.VERSION_1_6 | ||
targetCompatibility = JavaVersion.VERSION_1_6 | ||
|
||
sourceSets { | ||
proguard { | ||
java { | ||
srcDirs = ['../src'] | ||
exclude 'proguard/gui/**' | ||
exclude 'proguard/retrace/**' | ||
exclude 'proguard/ant/**' | ||
exclude 'proguard/gradle/**' | ||
exclude 'proguard/wtk/**' | ||
} | ||
} | ||
|
||
retrace { | ||
java { | ||
srcDirs = ['../src'] | ||
include 'proguard/retrace/**' | ||
} | ||
} | ||
|
||
anttask { | ||
java { | ||
srcDirs = ['../src'] | ||
include 'proguard/ant/**' | ||
} | ||
resources { | ||
srcDirs = ['../src'] | ||
include 'proguard/ant/**.properties' | ||
} | ||
} | ||
|
||
gradletask { | ||
java { | ||
srcDirs = ['../src'] | ||
include 'proguard/gradle/**' | ||
} | ||
} | ||
|
||
proguardgui { | ||
java { | ||
srcDirs = ['../src'] | ||
include 'proguard/gui/**' | ||
} | ||
resources { | ||
srcDirs = ['../src'] | ||
include 'proguard/gui/**.properties' | ||
include 'proguard/gui/**.pro' | ||
include 'proguard/gui/**.png' | ||
include 'proguard/gui/**.gif' | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
retraceCompile sourceSets.proguard.output | ||
anttaskCompile sourceSets.proguard.output | ||
anttaskCompile 'org.apache.ant:ant:1.7.0' | ||
gradletaskCompile sourceSets.proguard.output | ||
gradletaskCompile gradleApi() | ||
gradletaskCompile localGroovy() | ||
proguardguiCompile sourceSets.proguard.output | ||
proguardguiCompile sourceSets.retrace.output | ||
} | ||
|
||
task proguardJar(type: Jar) { | ||
from sourceSets.proguard.output | ||
from sourceSets.anttask.output | ||
from sourceSets.gradletask.output | ||
destinationDir = file('../lib') | ||
baseName = 'proguard' | ||
|
||
manifest.from '../src/proguard/MANIFEST.MF' | ||
|
||
// Delete the original jar first, otherwise the | ||
// jar task will not overwrite the file. | ||
file('../lib/proguard.jar').delete() | ||
} | ||
|
||
task retraceJar(type: Jar) { | ||
from sourceSets.retrace.output | ||
destinationDir = file('../lib') | ||
baseName = 'retrace' | ||
|
||
manifest.from '../src/proguard/retrace/MANIFEST.MF' | ||
|
||
// Delete the original jar first, otherwise the | ||
// jar task will not overwrite the file. | ||
file('../lib/retrace.jar').delete() | ||
} | ||
|
||
task proguardguiJar(type: Jar) { | ||
from sourceSets.proguardgui.output | ||
destinationDir = file('../lib') | ||
baseName = 'proguardgui' | ||
|
||
manifest.from '../src/proguard/gui/MANIFEST.MF' | ||
|
||
// Delete the original jar first, otherwise the | ||
// jar task will not overwrite the file. | ||
file('../lib/proguardgui.jar').delete() | ||
} |
4 changes: 4 additions & 0 deletions
4
third_party/java/proguard/proguard5.3.3/buildscripts/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Ant build properties for ProGuard. | ||
|
||
gradle.home = /usr/local/java/gradle | ||
wtk.home = /usr/local/java/wtk |
Oops, something went wrong.