This plugin integrates with the Gradle build system and automatically obfuscates the code in the jar file, includes all dependencies, so you do not need to manually search for them.
pluginManagement {
repositories {
gradlePluginPortal()
mavenLocal()
maven {
url "https://jitpack.io"
}
}
resolutionStrategy {
eachPlugin {
if (requested.id.id == "me.chrommob.skidfuscatorgradle") {
useModule("com.github.ChromMob.SkidFuscatorGradle:SkidFuscatorGradle:master-SNAPSHOT")
}
}
}
}
rootProject.name = 'yourProject'
plugins {
id 'java'
id 'me.chrommob.skidfuscatorgradle'
}
Optional: If you want to customize how deep we search dependenices configure it using maxDepth variable. The default value is 3 and you should only increase this if you get missing libraries warning.
tasks.withType<SkidFuscatorTask> {
maxDepth = 3
}
- Create folder skifuscator in your project.
- Download latest jar from https://github.com/skidfuscatordev/skidfuscator-java-obfuscator/releases/.
- Rename the downloaded file to skidfuscator.jar and move it to the folder we created.
-
If you want to use exclusion put config.txt into the skidfuscator folder.
Official Documentation: https://skidfuscator.dev/docs/config
config.txt example:
exempt: [
"class{^me\\/chrommob\\/example\\/ExamplePlugin}",
"class{^me\\/chrommob\\/example\\/loader\\/ExampleClass}",
]
- Run skidfuscate task.
- In intellij you can use the gradle menu on the right.
- If you do not use intellij run gradlew.bat skidfuscate on Windows or gradlew skidfuscate on MacOS and Linux.
Obfuscation should complete and there should be new folder inside the skidfuscator folder with the obfuscated files.
- The folder obfuscated jar is in project_location/skidfuscator/name_of_original_jar-/name_of_original_jar-out.jar