All Projects → Guardsquare → Proguard

Guardsquare / Proguard

Licence: gpl-2.0
ProGuard, Java optimizer and obfuscator

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Proguard

Zsc
OWASP ZSC - Shellcode/Obfuscate Code Generator
Stars: ✭ 536 (-27.96%)
Mutual labels:  obfuscator
Packem
📦⚡ A precompiled JavaScript module bundler
Stars: ✭ 586 (-21.24%)
Mutual labels:  build-tool
Gogradle
A Gradle Plugin Providing Full Support for Go
Stars: ✭ 712 (-4.3%)
Mutual labels:  build-tool
Buildtools
A bazel BUILD file formatter and editor
Stars: ✭ 538 (-27.69%)
Mutual labels:  build-tool
Dcc
DCC (Dex-to-C Compiler) is method-based aot compiler that can translate DEX code to C code.
Stars: ✭ 568 (-23.66%)
Mutual labels:  obfuscator
Jarvis
A very intelligent browser based Webpack dashboard
Stars: ✭ 5,432 (+630.11%)
Mutual labels:  build-tool
Intellij
IntelliJ plugin for Bazel projects
Stars: ✭ 500 (-32.8%)
Mutual labels:  build-tool
Stcobfuscator
iOS全局自动化 代码混淆 工具!支持cocoapod组件代码一并 混淆,完美避开hardcode方法、静态库方法和系统库方法!
Stars: ✭ 740 (-0.54%)
Mutual labels:  obfuscator
Spago
🍝 PureScript package manager and build tool powered by Dhall and package-sets
Stars: ✭ 568 (-23.66%)
Mutual labels:  build-tool
Flubucore
A cross platform build and deployment automation system for building projects and executing deployment scripts using C# code.
Stars: ✭ 695 (-6.59%)
Mutual labels:  build-tool
Gowatch
🚀 gowatch is a command line tool that builds and (re)starts your go project everytime you save a Go or template file.
Stars: ✭ 539 (-27.55%)
Mutual labels:  build-tool
Vite
Next generation frontend tooling. It's fast!
Stars: ✭ 35,110 (+4619.09%)
Mutual labels:  build-tool
Crossbuild
🌍 multiarch cross compiling environments
Stars: ✭ 632 (-15.05%)
Mutual labels:  build-tool
Erlang.mk
A build tool for Erlang that just works.
Stars: ✭ 538 (-27.69%)
Mutual labels:  build-tool
Javascript Obfuscator
A powerful obfuscator for JavaScript and Node.js
Stars: ✭ 8,204 (+1002.69%)
Mutual labels:  obfuscator
Buildout
Buildout is a deployment automation tool written in and extended with Python
Stars: ✭ 510 (-31.45%)
Mutual labels:  build-tool
Poi
⚡A zero-config bundler for JavaScript applications.
Stars: ✭ 5,291 (+611.16%)
Mutual labels:  build-tool
Toast
Containerize your development and continuous integration environments. 🥂
Stars: ✭ 748 (+0.54%)
Mutual labels:  build-tool
Captain
Captain - Convert your Git workflow to Docker 🐳 containers
Stars: ✭ 739 (-0.67%)
Mutual labels:  build-tool
Yakpro Po
YAK Pro - Php Obfuscator
Stars: ✭ 678 (-8.87%)
Mutual labels:  obfuscator



ProGuard

jcenter


Quick StartFeaturesContributingLicense


ProGuard is a free shrinker, optimizer, obfuscator, and preverifier for Java bytecode:

  • It detects and removes unused classes, fields, methods, and attributes.

  • It optimizes bytecode and removes unused instructions.

  • It renames the remaining classes, fields, and methods using short meaningless names.

The resulting applications and libraries are smaller, faster, and a bit better hardened against reverse engineering. ProGuard is very popular for Android development, but it also works for Java code in general.

❓ Getting Help

If you have usage or general questions please ask them in the Guardsquare Community.
Please use the issue tracker to report actual bugs 🐛, crashes, etc.

🚀 Quick Start

ProGuard is integrated in Google's Android SDK. If you have an Android Gradle project you can enable ProGuard instead of the default R8 compiler:

  1. Disable R8 in your gradle.properties:
android.enableR8=false
android.enableR8.libraries=false
  1. Override the default version of ProGuard with the most recent one in your main build.gradle:
buildscript {
    //...
    configurations.all {
        resolutionStrategy {
            dependencySubstitution {
                substitute module('net.sf.proguard:proguard-gradle') with module('com.guardsquare:proguard-gradle:7.0.1')
            }
        }
    }
}
  1. Enable minification as usual in your build.gradle:
android {
    //...
    buildTypes {
        release {
            minifyEnabled   true
            shrinkResources true
            proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
            proguardFile 'proguard-project.txt'
        }
    }
}
  1. Add any necessary configuration to your proguard-project.txt.

You can then build your application as usual:

gradle assembleRelease

The repository contains some sample configurations in the examples directory. Notably, examples/android has a small working Android project.

✨ Features

ProGuard works like an advanced optimizing compiler, removing unused classes, fields, methods, and attributes, shortening identifiers, merging classes, inlining methods, propagating constants, removing unused parameters, etc.

  • The optimizations typically reduce the size of an application by anything between 20% and 90%. The reduction mostly depends on the size of external libraries that ProGuard can remove in whole or in part.

  • The optimizations may also improve the performance of the application, by up to 20%. For Java virtual machines on servers and desktops, the difference generally isn't noticeable. For the Dalvik virtual machine and ART on Android devices, the difference can be worth it.

  • ProGuard can also remove logging code, from applications and their libraries, without needing to change the source code — in fact, without needing the source code at all!

The manual pages (markdown, html) cover the features and usage of ProGuard in detail.

💻 Building ProGuard

Building ProGuard is easy - you'll need:

  • a Java 8 JDK installed
  • a clone of the ProGuardCORE repository, since ProGuard is built on the ProGuardCORE library

You can then execute a composite build with the following Gradle command:

./gradlew --include-build=../proguard-core assemble

Alternatively, make the composite build persistent by editing this line in gradle.properties. You can also add this line to a gradle.properties file in your Gradle user home (~/.gradle/gradle.properties).

# Optionally set up a composite build with ProGuardCORE.
#proguardCoreDir = ../proguard-core

The artifacts will be generated in the lib directory. You can then execute ProGuard using the scripts in bin, for example:

bin/proguard.sh

You can publish the artifacts (including proguard-core) to your local Maven repository using:

./gradlew --include-build=../proguard-core :proguard-core:publishToMavenLocal publishToMavenLocal

🤝 Contributing

Contributions, issues and feature requests are welcome in both projects. Feel free to check the issues page and the contributing guide if you would like to contribute.

📝 License

Copyright (c) 2002-2020 Guardsquare NV. ProGuard is released under the GNU General Public License, version 2, with exceptions granted to a number of projects.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].