You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by lk...@apache.org on 2019/02/12 17:34:26 UTC

[incubator-netbeans] branch master updated: [NETBEANS-2029] Better handling of installing Gradle Distribution.

This is an automated email from the ASF dual-hosted git repository.

lkishalmi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 2d4ed95  [NETBEANS-2029] Better handling of installing Gradle Distribution.
2d4ed95 is described below

commit 2d4ed95a05476abeca81727d411e56f2f4d98d92
Author: Laszlo Kishalmi <la...@gmail.com>
AuthorDate: Sat Feb 9 15:03:59 2019 -0800

    [NETBEANS-2029] Better handling of installing Gradle Distribution.
---
 .../org/netbeans/modules/gradle/Bundle.properties  |   2 +
 .../modules/gradle/GradleDistributionManager.java  | 100 ++++++++++++++++++--
 .../modules/gradle/GradleInstallPanel.form         |  81 ++++++++++++++++
 .../modules/gradle/GradleInstallPanel.java         |  94 +++++++++++++++++++
 .../modules/gradle/GradleProjectCache.java         |  18 +++-
 .../gradle/execute/GradleDaemonExecutor.java       |  13 ++-
 .../modules/gradle/options/Bundle.properties       |   1 +
 .../gradle/options/GradleOptionsController.java    |   7 +-
 .../modules/gradle/options/SettingsPanel.form      | 102 ++++++++++++---------
 .../modules/gradle/options/SettingsPanel.java      |  78 +++++++++-------
 .../modules/gradle/spi/GradleSettings.java         |   9 ++
 11 files changed, 415 insertions(+), 90 deletions(-)

diff --git a/groovy/gradle/src/org/netbeans/modules/gradle/Bundle.properties b/groovy/gradle/src/org/netbeans/modules/gradle/Bundle.properties
index b63c660..4db79db 100644
--- a/groovy/gradle/src/org/netbeans/modules/gradle/Bundle.properties
+++ b/groovy/gradle/src/org/netbeans/modules/gradle/Bundle.properties
@@ -19,3 +19,5 @@ OpenIDE-Module-Display-Category=Gradle
 OpenIDE-Module-Name=Gradle Projects
 OpenIDE-Module-Short-Description=Provides basic infrastructure binding between NetBeans and Gradle
 Templates/Project/Gradle=Java with Gradle
+GradleInstallPanel.lbInfo.text=
+GradleInstallPanel.cbSilentInstall.text=Allow Silent Install of Gradle in the Future
diff --git a/groovy/gradle/src/org/netbeans/modules/gradle/GradleDistributionManager.java b/groovy/gradle/src/org/netbeans/modules/gradle/GradleDistributionManager.java
index 6a7b940..613a1cf 100644
--- a/groovy/gradle/src/org/netbeans/modules/gradle/GradleDistributionManager.java
+++ b/groovy/gradle/src/org/netbeans/modules/gradle/GradleDistributionManager.java
@@ -19,6 +19,7 @@
 
 package org.netbeans.modules.gradle;
 
+import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeSupport;
 import java.io.File;
@@ -41,6 +42,8 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 import java.util.WeakHashMap;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import org.gradle.util.GradleVersion;
@@ -55,7 +58,14 @@ import org.json.simple.parser.JSONParser;
 import org.json.simple.parser.ParseException;
 import org.netbeans.api.progress.ProgressHandle;
 import org.netbeans.api.progress.ProgressHandleFactory;
+import org.netbeans.modules.gradle.api.NbGradleProject;
+import org.netbeans.modules.gradle.spi.GradleSettings;
+import org.openide.DialogDescriptor;
+import org.openide.DialogDisplayer;
+import org.openide.awt.Notification;
+import org.openide.awt.NotificationDisplayer;
 import org.openide.util.Exceptions;
+import org.openide.util.NbBundle.Messages;
 import org.openide.util.RequestProcessor;
 
 /**
@@ -67,7 +77,7 @@ public class GradleDistributionManager {
     private static final Pattern WRAPPER_DIR_PATTERN = Pattern.compile("gradle-(\\d+\\.\\d+.*)-(bin|all)"); //NOI18N
     private static final Pattern DIST_VERSION_PATTERN = Pattern.compile(".*gradle-(\\d+\\.\\d+.*)-(bin|all)\\.zip"); //NOI18N
 
-    private static final String DOWNLOAD_URI = "https://services.gradle.org/distributions/gradle-%s-all.zip"; //NOI18N
+    private static final String DOWNLOAD_URI = "https://services.gradle.org/distributions/gradle-%s-bin.zip"; //NOI18N
 
     private static final RequestProcessor RP = new RequestProcessor("Gradle Installer", 1); //NOI18N
 
@@ -114,6 +124,33 @@ public class GradleDistributionManager {
         return createVersion(GradleVersion.current().getVersion());
     }
 
+    public File install(NbGradleVersion version) {
+        File ret = null;
+        if (version.install()) {
+            Lock lock = new ReentrantLock();
+            PropertyChangeListener pcl = (PropertyChangeEvent evt) -> {
+                if (NbGradleVersion.PROP_AVAILABLE.equals(evt.getPropertyName())) {
+                    synchronized (lock) {
+                        lock.notifyAll();
+                    }
+                }
+            };
+            try {
+                synchronized (lock) {
+                    version.addPropertyChangeListener(pcl);
+                    lock.wait();
+                }
+            } catch (InterruptedException ex) {
+                return ret;
+            } finally {
+                version.removePropertyChangeListener(pcl);
+            }
+            ret = version.distributionDir();
+        } else {
+            ret = version.distributionDir();
+        }
+        return ret;
+    }
     /**
      * Tries to evaluate the project distribution. If wrapper
      * is preferred and no offline execution is required then it's better to
@@ -279,10 +316,29 @@ public class GradleDistributionManager {
             return VERSION_BLACKLIST.contains(version.getVersion());
         }
 
-        public void install() {
+        @Messages("TIT_GradleInstall=Install Gradle")
+        public boolean install() {
             if (!isAvailable()) {
-                RP.post(new InstallTask(this), 500);
+                if (GradleSettings.getDefault().isSilentInstall()) {
+                    RP.post(new DownloadTask(this), 500);
+                    return true;
+                } else {
+                    GradleInstallPanel panel = new GradleInstallPanel(version.getVersion());
+                    DialogDescriptor dd = new DialogDescriptor(panel,
+                            Bundle.TIT_GradleInstall(),
+                            true,
+                            DialogDescriptor.OK_CANCEL_OPTION,
+                            DialogDescriptor.OK_OPTION,
+                            null
+                    );
+                    if (DialogDisplayer.getDefault().notify(dd) == DialogDescriptor.OK_OPTION) {
+                        GradleSettings.getDefault().setSilentInstall(panel.isSilentInstall());
+                        RP.post(new DownloadTask(this), 500);
+                        return true;
+                    }
+                }
             }
+            return false;
         }
 
         public File distributionDir() {
@@ -351,16 +407,34 @@ public class GradleDistributionManager {
 
     }
 
-    private class InstallTask implements Runnable, IDownload {
+    private class DownloadTask implements Runnable, IDownload {
 
         private final NbGradleVersion version;
         private final ProgressHandle handle;
-
-        public InstallTask(NbGradleVersion version) {
+        private final Notification notification;
+
+        @Messages({
+            "# {0} - The downloading GradleVersion ",
+            "TIT_Download_Gradle=Downloading {0}",
+            "# {0} - The downloading GradleVersion ",
+            "MSG_Download_Gradle={0} is being downloaded and installed."
+        })
+        public DownloadTask(NbGradleVersion version) {
             this.version = version;
-            handle = ProgressHandleFactory.createSystemHandle("Installing " + version.getVersion());
+            handle = ProgressHandleFactory.createSystemHandle(Bundle.TIT_Download_Gradle(version.getVersion()));
+            notification = NotificationDisplayer.getDefault().notify(
+                    Bundle.TIT_Download_Gradle(version.getVersion()),
+                    NbGradleProject.getIcon(),
+                    Bundle.MSG_Download_Gradle(version.getVersion()),
+                    null,
+                    NotificationDisplayer.Priority.NORMAL,
+                    NotificationDisplayer.Category.INFO);
         }
 
+        @Messages({
+            "# {0} - The downloading GradleVersion ",
+            "TIT_Install_Gradle_Failed=Failed installing {0}",
+        })
         @Override
         public void run() {
             try {
@@ -373,6 +447,16 @@ public class GradleDistributionManager {
             } catch (Exception ex) {
                 //Happens if something goes wrong with the download.
                 //TODO: Is it ok to let id silently die?
+                NotificationDisplayer.getDefault().notify(
+                        Bundle.TIT_Install_Gradle_Failed(version.getVersion()),
+                        NbGradleProject.getWarningIcon(),
+                        ex.getLocalizedMessage(),
+                        null,
+                        NotificationDisplayer.Priority.HIGH,
+                        NotificationDisplayer.Category.WARNING);
+            } finally {
+                handle.finish();
+                notification.clear();
             }
         }
 
@@ -399,8 +483,6 @@ public class GradleDistributionManager {
                         handle.progress(allRead);
                     }
                 }
-            } finally {
-                handle.finish();
             }
         }
 
diff --git a/groovy/gradle/src/org/netbeans/modules/gradle/GradleInstallPanel.form b/groovy/gradle/src/org/netbeans/modules/gradle/GradleInstallPanel.form
new file mode 100644
index 0000000..001b24d
--- /dev/null
+++ b/groovy/gradle/src/org/netbeans/modules/gradle/GradleInstallPanel.form
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+
+<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+  <AuxValues>
+    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
+    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+  </AuxValues>
+
+  <Layout>
+    <DimensionLayout dim="0">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Component id="lbInfo" alignment="0" pref="348" max="32767" attributes="0"/>
+                  <Group type="102" alignment="1" attributes="0">
+                      <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
+                      <Component id="cbSilentInstall" min="-2" max="-2" attributes="0"/>
+                  </Group>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+    <DimensionLayout dim="1">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="1" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="lbInfo" pref="77" max="32767" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="cbSilentInstall" min="-2" max="-2" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+  </Layout>
+  <SubComponents>
+    <Component class="javax.swing.JCheckBox" name="cbSilentInstall">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="org/netbeans/modules/gradle/Bundle.properties" key="GradleInstallPanel.cbSilentInstall.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="lbInfo">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="org/netbeans/modules/gradle/Bundle.properties" key="GradleInstallPanel.lbInfo.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+        <Property name="verticalAlignment" type="int" value="1"/>
+      </Properties>
+    </Component>
+  </SubComponents>
+</Form>
diff --git a/groovy/gradle/src/org/netbeans/modules/gradle/GradleInstallPanel.java b/groovy/gradle/src/org/netbeans/modules/gradle/GradleInstallPanel.java
new file mode 100644
index 0000000..dd60d77
--- /dev/null
+++ b/groovy/gradle/src/org/netbeans/modules/gradle/GradleInstallPanel.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.modules.gradle;
+
+import org.netbeans.modules.gradle.spi.GradleSettings;
+import org.openide.util.NbBundle.Messages;
+
+/**
+ *
+ * @author lkishalmi
+ */
+@Messages({
+        "# {0} - Gradle Version",
+        "MSG_Install=<html>It seems the required Gradle Version <b>{0}</b> " +
+        "is not installed in the system. Would you like to install it?"
+})
+public class GradleInstallPanel extends javax.swing.JPanel {
+
+    /**
+     * Creates new form GradleInstallPanel
+     */
+    public GradleInstallPanel(String version) {
+        initComponents();
+        lbInfo.setText(Bundle.MSG_Install(version));
+        cbSilentInstall.setSelected(GradleSettings.getDefault().isSilentInstall());
+    }
+
+    public boolean isSilentInstall() {
+        return cbSilentInstall.isSelected();
+    }
+
+    /**
+     * This method is called from within the constructor to initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is always
+     * regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents() {
+
+        cbSilentInstall = new javax.swing.JCheckBox();
+        lbInfo = new javax.swing.JLabel();
+
+        org.openide.awt.Mnemonics.setLocalizedText(cbSilentInstall, org.openide.util.NbBundle.getMessage(GradleInstallPanel.class, "GradleInstallPanel.cbSilentInstall.text")); // NOI18N
+
+        org.openide.awt.Mnemonics.setLocalizedText(lbInfo, org.openide.util.NbBundle.getMessage(GradleInstallPanel.class, "GradleInstallPanel.lbInfo.text")); // NOI18N
+        lbInfo.setVerticalAlignment(javax.swing.SwingConstants.TOP);
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
+        this.setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addComponent(lbInfo, javax.swing.GroupLayout.DEFAULT_SIZE, 348, Short.MAX_VALUE)
+                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                        .addGap(0, 0, Short.MAX_VALUE)
+                        .addComponent(cbSilentInstall)))
+                .addContainerGap())
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                .addContainerGap()
+                .addComponent(lbInfo, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(cbSilentInstall)
+                .addContainerGap())
+        );
+    }// </editor-fold>//GEN-END:initComponents
+
+
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JCheckBox cbSilentInstall;
+    private javax.swing.JLabel lbInfo;
+    // End of variables declaration//GEN-END:variables
+}
diff --git a/groovy/gradle/src/org/netbeans/modules/gradle/GradleProjectCache.java b/groovy/gradle/src/org/netbeans/modules/gradle/GradleProjectCache.java
index 41f5da6..e19d72c 100644
--- a/groovy/gradle/src/org/netbeans/modules/gradle/GradleProjectCache.java
+++ b/groovy/gradle/src/org/netbeans/modules/gradle/GradleProjectCache.java
@@ -112,10 +112,9 @@ public final class GradleProjectCache {
         }
         GradleProject prev = project.project;
 
-        ignoreCache |= GradleSettings.getDefault().isCacheDisabled();
-
         // Try to turn to the cache
-        if (!ignoreCache && (prev.getQuality() == FALLBACK))  {
+        if (!(ignoreCache || GradleSettings.getDefault().isCacheDisabled())
+                && (prev.getQuality() == FALLBACK))  {
             ProjectCacheEntry cacheEntry = loadCachedProject(files);
             if (cacheEntry != null) {
                 if (cacheEntry.isCompatible()) {
@@ -155,7 +154,18 @@ public final class GradleProjectCache {
         Quality quality = ctx.aim;
         GradleBaseProject base = ctx.previous.getBaseProject();
         GradleConnector gconn = GradleConnector.newConnector();
-        gconn.useInstallation(RunUtils.evaluateGradleDistribution(ctx.project, true));
+
+        File gradleInstall = RunUtils.evaluateGradleDistribution(ctx.project, true);
+        if (gradleInstall == null) {
+            GradleDistributionManager gdm = GradleDistributionManager.get(GradleSettings.getDefault().getGradleUserHome());
+            GradleDistributionManager.NbGradleVersion version = gdm.createVersion(GradleSettings.getDefault().getGradleVersion());
+            gradleInstall = gdm.install(version);
+        }
+        if (gradleInstall == null) {
+            return ctx.previous;
+        }
+        gconn.useInstallation(gradleInstall);
+
         ProjectConnection pconn = gconn.forProjectDirectory(base.getProjectDir()).connect();
 
         GradleCommandLine cmd = new GradleCommandLine(ctx.args);
diff --git a/groovy/gradle/src/org/netbeans/modules/gradle/execute/GradleDaemonExecutor.java b/groovy/gradle/src/org/netbeans/modules/gradle/execute/GradleDaemonExecutor.java
index ccfe5f7..a6ac52b 100644
--- a/groovy/gradle/src/org/netbeans/modules/gradle/execute/GradleDaemonExecutor.java
+++ b/groovy/gradle/src/org/netbeans/modules/gradle/execute/GradleDaemonExecutor.java
@@ -117,7 +117,12 @@ public final class GradleDaemonExecutor extends AbstractGradleExecutor {
 
             GradleConnector gconn = GradleConnector.newConnector();
             cancelTokenSource = GradleConnector.newCancellationTokenSource();
-            gconn.useInstallation(RunUtils.evaluateGradleDistribution(config.getProject(), false));
+            File gradleInstall = RunUtils.evaluateGradleDistribution(config.getProject(), false);
+            if (gradleInstall != null) {
+                gconn.useInstallation(gradleInstall);
+            } else {
+                gconn.useBuildDistribution();
+            }
 
             File projectDir = FileUtil.toFile(config.getProject().getProjectDirectory());
             //TODO: GradleUserHome
@@ -227,8 +232,10 @@ public final class GradleDaemonExecutor extends AbstractGradleExecutor {
                 commandLine.append(relRoot).append("/gradlew");
             } else {
                 File gradleDistribution = RunUtils.evaluateGradleDistribution(null, false);
-                File gradle = new File(gradleDistribution, "bin/gradle"); //NOI18N
-                commandLine.append(gradle.getAbsolutePath());
+                if (gradleDistribution != null) {
+                    File gradle = new File(gradleDistribution, "bin/gradle"); //NOI18N
+                    commandLine.append(gradle.getAbsolutePath());
+                }
             }
 
         for (String arg : config.getCommandLine().getSupportedCommandLine()) {
diff --git a/groovy/gradle/src/org/netbeans/modules/gradle/options/Bundle.properties b/groovy/gradle/src/org/netbeans/modules/gradle/options/Bundle.properties
index d0d9156..960da18 100644
--- a/groovy/gradle/src/org/netbeans/modules/gradle/options/Bundle.properties
+++ b/groovy/gradle/src/org/netbeans/modules/gradle/options/Bundle.properties
@@ -53,3 +53,4 @@ SettingsPanel.lbDownloadSources.text=Download Sources Along with the Dependencie
 SettingsPanel.lbDownloadJavadoc.text=Download JavaDoc Along with the Dependencies
 SettingsPanel.cbDownloadJavadoc.toolTipText=Not implemented yet.
 SettingsPanel.cbDownloadSources.toolTipText=Not implemented yet.
+SettingsPanel.cbSilentInstall.text=Install Gradle Runtime Silently
diff --git a/groovy/gradle/src/org/netbeans/modules/gradle/options/GradleOptionsController.java b/groovy/gradle/src/org/netbeans/modules/gradle/options/GradleOptionsController.java
index 6422c0b..6d3b382 100644
--- a/groovy/gradle/src/org/netbeans/modules/gradle/options/GradleOptionsController.java
+++ b/groovy/gradle/src/org/netbeans/modules/gradle/options/GradleOptionsController.java
@@ -50,8 +50,11 @@ public class GradleOptionsController extends OptionsPanelController {
     @Override
     public void applyChanges() {
         getPanel().applyValues();
-        GradleDistributionManager gdm = GradleDistributionManager.get(GradleSettings.getDefault().getGradleUserHome());
-        gdm.createVersion(GradleSettings.getDefault().getGradleVersion()).install();
+        if (GradleSettings.getDefault().isSilentInstall()) {
+            // If allowed, let's just install the required Gradle version.
+            GradleDistributionManager gdm = GradleDistributionManager.get(GradleSettings.getDefault().getGradleUserHome());
+            gdm.createVersion(GradleSettings.getDefault().getGradleVersion()).install();
+        }
     }
 
     @Override
diff --git a/groovy/gradle/src/org/netbeans/modules/gradle/options/SettingsPanel.form b/groovy/gradle/src/org/netbeans/modules/gradle/options/SettingsPanel.form
index 51b61c8..70b430e 100644
--- a/groovy/gradle/src/org/netbeans/modules/gradle/options/SettingsPanel.form
+++ b/groovy/gradle/src/org/netbeans/modules/gradle/options/SettingsPanel.form
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-
 <!--
 
     Licensed to the Apache Software Foundation (ASF) under one
@@ -137,11 +136,16 @@
             <DimensionLayout dim="0">
               <Group type="103" groupAlignment="0" attributes="0">
                   <Component id="jPanel1" max="32767" attributes="0"/>
-                  <Component id="jPanel2" alignment="0" max="32767" attributes="0"/>
-                  <Group type="102" alignment="0" attributes="0">
+                  <Group type="102" attributes="0">
+                      <EmptySpace max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="0" attributes="0">
+                          <Group type="102" alignment="0" attributes="0">
+                              <Component id="cbPreferMaven" min="-2" max="-2" attributes="0"/>
+                              <EmptySpace min="0" pref="367" max="32767" attributes="0"/>
+                          </Group>
+                          <Component id="jPanel2" alignment="0" max="32767" attributes="0"/>
+                      </Group>
                       <EmptySpace max="-2" attributes="0"/>
-                      <Component id="cbPreferMaven" min="-2" max="-2" attributes="0"/>
-                      <EmptySpace max="32767" attributes="0"/>
                   </Group>
               </Group>
             </DimensionLayout>
@@ -149,9 +153,9 @@
               <Group type="103" groupAlignment="0" attributes="0">
                   <Group type="102" alignment="0" attributes="0">
                       <Component id="jPanel1" min="-2" max="-2" attributes="0"/>
-                      <EmptySpace type="unrelated" max="-2" attributes="0"/>
-                      <Component id="jPanel2" min="-2" pref="125" max="-2" attributes="0"/>
-                      <EmptySpace pref="48" max="32767" attributes="0"/>
+                      <EmptySpace max="-2" attributes="0"/>
+                      <Component id="jPanel2" min="-2" pref="124" max="-2" attributes="0"/>
+                      <EmptySpace min="-2" pref="41" max="-2" attributes="0"/>
                       <Component id="cbPreferMaven" min="-2" max="-2" attributes="0"/>
                       <EmptySpace max="-2" attributes="0"/>
                   </Group>
@@ -173,52 +177,60 @@
               <Layout>
                 <DimensionLayout dim="0">
                   <Group type="103" groupAlignment="0" attributes="0">
-                      <Group type="102" alignment="0" attributes="0">
-                          <EmptySpace min="-2" max="-2" attributes="0"/>
-                          <Group type="103" groupAlignment="0" attributes="0">
-                              <Component id="lblGradleUserHome" alignment="0" min="-2" max="-2" attributes="0"/>
-                              <Component id="lblGradleDistribution" alignment="0" min="-2" max="-2" attributes="0"/>
-                          </Group>
-                          <EmptySpace min="-2" max="-2" attributes="0"/>
+                      <Group type="102" attributes="0">
+                          <EmptySpace max="-2" attributes="0"/>
                           <Group type="103" groupAlignment="0" attributes="0">
-                              <Group type="102" attributes="0">
+                              <Group type="102" alignment="0" attributes="0">
                                   <Group type="103" groupAlignment="0" attributes="0">
-                                      <Component id="tfGradleUserHome" max="32767" attributes="0"/>
-                                      <Group type="102" attributes="0">
-                                          <Component id="rbUseCustomGradle" min="-2" max="-2" attributes="0"/>
-                                          <EmptySpace min="-2" max="-2" attributes="0"/>
-                                          <Component id="tfUseCustomGradle" max="32767" attributes="0"/>
-                                      </Group>
+                                      <Component id="lblGradleUserHome" alignment="0" min="-2" max="-2" attributes="0"/>
+                                      <Component id="lblGradleDistribution" alignment="0" min="-2" max="-2" attributes="0"/>
                                   </Group>
                                   <EmptySpace min="-2" max="-2" attributes="0"/>
                                   <Group type="103" groupAlignment="0" attributes="0">
-                                      <Component id="btGradleUserHome" linkSize="1" max="32767" attributes="0"/>
-                                      <Component id="btUseCustomGradle" linkSize="1" min="-2" max="-2" attributes="0"/>
-                                  </Group>
-                              </Group>
-                              <Group type="102" attributes="0">
-                                  <Group type="103" groupAlignment="0" attributes="0">
-                                      <Component id="cbPreferWrapper" min="-2" max="-2" attributes="0"/>
-                                      <Component id="cbStartDaemonOnStart" min="-2" max="-2" attributes="0"/>
+                                      <Group type="102" attributes="0">
+                                          <Group type="103" groupAlignment="0" attributes="0">
+                                              <Component id="cbPreferWrapper" min="-2" max="-2" attributes="0"/>
+                                              <Component id="cbStartDaemonOnStart" min="-2" max="-2" attributes="0"/>
+                                          </Group>
+                                          <EmptySpace min="0" pref="165" max="32767" attributes="0"/>
+                                      </Group>
+                                      <Group type="102" attributes="0">
+                                          <Component id="rbUseStandardGradle" min="-2" max="-2" attributes="0"/>
+                                          <EmptySpace type="separate" max="-2" attributes="0"/>
+                                          <Component id="cbGradleVersion" min="-2" max="-2" attributes="0"/>
+                                          <EmptySpace max="-2" attributes="0"/>
+                                          <Component id="lbVersionInfo" max="32767" attributes="0"/>
+                                      </Group>
+                                      <Group type="102" alignment="1" attributes="0">
+                                          <Group type="103" groupAlignment="1" attributes="0">
+                                              <Component id="tfGradleUserHome" alignment="0" max="32767" attributes="0"/>
+                                              <Group type="102" alignment="0" attributes="0">
+                                                  <Component id="rbUseCustomGradle" min="-2" max="-2" attributes="0"/>
+                                                  <EmptySpace min="-2" max="-2" attributes="0"/>
+                                                  <Component id="tfUseCustomGradle" max="32767" attributes="0"/>
+                                              </Group>
+                                          </Group>
+                                          <EmptySpace min="-2" max="-2" attributes="0"/>
+                                          <Group type="103" groupAlignment="0" attributes="0">
+                                              <Component id="btGradleUserHome" linkSize="1" max="32767" attributes="0"/>
+                                              <Component id="btUseCustomGradle" linkSize="1" min="-2" max="-2" attributes="0"/>
+                                          </Group>
+                                      </Group>
                                   </Group>
-                                  <EmptySpace min="0" pref="107" max="32767" attributes="0"/>
                               </Group>
-                              <Group type="102" attributes="0">
-                                  <Component id="rbUseStandardGradle" min="-2" max="-2" attributes="0"/>
-                                  <EmptySpace type="separate" max="-2" attributes="0"/>
-                                  <Component id="cbGradleVersion" min="-2" max="-2" attributes="0"/>
-                                  <EmptySpace max="-2" attributes="0"/>
-                                  <Component id="lbVersionInfo" max="32767" attributes="0"/>
+                              <Group type="102" alignment="1" attributes="0">
+                                  <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
+                                  <Component id="cbSilentInstall" min="-2" max="-2" attributes="0"/>
                               </Group>
                           </Group>
-                          <EmptySpace min="-2" max="-2" attributes="0"/>
+                          <EmptySpace max="-2" attributes="0"/>
                       </Group>
                   </Group>
                 </DimensionLayout>
                 <DimensionLayout dim="1">
                   <Group type="103" groupAlignment="0" attributes="0">
                       <Group type="102" alignment="0" attributes="0">
-                          <EmptySpace max="-2" attributes="0"/>
+                          <EmptySpace max="32767" attributes="0"/>
                           <Group type="103" groupAlignment="3" attributes="0">
                               <Component id="lblGradleUserHome" alignment="3" min="-2" max="-2" attributes="0"/>
                               <Component id="tfGradleUserHome" alignment="3" min="-2" max="-2" attributes="0"/>
@@ -241,7 +253,8 @@
                           <Component id="cbPreferWrapper" min="-2" max="-2" attributes="0"/>
                           <EmptySpace type="unrelated" max="-2" attributes="0"/>
                           <Component id="cbStartDaemonOnStart" min="-2" max="-2" attributes="0"/>
-                          <EmptySpace max="32767" attributes="0"/>
+                          <EmptySpace type="unrelated" max="-2" attributes="0"/>
+                          <Component id="cbSilentInstall" min="-2" max="-2" attributes="0"/>
                       </Group>
                   </Group>
                 </DimensionLayout>
@@ -356,6 +369,13 @@
                     <Property name="enabled" type="boolean" value="false"/>
                   </Properties>
                 </Component>
+                <Component class="javax.swing.JCheckBox" name="cbSilentInstall">
+                  <Properties>
+                    <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+                      <ResourceString bundle="org/netbeans/modules/gradle/options/Bundle.properties" key="SettingsPanel.cbSilentInstall.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+                    </Property>
+                  </Properties>
+                </Component>
               </SubComponents>
             </Container>
             <Container class="javax.swing.JPanel" name="jPanel2">
@@ -384,7 +404,7 @@
                                       <Component id="cbOffline" min="-2" max="-2" attributes="0"/>
                                       <Component id="cbNoRebuild" alignment="0" min="-2" max="-2" attributes="0"/>
                                   </Group>
-                                  <EmptySpace pref="99" max="32767" attributes="0"/>
+                                  <EmptySpace pref="113" max="32767" attributes="0"/>
                                   <Group type="103" groupAlignment="0" max="-2" attributes="0">
                                       <Component id="cbSkipCheck" max="32767" attributes="0"/>
                                       <Component id="cbSkipTest" alignment="0" max="32767" attributes="0"/>
diff --git a/groovy/gradle/src/org/netbeans/modules/gradle/options/SettingsPanel.java b/groovy/gradle/src/org/netbeans/modules/gradle/options/SettingsPanel.java
index 56b5377..535eec5 100644
--- a/groovy/gradle/src/org/netbeans/modules/gradle/options/SettingsPanel.java
+++ b/groovy/gradle/src/org/netbeans/modules/gradle/options/SettingsPanel.java
@@ -103,6 +103,7 @@ public class SettingsPanel extends javax.swing.JPanel {
         cbStartDaemonOnStart = new javax.swing.JCheckBox();
         cbPreferWrapper = new javax.swing.JCheckBox();
         lbVersionInfo = new javax.swing.JLabel();
+        cbSilentInstall = new javax.swing.JCheckBox();
         jPanel2 = new javax.swing.JPanel();
         cbOffline = new javax.swing.JCheckBox();
         cbSkipTest = new javax.swing.JCheckBox();
@@ -229,6 +230,8 @@ public class SettingsPanel extends javax.swing.JPanel {
         org.openide.awt.Mnemonics.setLocalizedText(lbVersionInfo, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.lbVersionInfo.text")); // NOI18N
         lbVersionInfo.setEnabled(false);
 
+        org.openide.awt.Mnemonics.setLocalizedText(cbSilentInstall, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.cbSilentInstall.text")); // NOI18N
+
         javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
         jPanel1.setLayout(jPanel1Layout);
         jPanel1Layout.setHorizontalGroup(
@@ -236,32 +239,37 @@ public class SettingsPanel extends javax.swing.JPanel {
             .addGroup(jPanel1Layout.createSequentialGroup()
                 .addContainerGap()
                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(lblGradleUserHome)
-                    .addComponent(lblGradleDistribution))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                     .addGroup(jPanel1Layout.createSequentialGroup()
                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addComponent(tfGradleUserHome)
-                            .addGroup(jPanel1Layout.createSequentialGroup()
-                                .addComponent(rbUseCustomGradle)
-                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                                .addComponent(tfUseCustomGradle)))
+                            .addComponent(lblGradleUserHome)
+                            .addComponent(lblGradleDistribution))
                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addComponent(btGradleUserHome, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                            .addComponent(btUseCustomGradle)))
-                    .addGroup(jPanel1Layout.createSequentialGroup()
-                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addComponent(cbPreferWrapper)
-                            .addComponent(cbStartDaemonOnStart))
-                        .addGap(0, 107, Short.MAX_VALUE))
-                    .addGroup(jPanel1Layout.createSequentialGroup()
-                        .addComponent(rbUseStandardGradle)
-                        .addGap(18, 18, 18)
-                        .addComponent(cbGradleVersion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(lbVersionInfo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
+                            .addGroup(jPanel1Layout.createSequentialGroup()
+                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                    .addComponent(cbPreferWrapper)
+                                    .addComponent(cbStartDaemonOnStart))
+                                .addGap(0, 165, Short.MAX_VALUE))
+                            .addGroup(jPanel1Layout.createSequentialGroup()
+                                .addComponent(rbUseStandardGradle)
+                                .addGap(18, 18, 18)
+                                .addComponent(cbGradleVersion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                .addComponent(lbVersionInfo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
+                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+                                    .addComponent(tfGradleUserHome, javax.swing.GroupLayout.Alignment.LEADING)
+                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
+                                        .addComponent(rbUseCustomGradle)
+                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                        .addComponent(tfUseCustomGradle)))
+                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                    .addComponent(btGradleUserHome, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                                    .addComponent(btUseCustomGradle)))))
+                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
+                        .addGap(0, 0, Short.MAX_VALUE)
+                        .addComponent(cbSilentInstall)))
                 .addContainerGap())
         );
 
@@ -270,7 +278,7 @@ public class SettingsPanel extends javax.swing.JPanel {
         jPanel1Layout.setVerticalGroup(
             jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
             .addGroup(jPanel1Layout.createSequentialGroup()
-                .addContainerGap()
+                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                     .addComponent(lblGradleUserHome)
                     .addComponent(tfGradleUserHome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
@@ -290,7 +298,8 @@ public class SettingsPanel extends javax.swing.JPanel {
                 .addComponent(cbPreferWrapper)
                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                 .addComponent(cbStartDaemonOnStart)
-                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                .addComponent(cbSilentInstall))
         );
 
         jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.jPanel2.border.title"))); // NOI18N
@@ -319,7 +328,7 @@ public class SettingsPanel extends javax.swing.JPanel {
                         .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                             .addComponent(cbOffline)
                             .addComponent(cbNoRebuild))
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 99, Short.MAX_VALUE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 113, Short.MAX_VALUE)
                         .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                             .addComponent(cbSkipCheck, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                             .addComponent(cbSkipTest, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
@@ -348,19 +357,22 @@ public class SettingsPanel extends javax.swing.JPanel {
         pnlExecutionLayout.setHorizontalGroup(
             pnlExecutionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
             .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
             .addGroup(pnlExecutionLayout.createSequentialGroup()
                 .addContainerGap()
-                .addComponent(cbPreferMaven)
-                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                .addGroup(pnlExecutionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(pnlExecutionLayout.createSequentialGroup()
+                        .addComponent(cbPreferMaven)
+                        .addGap(0, 367, Short.MAX_VALUE))
+                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                .addContainerGap())
         );
         pnlExecutionLayout.setVerticalGroup(
             pnlExecutionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
             .addGroup(pnlExecutionLayout.createSequentialGroup()
                 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
-                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addGap(41, 41, 41)
                 .addComponent(cbPreferMaven)
                 .addContainerGap())
         );
@@ -616,6 +628,7 @@ public class SettingsPanel extends javax.swing.JPanel {
         bgUsedDistribution.setSelected(bm, true);
 
         cbStartDaemonOnStart.setSelected(settings.isStartDaemonOnStart());
+        cbSilentInstall.setSelected(settings.isSilentInstall());
 
         cbOffline.setSelected(settings.isOffline());
         cbConfigureOnDemand.setSelected(settings.isConfigureOnDemand());
@@ -674,6 +687,7 @@ public class SettingsPanel extends javax.swing.JPanel {
         settings.setUseCustomGradle(useCustomGradle);
 
         settings.setStartDaemonOnStart(cbStartDaemonOnStart.isSelected());
+        settings.setSilentInstall(cbSilentInstall.isSelected());
 
         settings.setOffline(cbOffline.isSelected());
         settings.setConfigureOnDemand(cbConfigureOnDemand.isSelected());
@@ -714,6 +728,7 @@ public class SettingsPanel extends javax.swing.JPanel {
         isChanged |= settings.useCustomGradle() != useCustomGradle;
 
         isChanged |= settings.isStartDaemonOnStart() != cbStartDaemonOnStart.isSelected();
+        isChanged |= settings.isSilentInstall() != cbSilentInstall.isSelected();
 
         isChanged |= settings.isOffline() != cbOffline.isSelected();
         isChanged |= settings.isConfigureOnDemand() != cbConfigureOnDemand.isSelected();
@@ -797,6 +812,7 @@ public class SettingsPanel extends javax.swing.JPanel {
     private javax.swing.JCheckBox cbPreferWrapper;
     private javax.swing.JCheckBox cbReuseEditorOnStackTrace;
     private javax.swing.JCheckBox cbReuseOutputTabs;
+    private javax.swing.JCheckBox cbSilentInstall;
     private javax.swing.JCheckBox cbSkipCheck;
     private javax.swing.JCheckBox cbSkipTest;
     private javax.swing.JCheckBox cbStartDaemonOnStart;
diff --git a/groovy/gradle/src/org/netbeans/modules/gradle/spi/GradleSettings.java b/groovy/gradle/src/org/netbeans/modules/gradle/spi/GradleSettings.java
index 96f05e5..20bb104 100644
--- a/groovy/gradle/src/org/netbeans/modules/gradle/spi/GradleSettings.java
+++ b/groovy/gradle/src/org/netbeans/modules/gradle/spi/GradleSettings.java
@@ -76,6 +76,7 @@ public final class GradleSettings {
     public static final String PROP_REUSE_OUTPUT_TABS = "reuseOutputTabs";
     public static final String PROP_USE_CUSTOM_GRADLE = "useCustomGradle";
     public static final String PROP_GRADLE_VERSION = "gradleVersion";
+    public static final String PROP_SILENT_INSTALL = "silentInstall";
 
     public static final String PROP_OPT_OFFLINE = "offline";
     public static final String PROP_OPT_NO_REBUILD = "noRebuild";
@@ -140,6 +141,14 @@ public final class GradleSettings {
         return dir != null ? new File(dir) : new File(System.getProperty("user.home"), ".gradle"); //NOI18N
     }
 
+    public void setSilentInstall(boolean b) {
+        getPreferences().putBoolean(PROP_SILENT_INSTALL, b);
+    }
+
+    public boolean isSilentInstall() {
+        return getPreferences().getBoolean(PROP_SILENT_INSTALL, false);
+    }
+
     public void setReuseOutputTabs(boolean b) {
         getPreferences().putBoolean(PROP_REUSE_OUTPUT_TABS, b);
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists