I have read the other posts related to compiler options but it doesn’t seem to work. The problem is that we are using a Sun private class and it will not compile using Gradle. It does compile in Eclipse with no special settings.
Output:
:Project1:compileJava
\MyClass.java:37: error: package sun.security.pkcs10 does not exist
import sun.security.pkcs10.PKCS10;
1 error
FAILED
We are planning to migrate off of the Sun private implementation but in the mean time we need the project to compile.
I have used (in addition to the suggestions in other threads):
The compiler options print twice, once with the options I specified and then an empty list.
Does this have anything to do with “access restrictions” on the JDK jars? If so, how to set in Gradle?
This project is part of a multi-project. Running Gradle from the command line does not work at all because we have common Groovy/Java code in buildSrc of the master project. This is a spearate issue. Using the Gradle Eclipse plugin seems to deal with multi-projects ok.
Not sure you need to turn off all the warnings. The question is, why is it that your compiler options are only used if you fork?? That seems odd to me.
And I won’t go into why you shouldn’t use Sun private classes, you can read that info elsewhere, but this is the kind of problem it causes.