open-obfuscator / dProtect

:electron: dProtect is a Proguard-based obfuscator for Java and Kotlin
https://obfuscator.re/dprotect
GNU General Public License v2.0
317 stars 46 forks source link

dProtect Gradle plugin location unclear #8

Open v-p-b opened 1 year ago

v-p-b commented 1 year ago

I'm struggling with the loading of the dProtect plugin using Kotlin DSL:

plugins {
//...
id("re.obfuscator.dprotect") version "1.0.0"
//...
}

Based on debug output Gradle looks for the POM at the following non-existent location (I added the package repo in settings.gradle):

https://maven.pkg.github.com/open-obfuscator/dProtect/re/obfuscator/dprotect/re.obfuscator.dprotect.gradle.plugin/1.0.0/re.obfuscator.dprotect.gradle.plugin-1.0.0.pom

It would be really helpful if you could provide configurations in Kotlin DSL syntax too.

Edit: It seems the problem is not Kotlin DSL, but that the plugin is not published in the first place: I tried using Groovy, following the docs, with the same result. The solution is to include dprotect.jar from the distribution zip in the buildscript classpath. Some useful links for those having similar problems: