I have a fat jar whcih include my package as well as all the dependencies. To obfuscate the jar ,I have addded proguard this is my gradle taks
def dependsDir = "${buildDir}/libs/dependencies/"
task proguard(type: proguard.gradle.ProGuardTask) {
configuration 'proguard.conf'
injars(layout.buildDirectory.file(inputJar))
// As of Java 9, the runtime classes are packaged in modular jmod files.
libraryjars "${System.getProperty('java.home')}/jmods/java.base.jmod", jarfilter: '!**.jar', filter: '!module-info.class'
libraryjars "${dependsDir}"
outjars(layout.buildDirectory.file(outputJar))
}
but when running i m getting exception
Unexpected error while preverifying: Class = [freemarker/ext/jsp/TagTransformModel] Method = [getWriter(Ljava/io/Writer;Ljava/util/Map;)Ljava/io/Writer;] Exception = [proguard.evaluation.IncompleteClassHierarchyException] (Can't find common super class of [freemarker.ext.jsp.JspWriterAdapter] (with 1 known super classes: freemarker.ext.jsp.JspWriterAdapter) and [java.io.Writer] (with 2 known super classes: java.io.Writer, java.lang.Object))
freemarker-2.3.32.jar is already present in my dependencies folder.
tell me how to fix this.