All Projects → MichaelRocks → Paranoid

MichaelRocks / Paranoid

Licence: apache-2.0
String obfuscator for Android applications.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Paranoid

jooq-plugin
Plugin for generating jOOQ classes using dockerized databases
Stars: ✭ 55 (-82.48%)
Mutual labels:  gradle-plugin
Gradle Aws Plugin
Gradle plugin to manage Amazon Web Services
Stars: ✭ 269 (-14.33%)
Mutual labels:  gradle-plugin
Androidlife
📔 CaMnter's android learning life and footprint.
Stars: ✭ 293 (-6.69%)
Mutual labels:  gradle-plugin
change-tracker-plugin
A Gradle plugin to help analyse the dependency between modules and run tasks only on modules impacted by specific set of changes.
Stars: ✭ 103 (-67.2%)
Mutual labels:  gradle-plugin
build-time-tracker
Gradle plugin that prints the time taken by the tasks in a build
Stars: ✭ 27 (-91.4%)
Mutual labels:  gradle-plugin
Gradle Unused Resources Remover Plugin
Gradle Plugin that removes unused resources in Android projects.
Stars: ✭ 282 (-10.19%)
Mutual labels:  gradle-plugin
gradle-libraries-plugin
No description or website provided.
Stars: ✭ 29 (-90.76%)
Mutual labels:  gradle-plugin
Gradle Apt Plugin
[OBSOLETE] Gradle plugin making it easier/safer to use Java annotation processors
Stars: ✭ 299 (-4.78%)
Mutual labels:  gradle-plugin
Androidsvgdrawable Plugin
Gradle plugin that generates qualified, density specific PNG drawables from SVG files at build time for your Android projects.
Stars: ✭ 263 (-16.24%)
Mutual labels:  gradle-plugin
Javapackager
📦 Gradle/Maven plugin to package Java applications as native Windows, Mac OS X, or GNU/Linux executables and create installers for them.
Stars: ✭ 285 (-9.24%)
Mutual labels:  gradle-plugin
kotlinx-resources
Kotlin Multiplatform (KMP) library for reading resources in tests
Stars: ✭ 15 (-95.22%)
Mutual labels:  gradle-plugin
schema-registry-plugin
Gradle plugin to interact with Confluent Schema-Registry.
Stars: ✭ 60 (-80.89%)
Mutual labels:  gradle-plugin
Gradle Code Quality Tools Plugin
Gradle plugin that generates ErrorProne, Findbugs, Checkstyle, PMD, CPD, Lint, Detekt & Ktlint Tasks for every subproject.
Stars: ✭ 282 (-10.19%)
Mutual labels:  gradle-plugin
gradle-console-reporter
Gradle plugin to report various kinds of summaries to console.
Stars: ✭ 49 (-84.39%)
Mutual labels:  gradle-plugin
Fat Aar Plugin
[DEPRECATED]A gradle plugin that helps to output fat aar from android library
Stars: ✭ 297 (-5.41%)
Mutual labels:  gradle-plugin
plugin-yml
A Gradle plugin that generates plugin.yml for Bukkit/BungeeCord/Nukkit plugins based on the Gradle project
Stars: ✭ 42 (-86.62%)
Mutual labels:  gradle-plugin
Dependencycheck
OWASP dependency-check is a software composition analysis utility that detects publicly disclosed vulnerabilities in application dependencies.
Stars: ✭ 3,571 (+1037.26%)
Mutual labels:  gradle-plugin
Unmock Plugin
Gradle plugin to be used in combination with the new unit testing feature of the Gradle Plugin / Android Studio to use real classes for e.g. SparseArray.
Stars: ✭ 304 (-3.18%)
Mutual labels:  gradle-plugin
Android Maven Publish
Modification of the standard Maven Publish plugin to be compatible with android-library projects (aar).
Stars: ✭ 297 (-5.41%)
Mutual labels:  gradle-plugin
Gradle Nexus Plugin
Gradle plugin for configuring and uploading artifacts to Sonatype Nexus
Stars: ✭ 284 (-9.55%)
Mutual labels:  gradle-plugin

Build Status

Paranoid

String obfuscator for Android applications.

Usage

In order to make Paranoid work with your project you have to apply the Paranoid Gradle plugin to the project. Please notice that the Paranoid plugin must be applied after the Android plugin.

buildscript {
  repositories {
    jcenter()
  }

  dependencies {
    classpath 'io.michaelrocks:paranoid-gradle-plugin:0.3.2'
  }
}

apply plugin: 'com.android.application'
apply plugin: 'io.michaelrocks.paranoid'

Now you can just annotate classes with strings that need to be obfuscated with @Obfuscate. After you project compiles every string in annotated classes will be obfuscated.

Configuration

Paranoid plugin can be configured using paranoid extension object:

paranoid {
  // ...
}

The extension object contains the following properties:

  • enabledboolean. Allows to disable obfuscation for the project. Default value is true.
  • includeSubprojectsboolean. Allows to enable obfuscation for subprojects. Default value is false.
  • obfuscationSeed - Integer. A seed that can be used to make obfuscation stable across builds. Default value is null, which means that the seed is randomly generated on each build.

How it works

Let's say you have an Activity that contains some string you want to be obfuscated.

@Obfuscate
public class MainActivity extends AppCompatActivity {
  private static final String QUESTION = "Q: %s";
  private static final String ANSWER = "A: %s";

  @Override
  protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main_activity);

    final TextView questionTextView = (TextView) findViewById(R.id.questionTextView);
    questionTextView.setText(String.format(QUESTION, "Does it work?"));

    final TextView answerTextView = (TextView) findViewById(R.id.answerTextView);
    answerTextView.setText(String.format(ANSWER, "Sure it does!"));
  }
}

The class contains both string constants (QUESTION and ANSWER) and string literals. After compilation this class will be transformed to something like this.

@Obfuscate
public class MainActivity extends AppCompatActivity {
  private static final String QUESTION = Deobfuscator.getString(4);
  private static final String ANSWER = Deobfuscator.getString(5);

  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main_activity);

    TextView questionTextView = (TextView) findViewById(R.id.questionTextView);
    questionTextView.setText(String.format(Deobfuscator.getString(0), Deobfuscator.getString(1)));

    TextView answerTextView = (TextView) findViewById(R.id.answerTextView);
    answerTextView.setText(String.format(Deobfuscator.getString(2), Deobfuscator.getString(3)));
  }
}

License

Copyright 2020 Michael Rozumyanskiy

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
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].