-
Notifications
You must be signed in to change notification settings - Fork 874
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gradle Groovy Application/Library Project Creation Wizards
- Loading branch information
Showing
9 changed files
with
184 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?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. | ||
--> | ||
<licenseinfo> | ||
<fileset> | ||
<file>src/org/netbeans/modules/gradle/groovy/resources/groovyProjectIcon.png</file> | ||
<file>src/org/netbeans/modules/gradle/groovy/resources/groovyProjectIcon_dark.png</file> | ||
<license ref="Gradle-icon"/> | ||
<comment type="COMMENT_UNSUPPORTED"> | ||
Icons are based based on artwork available on the https://gradle.org/brand/ . | ||
More specificly: https://gradle.com/brand_assets/Gradle_Elephant_Icon_Assets.zip | ||
</comment> | ||
</fileset> | ||
</licenseinfo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...roovy/src/org/netbeans/modules/gradle/groovy/newproject/SimpleApplicationDescription.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!-- | ||
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. | ||
--> | ||
<html> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | ||
</head> | ||
<body> | ||
<b>Creates a simple Groovy application</b> Gradle project. An empty main | ||
class is also going to be created in the project. | ||
</body> | ||
</html> | ||
|
28 changes: 28 additions & 0 deletions
28
...le.groovy/src/org/netbeans/modules/gradle/groovy/newproject/SimpleLibraryDescription.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!-- | ||
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. | ||
--> | ||
<html> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | ||
</head> | ||
<body> | ||
<b>Creates a new Groovy library</b> Gradle project. | ||
</body> | ||
</html> |
66 changes: 66 additions & 0 deletions
66
groovy/gradle.groovy/src/org/netbeans/modules/gradle/groovy/newproject/Wizards.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* 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.groovy.newproject; | ||
|
||
import java.util.List; | ||
import org.netbeans.api.templates.TemplateRegistration; | ||
import org.netbeans.modules.gradle.spi.newproject.BaseGradleWizardIterator; | ||
import org.netbeans.modules.gradle.spi.newproject.GradleInitWizard; | ||
import org.openide.util.NbBundle; | ||
|
||
/** | ||
* | ||
* @author lkishalmi | ||
*/ | ||
public class Wizards { | ||
|
||
private Wizards() {} | ||
|
||
private static final List<Integer> JAVA_VERSIONS = List.of(21, 17, 11, 8); | ||
|
||
@TemplateRegistration(folder="Project/Gradle", position=350, displayName="#template.simpleAppProject", iconBase="org/netbeans/modules/gradle/groovy/resources/groovyProjectIcon.png", description="SimpleApplicationDescription.html") | ||
@NbBundle.Messages({ | ||
"template.simpleAppProject=Groovy Application", | ||
"LBL_SimpleApplicationProject=Groovy Application with Gradle" | ||
}) | ||
public static BaseGradleWizardIterator createJavaApplication() { | ||
return GradleInitWizard.create("groovy-application", Bundle.LBL_SimpleApplicationProject()) | ||
.withJavaVersions(JAVA_VERSIONS) | ||
.withImportantPaths(List.of( | ||
"app", | ||
"app/src/main/groovy/${package}/App.groovy" | ||
)) | ||
.build(); | ||
} | ||
|
||
@TemplateRegistration(folder="Project/Gradle", position=360, displayName="#template.simpleLibProject", iconBase="org/netbeans/modules/gradle/groovy/resources/groovyProjectIcon.png", description="SimpleLibraryDescription.html") | ||
@NbBundle.Messages({ | ||
"template.simpleLibProject=Groovy Class Library", | ||
"LBL_SimpleLibraryProject=Groovy Class Library with Gradle" | ||
}) | ||
public static BaseGradleWizardIterator createJavaLibrary() { | ||
return GradleInitWizard.create("groovy-library", Bundle.LBL_SimpleApplicationProject()) | ||
.withJavaVersions(JAVA_VERSIONS) | ||
.withImportantPaths(List.of( | ||
"lib", | ||
"lib/src/main/groovy/${package}/Library.groovy" | ||
)) | ||
.build(); | ||
} | ||
} |
Binary file added
BIN
+491 Bytes
...e.groovy/src/org/netbeans/modules/gradle/groovy/resources/groovyProjectIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+585 Bytes
...ovy/src/org/netbeans/modules/gradle/groovy/resources/groovyProjectIcon_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.