Skip navigation links
org.netbeans.modules.gradle/1 1.4

Gradle Projects
Under Development

GradleProjectAPI

See: Description

Gradle Projects 
Package Description
org.netbeans.modules.gradle.api
Domain and access classes for Gradle projects.
org.netbeans.modules.gradle.api.execute
API support for executing Gradle actions/commands in the IDE.
org.netbeans.modules.gradle.api.output  
org.netbeans.modules.gradle.spi  
org.netbeans.modules.gradle.spi.actions  
org.netbeans.modules.gradle.spi.customizer.support  
org.netbeans.modules.gradle.spi.newproject  
org.netbeans.modules.gradle.spi.nodes  

What is New (see all changes)?

Use Cases

API/SPI to be used by modules wanting to enhance the Gradle project's integration in the IDE.

Exported Interfaces

This table lists all of the module exported APIs with defined stability classifications. It is generated based on answers to questions about the architecture of the module. Read them all...
Group of java interfaces
Interface NameIn/OutStabilitySpecified in What Document?
GradleProjectAPIExportedUnder Development

The Gradle Project API provides some miscellaneous friend APIs and SPIs relating to Gradle projects.

Group of layer interfaces
Interface NameIn/OutStabilitySpecified in What Document?
GradleProjectCustomizerExportedUnder Development

"Projects/org-netbeans-modules-gradle/Customizer" folder's content is used to construct the project's customizer. It's content is expected to be ProjectCustomizer.CompositeCategoryProvider instances. The lookup passed to the panels contains an instance of Project.

GradleLogicalViewProviderExportedUnder Development

"Projects/org-netbeans-modules-gradle/Nodes" folder's content is used to construct the project's child nodes. It's content is expected to be NodeFactory instances.

GradleLookupExportedUnder Development

"Projects/org-netbeans-modules-gradle/Lookup" folder's content is used to construct the project's additional lookup. It's content is expected to be LookupProvider instances. Gradle project provides LookupMergers for Sources, PrivilegedTemplates, RecommendedTemplates and other classes. Implementations added by 3rd parties will be merged into a single instance in the project's lookup.

"Projects/org-netbeans-modules-gradle/Plugins/<plugin-name>/Lookup" folder content is also used to contribute into the project lookup, based on the Gradle plugin ids, like "java-base".

GradleActionsExportedUnder Development

"Projects/org-netbeans-modules-gradle/Actions" folder'' content is used to add item's to the main project node popup. It's content is expected to be Action instances.

Group of java.io.File interfaces
Interface NameIn/OutStabilitySpecified in What Document?
nb-actions.xmlExportedUnder Development

NetBeans Gradle support recognizes special file(s) that can be placed next to a build.gradle. These files contain description of bindings between NetBeans UI actions (compile, run, debug, etc.) and the actual Gradle goals to execute.

<!DOCTYPE actions SYSTEM "action-mapping.dtd">
<actions>
    <action name="clean">
        <args>clean</args>
    </action>

    <action name="download.javadoc">
        <!--
            We do not really execute any tasks here, rather just reload the project
            allowing it to go online and fetch some dependencies. So in this case
            the action is forcing a project reload with some argiments.
        -->
        <reload rule="ALWAYS_ONLINE">
            <args>-PdownloadJavadoc=${requestedComponent}</args>
        </reload>
    </action>

    <action name="download.sources">
        <reload rule="ALWAYS_ONLINE">
            <args>-PdownloadSources=${requestedComponent}</args>
        </reload>
    </action>

    <action name="download.sourcesanddoc">
        <reload rule="ALWAYS_ONLINE">
            <args>-PdownloadSources=${requestedComponent} -PdownloadJavadoc=${requestedComponent}</args>
        </reload>
    </action>

    <!--
        The following section is used and preferred when the 'virtual plugin' named
        'root' is present in the project plugin list marking that project is a root
        project.
    -->
    <apply-for plugins="root">
        <action name="clean">
            <args>clean</args>
        </action>

        <action name="build">
            <args>assemble</args>
        </action>

        <action name="rebuild">
            <args>clean assemble</args>
        </action>
    </apply-for>

    <!--
        The following section is used and preferred when the plugin named
        'java' is present in the project plugin list.
    -->
    <apply-for plugins="java">
        <action name="test.single">
            <args>--rerun-tasks test --tests ${selectedMethod}</args>
        </action>
        <action name="run.single.method">
            <args>--rerun-tasks test --tests ${selectedMethod}</args>
        </action>
        <action name="debug.single.method">
            <args>--rerun-tasks test --debug-jvm --tests ${selectedMethod}</args>
        </action>
        <action name="debug.test.single">
            <args>--rerun-tasks test --debug-jvm --tests ${selectedMethod}</args>
        </action>

        <action name="javadoc">
            <args>javadoc</args>
        </action>

        <!--
            The debug.fix action is not repeatable. So it cannot be repeated
            in the Output Tab UI.
        -->
        <action name="debug.fix" repeatable="false">
            <args>--offline --no-rebuild ${affectedBuildTasks}</args>
            <reload rule="NEVER"/>
        </action>
    </apply-for>

    <!--
        Custom actions are present under the "Run Gradle' popup on the project
        node. They shall be named with a prefix 'custom-' and an project unique
        number. They can have a displayName which is used to present the action
        in the UI.
    -->
    <action name="custom-1" displayName="Publish Plugin">
        <!-- Using 'input:' token provider will request user input
             when invoking the action. I this case it request a value displayed
             as 'Version', and fills up the default as '0.4.x'. The default
             value part is optional.
        -->
        <args>-Pversion=${input:Version,0.4.x}
clean
publishPlugins</args>


</actions>
             

Group of lookup interfaces
Interface NameIn/OutStabilitySpecified in What Document?
waitFinishedExportedPrivate

When calling ActionProvider.invokeAction(name, lookup) an instance of AfterBuildActionHook can be placed into lookup. It is then notified when the execution of the action is finished. Useful when writing tests.

Implementation Details

Where are the sources for the module?

The sources for the module are in the NetBeans Mercurial repositories.

What do other modules need to do to declare a dependency on this one, in addition to or instead of a plain module dependency?

XXX no answer for deploy-dependencies

Read more about the implementation in the answers to architecture questions.

Skip navigation links
org.netbeans.modules.gradle/1 1.4