Skip to content

Commit

Permalink
Created ProGuard version 6.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
ProGuard committed Feb 4, 2018
1 parent 9d4660e commit b0db59b
Show file tree
Hide file tree
Showing 973 changed files with 51,505 additions and 17,968 deletions.
19 changes: 14 additions & 5 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ This distribution contains the following directories:
- 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

It also contains the source code and builds scripts:

- core : the ProGuard core
- retrace : the ReTrace tool
- gui : the ProGuard/ReTrace GUI
- gradle : the ProGuard Gradle plugin
- ant : the ProGuard Ant plugin
- wtk : the ProGuard WTK plugin
- annotations : the optional annotations to configure ProGuard
- buildscripts : various alternative build scripts


Expand All @@ -20,14 +29,14 @@ 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
cd examples/standalone
../../bin/proguard.sh @ proguard.pro

The resulting proguard_out.jar contains the same application, but it's a lot
smaller.

Enjoy!

http://proguard.sourceforge.net/
https://www.guardsquare.com/proguard

Copyright (c) 2002-2017 Eric Lafortune @ GuardSquare
Copyright (c) 2002-2018 Eric Lafortune @ GuardSquare
16 changes: 16 additions & 0 deletions annotations/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Gradle build script for the ProGuard annotations.

apply plugin: 'java'

sourceSets.main {
java {
srcDirs = ['src']
}
resources {
srcDirs = ['src']
include '**/*.properties'
include '**/*.gif'
include '**/*.png'
include '**/*.pro'
}
}
12 changes: 12 additions & 0 deletions annotations/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
#
# GNU/Linux build script for ProGuard.

cd $(dirname "$0")

source ../buildscripts/functions.sh

MAIN_CLASS=proguard.annotation.*

compile $MAIN_CLASS && \
createjar "$ANNOTATIONS_JAR" || exit 1
47 changes: 47 additions & 0 deletions annotations/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!-- Ant build script for the ProGuard annotations. -->

<project name = "annotations"
default = "dist">

<target name = "clean">
<delete quiet = "true">
<fileset dir = "out"/>
</delete>
</target>

<target name = "out">
<mkdir dir = "out"/>
</target>

<target name = "compile" depends = "out">
<javac nowarn = "true"
deprecation = "false"
includeantruntime = "false"
srcdir = "src"
destdir = "out"
includes = "proguard/annotation/*.java">
<compilerarg value = "-Xlint:none"/>
</javac>
</target>

<target name = "resources" depends = "out">
<copy todir = "out">
<fileset dir = "src">
<include name = "proguard/*.properties"/>
<include name = "proguard/*.png"/>
<include name = "proguard/*.gif"/>
<include name = "proguard/*.pro"/>
</fileset>
</copy>
</target>

<target name = "lib">
<mkdir dir = "../lib"/>
</target>

<target name = "dist" depends = "compile,resources,lib">
<jar jarfile = "../lib/annotations.jar"
basedir = "out"/>
</target>

</project>
7 changes: 7 additions & 0 deletions annotations/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# GNU/Linux makefile for the ProGuard annotations.

MAIN_CLASS = proguard/annotation/*
CLASSPATH =
TARGET = annotations

include ../buildscripts/functions.mk
34 changes: 34 additions & 0 deletions annotations/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Maven POM file for the ProGuard annotations. -->
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-parent</artifactId>
<version>6.0</version>
<relativePath>../buildscripts/pom.xml</relativePath>
</parent>
<artifactId>proguard-annotations</artifactId>
<name>[${project.groupId}] ${project.artifactId}</name>

<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
25 changes: 25 additions & 0 deletions ant/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Gradle build script for the ProGuard Ant task.

apply plugin: 'java'

repositories {
jcenter()
}

sourceSets.main {
java {
srcDirs = ['src']
}
resources {
srcDirs = ['src']
include '**/*.properties'
include '**/*.gif'
include '**/*.png'
include '**/*.pro'
}
}

dependencies {
compile project(':core')
compile 'org.apache.ant:ant:1.9.7'
}
31 changes: 31 additions & 0 deletions ant/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
#
# GNU/Linux build script for the ProGuard Ant task.

cd $(dirname "$0")

source ../buildscripts/functions.sh

MAIN_CLASS=proguard.ant.ProGuardTask

ANT_HOME=${ANT_HOME:-/usr/local/java/ant}

ANT_JAR=$ANT_HOME/lib/ant.jar

# Make sure the Ant jar is present.
if [ ! -f "$ANT_JAR" ]; then
echo "Please make sure the environment variable ANT_HOME is set correctly,"
echo "if you want to compile the optional ProGuard Ant task."
exit 1
fi

# Make sure the ProGuard core has been compiled.
if [ ! -d ../core/$OUT ]; then
../core/build.sh || exit 1
fi

# Compile and package.
export CLASSPATH=../core/$OUT:$ANT_JAR

