Is there a Proguard library I can use to obfuscate a jar using Proguard mappings in my own Gradle Plugin? I am doing this because it would be more convenient to have a built-in obfuscator in the Gradle plugin than to include Proguard in the build.gradle of every one of my projects.
I’m not sure what fits your use case best, but the solution for this is probably adding the a proguard dependency to your gradle plugin.
If you add com.guardsquare:proguard-base as a dependency for your own plugin you can directly access the proguard main class
proguard.Proguard from within your plugin code.
If you add com.guardsquare:proguard-gradle as a dependency for your own plugin you can directly access the Proguard task type, or even automatically apply the plugin by applying the
proguard.gradle.plugin.ProGuardPlugin.apply() method in the apply-method of your own plugin definition.
Does that solve your use case?
Yes, this should be suitable for my use case, thanks