Repository: auth0/java-jwt (language: java)

Issue:
Add JDK links to Javadoc
### Describe the problem you'd like to have solved
Currently the [javadoc](https://javadoc.io/doc/com.auth0/java-jwt/latest/index.html) has no links to JDK classes, e.g. `java.lang.Object`. This makes browsing it slightly inconvenient.

### Describe the ideal solution
This could be solved by specifying the JDK link the Gradle build file:
```gradle
javadoc {
    options.links 'https://docs.oracle.com/javase/8/docs/api/'
}
```

## Alternatives and current work-arounds
Alternatively, or additionally you could also [specify a JDK toolchain only for the javadoc task](https://docs.gradle.org/current/userguide/toolchains.html#specify_custom_toolchains_for_individual_tasks) which takes advantages of the lastest JDK javadoc features (such as a search bar), without having to change the lowest Java version this projects supports.

I have implemented an experimental implementation for this [here](https://github.com/Marcono1234/java-jwt/tree/marcono1234/javadoc-improvements) (this also partially addresses #487), feel free to try it out:
1. Build with `gradlew javadoc`
2. Open `lib/build/docs/javadoc/index.html` in your browser

I don't have much experience with Gradle, so I am not sure if this is properly implemented. However, let me know if I should create a pull request for the branch.



Discussion / hints:

Fix patch:
diff --git a/lib/build.gradle b/lib/build.gradle
index e0894e3d..851ed055 100644
--- a/lib/build.gradle
+++ b/lib/build.gradle
@@ -30,15 +30,32 @@ oss {
     }
 }
 
+def javaVersion = 8
 java {
     toolchain {
-        languageVersion = JavaLanguageVersion.of(8)
+        languageVersion = JavaLanguageVersion.of(javaVersion)
     }
 }
 
 compileJava {
-    sourceCompatibility '1.8'
-    targetCompatibility '1.8'
+    sourceCompatibility "$javaVersion"
+    targetCompatibility "$javaVersion"
+}
+
+// Use latest JDK for javadoc generation
+tasks.withType(Javadoc).configureEach {
+    javadocTool = javaToolchains.javadocToolFor {
+        languageVersion = JavaLanguageVersion.of(16)
+    }
+}
+
+javadoc {
+    // Exclude internal implementation package from javadoc
+    excludes = ['com/auth0/jwt/impl']
+    // Specify Java version this project uses
+    // Otherwise would use version of javadoc toolchain by default which could
+    // cause compilation error mismatch between compileJava and javadoc creation
+    options.addStringOption('-release', "$javaVersion")
 }
 
 dependencies {


Test patch: