I need to use compiler tree api
in my custom annotation processor logic . the compiler tree api belongs to sun tools.jar
. i was thinking it could be import as a simple normal gradle dependency like import group: 'com.sun', name: 'tools', version: '1.8'
, But it's not working .
I've searched many tech blogs , it seems like the common solution is compile file("${System.properties['java.home']}/../lib/tools.jar")
, apparently it's lake of compatibility。 is there any better solution to solve this ?