aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/java/proguard/proguard5.3.3/examples/gradle/retrace.gradle
blob: 7fe2c7e259dbaa7b0693f62d13633c4615dde0a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//
// This Gradle build file illustrates how to process the ReTrace tool.
// Configuration files for typical applications will be very similar.
// Usage:
//     gradle -b retrace.gradle proguard
//

// Tell Gradle where to find the ProGuard task.

buildscript {
    repositories {
        flatDir dirs: '../../lib'
    }
    dependencies {
        classpath ':proguard'
    }
}

// Define a ProGuard task.

task proguard(type: proguard.gradle.ProGuardTask) {

    // You should probably import a more compact ProGuard-style configuration
    // file for all static settings, but we're specifying them all here, for
    // the sake of the example.
    //configuration 'configuration.pro'

    // Specify the input jars, output jars, and library jars.
    // The input jars will be merged in a single output jar.
    // We'll filter out the Ant and WTK classes.

    injars  '../../lib/retrace.jar'
    injars  '../../lib/proguard.jar(!META-INF/MANIFEST.MF,'
                                 !proguard/ant/**,!proguard/wtk/**)
    outjars 'retrace_out.jar'

    libraryjars "${System.getProperty('java.home')}/lib/rt.jar"

    // If we wanted to reuse the previously obfuscated proguard_out.jar, we could
    // perform incremental obfuscation based on its mapping file, and only keep the
    // additional ReTrace files instead of all files.

    //applymapping 'proguard.map'
    //outjars      'retrace_out.jar', filter: 'proguard/retrace/**'

    // Allow methods with the same signature, except for the return type,
    // to get the same obfuscation name.

    overloadaggressively

    // Put all obfuscated classes into the nameless root package.

    repackageclasses ''

    // Allow classes and class members to be made public.

    allowaccessmodification

    // The entry point: ReTrace and its main method.

    keep 'public class proguard.retrace.ReTrace { \
        public static void main(java.lang.String[]); \
    }'
}