I need the com.sun.tools jar as a compile dependency, so I just copied it to my libs folder in my Intellij project. However, I'm trying to use gradle. I only need it as a dependency for ONE of my modules. How do I do this. I currently have this in my module jar task:
jar {
from('build/classes/main/')
from('libs/tools.jar')
manifest {
attributes 'Manifest-Version': '1.0',
'Class-Path': configurations.runtime.files.collect {"../lib/${it.name}" },
}
I also tried this in my module's "dependencies" closure:
compile fileTree(dir: 'lib', include: '*.jar')
I also just tried putting the jar on my entire project classpath and it's still not compiling:
classpath ":tools"
Maybe it's correct but my IDE isn't refreshing correctly? I have the plugin already
apply plugin: 'idea'
and it's been working perfectly until I try to do this.
EDIT: it's for an annotation processor, so I'm trying to include it in my module jar build and not have other modules depend on it. Is there a better way to do it than copying the jar?