diff --git a/groovy/gradle.spring/src/org/netbeans/modules/gradle/spring/SpringActionProvider.java b/groovy/gradle.spring/src/org/netbeans/modules/gradle/spring/SpringActionProvider.java new file mode 100644 index 000000000000..189db5f13a33 --- /dev/null +++ b/groovy/gradle.spring/src/org/netbeans/modules/gradle/spring/SpringActionProvider.java @@ -0,0 +1,41 @@ +/* + * 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.spring; + +import org.netbeans.modules.gradle.spi.actions.DefaultGradleActionsProvider; +import org.netbeans.modules.gradle.spi.actions.GradleActionsProvider; +import org.openide.util.lookup.ServiceProvider; +import static org.netbeans.spi.project.ActionProvider.*; + +/** + * Provides run and debug action for spring boot apps out-of-the-box. + * @author lkishalmi + */ +@ServiceProvider(service = GradleActionsProvider.class) +public class SpringActionProvider extends DefaultGradleActionsProvider { + private static final String[] SUPPORTED = new String[]{ + COMMAND_RUN, + COMMAND_DEBUG, + }; + + public SpringActionProvider() { + super(SUPPORTED); + } + +} diff --git a/groovy/gradle.spring/src/org/netbeans/modules/gradle/spring/action-mapping.xml b/groovy/gradle.spring/src/org/netbeans/modules/gradle/spring/action-mapping.xml new file mode 100644 index 000000000000..e438ad4237dc --- /dev/null +++ b/groovy/gradle.spring/src/org/netbeans/modules/gradle/spring/action-mapping.xml @@ -0,0 +1,33 @@ + + + + + + + bootRun + + + + bootRun --debug-jvm + + + diff --git a/groovy/gradle/netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.groovy b/groovy/gradle/netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.groovy index 4b90a52cbef1..885b5e1f78af 100644 --- a/groovy/gradle/netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.groovy +++ b/groovy/gradle/netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.groovy @@ -108,7 +108,7 @@ class NbProjectInfoBuilder { sp.put(p.name, p.projectDir); } model.info.project_subProjects = sp; - + Map ib = new HashMap<>(); println "Gradle Version: $gradleVersion" if (gradleVersion.compareTo(VersionNumber.parse('3.1')) >= 0) { @@ -118,7 +118,7 @@ class NbProjectInfoBuilder { } } model.info.project_includedBuilds = ib; - + try { model.info.buildClassPath = storeSet(project.buildscript.configurations.classpath.files) } catch (Exception e) { @@ -140,6 +140,9 @@ class NbProjectInfoBuilder { 'scala-base', 'scala', 'groovy-base', 'groovy',\ 'distribution', 'application', 'maven', 'osgi', \ 'jacoco', 'checkstyle', 'pmd', 'findbugs', 'ear', \ + 'play', 'java-library-distribution', 'maven-publish', + 'ivy-publish', 'antlr', \ + 'org.springframework.boot', \ 'com.github.lkishalmi.gatling', \ 'com.android.library', 'com.android.application']) { if (project.plugins.hasPlugin(plugin)) {