0

I have to use the "com.sun.tools"-library for my annotation processor. It's a Gradle project and i don't know how to add the library to my project.

I tried to add the library in my build.gradle like this:

repositories {
  mavenCentral()
}

dependencies {
  implementation fileTree(dir: 'libs', include: ['*.jar'])
  ...
  implementation('com.sun:tools:1.8')
}

But i get the error "Failed to resolve: com.sun:tools:1.8"

The page https://mvnrepository.com/artifact/com.sun/tools/1.8 says, I should use "system group: 'com.sun', name: 'tools', version: '1.8'" (in dependencies?), but i get the error "Gradle DSL method not found: 'system()'".

With Maven i could use the classes with the "maven-compiler-plugin".

0 Answers0