compile $MAIN_CLASS && \
updatejar "$PROGUARD_JAR" || exit 1
57 changes: 57 additions & 0 deletions ant/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!-- Ant build script for the ProGuard Ant task. -->

<project name = "ant"
default = "dist">

<property file = "build.properties"/>

<target name = "clean">
<delete quiet = "true">
<fileset dir = "out"/>
</delete>
</target>

<target name = "out">
<mkdir dir = "out"/>
</target>

<target name = "core">
<ant dir = "../core"
target = "compile"
inheritAll = "false"/>
</target>

<target name = "compile" depends = "out,core">
<javac nowarn = "true"
deprecation = "false"
includeantruntime = "true"
classpath = "../core/out"
srcdir = "src"
destdir = "out"
includes = "proguard/ant/ProGuardTask.java">
<compilerarg value = "-Xlint:none"/>
</javac>
</target>

<target name = "resources" depends = "out">
<copy todir = "out">
<fileset dir = "src">
<include name = "**/*.properties"/>
<include name = "**/*.png"/>
<include name = "**/*.gif"/>
<include name = "**/*.pro"/>
</fileset>
</copy>
</target>

<target name = "lib">
<mkdir dir = "../lib"/>
</target>

<target name = "dist" depends = "compile,resources,lib">
<jar jarfile = "../lib/proguard.jar"
update = "true"
basedir = "out"/>
</target>

</project>
15 changes: 15 additions & 0 deletions ant/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# GNU/Linux makefile for the ProGuard Ant task.

ifndef ANT_HOME
ANT_HOME = /usr/local/java/ant
endif

MAIN_CLASS = proguard/ant/ProGuardTask
ANT_JAR = $(ANT_HOME)/lib/ant.jar
CLASSPATH = ../core/$(OUT):$(ANT_JAR)
TARGET = proguard
UPDATE_JAR = true

include ../buildscripts/functions.mk

$(ANT_JAR): ; $(error Please make sure ANT_HOME is set correctly)
25 changes: 5 additions & 20 deletions buildscripts/maven/ant/pom.xml → ant/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Maven POM file for the ProGuard Ant task. -->
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -7,30 +8,20 @@
<parent>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-parent</artifactId>
<version>5.3.3</version>
<relativePath>../pom.xml</relativePath>
<version>6.0</version>
<relativePath>../buildscripts/pom.xml</relativePath>
</parent>
<artifactId>proguard-anttask</artifactId>
<name>[${project.groupId}] ${project.artifactId}</name>

<build>
<sourceDirectory>../../../src</sourceDirectory>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<includes>
<include>proguard/ant/**</include>
</includes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<includes>
<include>proguard/ant/**.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
Expand All @@ -44,17 +35,11 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<subpackages>proguard.ant</subpackages>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>../../../src</directory>
<includes>
<include>proguard/ant/**</include>
</includes>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
Expand Down
1 change: 1 addition & 0 deletions ant/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
includeFlat 'core'
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
* Copyright (c) 2002-2017 Eric Lafortune @ GuardSquare
* Copyright (c) 2002-2018 GuardSquare NV
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
* Copyright (c) 2002-2017 Eric Lafortune @ GuardSquare
* Copyright (c) 2002-2018 GuardSquare NV
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down Expand Up @@ -219,11 +219,11 @@ private int requiredAccessFlags(boolean set,
token;

int accessFlag =
strippedToken.equals(JavaConstants.ACC_PUBLIC) ? ClassConstants.ACC_PUBLIC :
strippedToken.equals(JavaConstants.ACC_FINAL) ? ClassConstants.ACC_FINAL :
strippedToken.equals(JavaConstants.ACC_ABSTRACT) ? ClassConstants.ACC_ABSTRACT :
strippedToken.equals(JavaConstants.ACC_SYNTHETIC) ? ClassConstants.ACC_SYNTHETIC :
strippedToken.equals(JavaConstants.ACC_ANNOTATION) ? ClassConstants.ACC_ANNOTATTION :
strippedToken.equals(JavaConstants.ACC_PUBLIC) ? ClassConstants.ACC_PUBLIC :
strippedToken.equals(JavaConstants.ACC_FINAL) ? ClassConstants.ACC_FINAL :
strippedToken.equals(JavaConstants.ACC_ABSTRACT) ? ClassConstants.ACC_ABSTRACT :
strippedToken.equals(JavaConstants.ACC_SYNTHETIC) ? ClassConstants.ACC_SYNTHETIC :
strippedToken.equals(JavaConstants.ACC_ANNOTATION) ? ClassConstants.ACC_ANNOTATION :
0;

if (accessFlag == 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
* Copyright (c) 2002-2017 Eric Lafortune @ GuardSquare
* Copyright (c) 2002-2018 GuardSquare NV
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down
Loading

0 comments on commit b0db59b

Please sign in to comment.