Fastexcel is not properly shaded by gradle plugin
Closed this issue · 0 comments
I was trying to use this project to dump protocol of Minecraft to investigate some cheats based on man-in-the-middle attack because excel seems to be very readable, so I tried to make a forge mod based on this.
Unfortunately I have to use gradle because Minecraft forge uses gradle and its shade plugin com.github.johnrengelman.shadow
7.1.2 does not properly shade this as a library. The plugin just shaded the core of fastexcel but their dependencies is not shaded into the jar at all, caused ClassNotFoundException
on my project.
I wonder if there is anything wrong in my build.gradle or there is anything broken in the pom.xml. And is there any better solution for this problem? For now I have to add fastexcel's dependencies as dependencies of my project.
This is the partial of my build.gradle:
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
// Skipped unnecessary code
reobf {
shadowJar { }
}
dependencies {
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2860'
implementation 'org.dhatim:fastexcel:0.15.6'
implementation 'org.apache.commons:commons-lang3:3.13.0'
}
configurations {
shade
implementation.extendsFrom shade
}
shadowJar {
archiveBaseName.set('mitm-watcher')
archiveVersion.set(project.version)
}