How to download sources and javadoc (e.g. for JavaFX) using a netbeans 12 and gradle

Viewed 260

I'm coming back to JavaFx after a period away. Using Netbeans 12.1, netbeans bundled gradle (6.3), OpenJDK 15.0.1, and JavaFX 15.

I used the example project from the JavaFX website: https://openjfx.io/openjfx-docs/

Using the example, JavaFX and NetBeans -> Modular with Gradle. I am planning to use Java 9+ style modular builds.

build.gradle (minimal):

plugins {
  id 'java'
  id 'application'
  id 'org.openjfx.javafxplugin' version '0.0.9'
  id 'org.beryx.jlink' version '2.12.0'
}

repositories {
    mavenCentral()
}

javafx {
    version = "15"
    modules = [ 'javafx.controls', 'javafx.fxml' ]
}

mainClassName = 'HelloFX/org.kethon.MainApp'

jlink {
    options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
    launcher {
        name = 'hellofx'
    }
}

I can compile, run with gradle, and run the standalone using JLink. No problems.

But I cannot see any source or access any JavaFX javadocs. I've looked at it from the gradle end, and the netbeans end. Incidentally I was hoping any answer would be generic, not just for javafx but other downloaded dependencies (e.g. apache POI/PDFBox, log4J etc).

Looking at this (older) answer: Automatically download sources in Gradle project It seems that IntelliJ and Eclipse get their own gradle plugin to do this.

I remember there being an issue with netbeans recognising the the javadoc on netbeans 11 but was under the impression this had been fixed. see: https://github.com/jgneff/netbeans-doc-src

In the gradle options I've set Download Dependencies on Project to "Always". The Download Sources Along with the Dependencies is grayed out but appears to be on "Always" - cannot change. The Download JavaDoc Along with the Dependencies is grayed out but appears to be on "Never" - cannot change.

I cannot find any other options on netbeans.

0 Answers
Related