-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8963a49
Showing
38 changed files
with
2,369 additions
and
0 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,84 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.jboss.forge.addon</groupId> | ||
<artifactId>gradle-parent</artifactId> | ||
<version>2.0.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<artifactId>gradle</artifactId> | ||
<name>Forge - Gradle Addon</name> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.jboss.forge.addon</groupId> | ||
<artifactId>gradle-api</artifactId> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.forge.addon</groupId> | ||
<artifactId>gradle-impl</artifactId> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.forge.addon</groupId> | ||
<artifactId>gradle-impl-projects</artifactId> | ||
<scope>runtime</scope> | ||
</dependency> | ||
|
||
<!-- Addons --> | ||
<dependency> | ||
<groupId>org.jboss.forge.addon</groupId> | ||
<artifactId>environment</artifactId> | ||
<classifier>forge-addon</classifier> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.forge.addon</groupId> | ||
<artifactId>resources</artifactId> | ||
<classifier>forge-addon</classifier> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.forge.addon</groupId> | ||
<artifactId>dependencies</artifactId> | ||
<classifier>forge-addon</classifier> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.forge.addon</groupId> | ||
<artifactId>projects</artifactId> | ||
<classifier>forge-addon</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.forge.addon</groupId> | ||
<artifactId>parser-java</artifactId> | ||
<classifier>forge-addon</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.forge.addon</groupId> | ||
<artifactId>ui</artifactId> | ||
<classifier>forge-addon</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>create-forge-addon</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
<inherited>false</inherited> | ||
<configuration> | ||
<classifier>forge-addon</classifier> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
8 changes: 8 additions & 0 deletions
8
addon/src/main/java/org/jboss/forge/addon/gradle/package-info.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,8 @@ | ||
/* | ||
* Copyright 2013 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.jboss.forge.addon.gradle; | ||
|
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,54 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.jboss.forge.addon</groupId> | ||
<artifactId>gradle-parent</artifactId> | ||
<version>2.0.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>gradle-api</artifactId> | ||
<name>Forge - Gradle API</name> | ||
|
||
<properties> | ||
<version.maven>3.0.5</version.maven> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.jboss.forge.furnace</groupId> | ||
<artifactId>furnace-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.forge.addon</groupId> | ||
<artifactId>dependencies-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.forge.addon</groupId> | ||
<artifactId>resources-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.forge.addon</groupId> | ||
<artifactId>environment-api</artifactId> | ||
<version>2.0.0-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.forge.addon</groupId> | ||
<artifactId>projects-api</artifactId> | ||
<version>2.0.0-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.maven</groupId> | ||
<artifactId>maven-model</artifactId> | ||
<version>${version.maven}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.codehaus.groovy</groupId> | ||
<artifactId>groovy</artifactId> | ||
</dependency> | ||
</dependencies> | ||
</project> |
24 changes: 24 additions & 0 deletions
24
api/src/main/java/org/jboss/forge/addon/gradle/projects/GradleFacet.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,24 @@ | ||
/* | ||
* Copyright 2013 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.jboss.forge.addon.gradle.projects; | ||
|
||
import org.jboss.forge.addon.gradle.projects.model.GradleModel; | ||
import org.jboss.forge.addon.projects.ProjectFacet; | ||
|
||
/** | ||
* Performs Gradle specific operations. | ||
* | ||
* @author Adam Wyłuda | ||
*/ | ||
public interface GradleFacet extends ProjectFacet | ||
This comment has been minimized.
Sorry, something went wrong. |
||
{ | ||
void executeTask(String task); | ||
|
||
void executeTask(String task, String profile); | ||
|
||
GradleModel getModel(); | ||
} |
19 changes: 19 additions & 0 deletions
19
api/src/main/java/org/jboss/forge/addon/gradle/projects/model/GradleDependency.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,19 @@ | ||
/* | ||
* Copyright 2013 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.jboss.forge.addon.gradle.projects.model; | ||
|
||
/** | ||
* @author Adam Wyłuda | ||
*/ | ||
public interface GradleDependency | ||
{ | ||
String getName(); | ||
|
||
String getGroup(); | ||
|
||
GradleDependencyConfiguration getConfiguration(); | ||
} |
15 changes: 15 additions & 0 deletions
15
.../main/java/org/jboss/forge/addon/gradle/projects/model/GradleDependencyConfiguration.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,15 @@ | ||
/* | ||
* Copyright 2013 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.jboss.forge.addon.gradle.projects.model; | ||
|
||
/** | ||
* @author Adam Wyłuda | ||
*/ | ||
public enum GradleDependencyConfiguration | ||
{ | ||
COMPILE, TEST; | ||
} |
29 changes: 29 additions & 0 deletions
29
api/src/main/java/org/jboss/forge/addon/gradle/projects/model/GradleModel.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,29 @@ | ||
/* | ||
* Copyright 2013 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.jboss.forge.addon.gradle.projects.model; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Contains information about Gradle build script. | ||
* | ||
* @author Adam Wyłuda | ||
*/ | ||
public interface GradleModel | ||
{ | ||
List<GradleTask> getTasks(); | ||
|
||
List<GradleDependency> getDependencies(); | ||
|
||
List<GradleProfile> getProfiles(); | ||
|
||
List<GradlePlugin> getPlugins(); | ||
|
||
List<GradleRepository> getRepositories(); | ||
|
||
void createTask(GradleTaskBuilder builder); | ||
} |
15 changes: 15 additions & 0 deletions
15
api/src/main/java/org/jboss/forge/addon/gradle/projects/model/GradlePlugin.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,15 @@ | ||
/* | ||
* Copyright 2013 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.jboss.forge.addon.gradle.projects.model; | ||
|
||
/** | ||
* @author Adam Wyłuda | ||
*/ | ||
public interface GradlePlugin | ||
{ | ||
String getClazz(); | ||
} |
19 changes: 19 additions & 0 deletions
19
api/src/main/java/org/jboss/forge/addon/gradle/projects/model/GradleProfile.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,19 @@ | ||
/* | ||
* Copyright 2013 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.jboss.forge.addon.gradle.projects.model; | ||
|
||
/** | ||
* It represents Gradle simulated profile. | ||
* | ||
* @author Adam Wyłuda | ||
*/ | ||
public interface GradleProfile | ||
{ | ||
String getName(); | ||
|
||
GradleModel getModel(); | ||
} |
15 changes: 15 additions & 0 deletions
15
api/src/main/java/org/jboss/forge/addon/gradle/projects/model/GradleRepository.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,15 @@ | ||
/* | ||
* Copyright 2013 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.jboss.forge.addon.gradle.projects.model; | ||
|
||
/** | ||
* @author Adam Wyłuda | ||
*/ | ||
public interface GradleRepository | ||
{ | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
api/src/main/java/org/jboss/forge/addon/gradle/projects/model/GradleTask.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,15 @@ | ||
/* | ||
* Copyright 2013 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.jboss.forge.addon.gradle.projects.model; | ||
|
||
/** | ||
* @author Adam Wyłuda | ||
*/ | ||
public interface GradleTask | ||
{ | ||
String getName(); | ||
} |
77 changes: 77 additions & 0 deletions
77
api/src/main/java/org/jboss/forge/addon/gradle/projects/model/GradleTaskBuilder.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,77 @@ | ||
/* | ||
* Copyright 2013 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.jboss.forge.addon.gradle.projects.model; | ||
|
||
/** | ||
* @author Adam Wyłuda | ||
*/ | ||
public class GradleTaskBuilder | ||
{ | ||
private String name = "forgeTask"; | ||
private String dependsOn = ""; | ||
private String type = ""; | ||
private String code = ""; | ||
|
||
private GradleTaskBuilder() | ||
{ | ||
} | ||
|
||
public static GradleTaskBuilder create() | ||
{ | ||
return new GradleTaskBuilder(); | ||
} | ||
|
||
public String getName() | ||
{ | ||
return name; | ||
} | ||
|
||
public GradleTaskBuilder setName(String name) | ||
{ | ||
this.name = name; | ||
return this; | ||
} | ||
|
||
public String getDependsOn() | ||
{ | ||
return dependsOn; | ||
} | ||
|
||
public GradleTaskBuilder setDependsOn(String dependsOn) | ||
{ | ||
this.dependsOn = dependsOn; | ||
return this; | ||
} | ||
|
||
public GradleTaskBuilder setDependsOn(GradleTask task) | ||
{ | ||
setDependsOn(task.getName()); | ||
return this; | ||
} | ||
|
||
public String getType() | ||
{ | ||
return type; | ||
} | ||
|
||
public GradleTaskBuilder setType(String type) | ||
{ | ||
this.type = type; | ||
return this; | ||
} | ||
|
||
public String getCode() | ||
{ | ||
return code; | ||
} | ||
|
||
public GradleTaskBuilder setCode(String code) | ||
{ | ||
this.code = code; | ||
return this; | ||
} | ||
} |
Oops, something went wrong.
Add a
So it's possible to know where this resource is located