Forge - Gradle API

Parent POM for JBoss projects. Provides default project build configuration.

License

License

Categories

Categories

JBoss Container Application Servers Gradle Build Tools
GroupId

GroupId

org.jboss.forge.addon
ArtifactId

ArtifactId

gradle-api
Last Version

Last Version

3.0.0.Alpha3
Release Date

Release Date

Type

Type

jar
Description

Description

Forge - Gradle API
Parent POM for JBoss projects. Provides default project build configuration.
Project Organization

Project Organization

JBoss by Red Hat

Download gradle-api

How to add to project

<!-- https://jarcasting.com/artifacts/org.jboss.forge.addon/gradle-api/ -->
<dependency>
    <groupId>org.jboss.forge.addon</groupId>
    <artifactId>gradle-api</artifactId>
    <version>3.0.0.Alpha3</version>
</dependency>
// https://jarcasting.com/artifacts/org.jboss.forge.addon/gradle-api/
implementation 'org.jboss.forge.addon:gradle-api:3.0.0.Alpha3'
// https://jarcasting.com/artifacts/org.jboss.forge.addon/gradle-api/
implementation ("org.jboss.forge.addon:gradle-api:3.0.0.Alpha3")
'org.jboss.forge.addon:gradle-api:jar:3.0.0.Alpha3'
<dependency org="org.jboss.forge.addon" name="gradle-api" rev="3.0.0.Alpha3">
  <artifact name="gradle-api" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.jboss.forge.addon', module='gradle-api', version='3.0.0.Alpha3')
)
libraryDependencies += "org.jboss.forge.addon" % "gradle-api" % "3.0.0.Alpha3"
[org.jboss.forge.addon/gradle-api "3.0.0.Alpha3"]

Dependencies

compile (1)

Group / Artifact Type Version
org.codehaus.groovy : groovy jar 2.1.5

provided (5)

Group / Artifact Type Version
org.jboss.forge.furnace.container : cdi-api jar
org.jboss.forge.addon : dependencies jar
org.jboss.forge.addon : resources jar
org.jboss.forge.addon : environment jar
org.jboss.forge.addon : projects jar

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

Gradle Addon for JBoss Forge 3

Build Status

This addon exports services for use in other addons. The Gradle addon implements extension points in several addons, enabling them to function using Gradle (in fact Maven or Ivy) dependency resolution, project building, and additionally provides Gradle build script manipulation services.

Depends on

Addon Exported Optional

dependencies

yes

no

resources

yes

no

projects

yes

no

parser-java

yes

no

ui

no

yes

maven

no

no

configuration

no

no

org.jboss.forge.furnace.container:cdi

no

no

Setup

This Addon requires the following installation steps.

Add configuration to pom.xml

To use this addon, you must add it as a dependency in the pom.xml of your forge-addon classified artifact:

<dependency>
   <groupId>org.jboss.forge.addon</groupId>
   <artifactId>gradle</artifactId>
   <classifier>forge-addon</classifier>
   <version>${version}</version>
</dependency>

Features

Gradle DSL API mapping

This addon provides model for Gradle build script elements such as tasks, dependencies, source sets, plugins, etc.

GradleModelBuilder builder = GradleModelBuilder.create();

model.addTask(GradleTaskBuilder.create()
		.setName("newTask")
		.setDependendsOn(GradleTaskBuilder.create().setName("otherTask"))
		.setCode("println 'Hello!'"));
Forge-Gradle library

During setup, addon creates and installs forge.gradle library in the project directory. It adds few enhancements to build script which are not currently supported in default Gradle installation:

  • dependency management - implementation of Maven dependencyManagement, performed by two pseudoconfigurations named managed and direct

  • profiles - equivalent of Maven profiles, each profile is represented by name-profile.gradle script in project directory, profile is chosen by setting profile project build property

  • setting output archive name - changes output artifact name of the default build task (such as jar)

    In future, forge.gradle will probably be replaced with forge Gradle plugin or other alternative which won’t require adding anything to the project.

Project facets implementation

Gradle addon implements basic project facets from projects and parser-java addon, and adds a GradleFacet which is entry point for Gradle addon API:

  • GradleFacet

  • MetadataFacet

  • DependencyFacet

  • PackagingFacet

  • ResourcesFacet

  • JavaSourceFacet

Gradle manager

GradleManager service allows other addons to run Gradle builds using Gradle tooling API. It takes care of downloading Gradle installation if GRADLE_HOME environment property is not set, and makes Gradle builds synchronous.

org.jboss.forge.addon

JBoss Forge

JBoss Forge is a software development tool that extends your Java IDE, providing wizards and extensions (add-ons) for different technologies and solutions

Versions

Version
3.0.0.Alpha3
2.12.2.Final
2.5.0.Final
2.3.0.Final
2.0.0.Final