Skip to content

Commit

Permalink
Merge pull request #25772 from sebersole/README
Browse files Browse the repository at this point in the history
Work on README for Gradle plugin projects
  • Loading branch information
aloubyansky authored May 25, 2022
2 parents 81b9cfa + 6af2f68 commit 4c5d2d5
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 52 deletions.
99 changes: 99 additions & 0 deletions devtools/gradle/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
= Quarkus Gradle Support
:app-plugin-path: ./gradle-application-plugin
:extension-plugin-path: ./gradle-extension-plugin

Gradle plugins for building xref:{app-plugin-path}/README.adoc[Quarkus applications] and
building xref:{extension-plugin-path}/README.adoc[Quarkus extensions].


[[dev]]
== Develop

Before starting development on these plugins, be sure to have <<build,built>> the project.

For IntelliJ users, see the notes for <<importing-intellij,importing>> the project.

Be sure to see the notes about <<testing,testing>> your changes.


[[build]]
== Building

Generally, after each pull or rebase the entire project should be built:

[source]
----
./mvnw -Dquickly
----

This builds the entire Quarkus codebase and publishes everything to mavenLocal.

From there, this project works like any normal Gradle build. Run Gradle commands here
or any of the subprojects.

However, see the important notes about <<testing, testing>>.


[[testing]]
== Running Tests

Each subproject defines its own set of tests which can just be run using normal Gradle operations.

There are also integration tests located in `integration-tests/gradle`.

[IMPORTANT]
====
Before running integration tests, it is important that the entire Quarkus codebase be <<build,built>>
and published into mavenLocal.
====

To run the integration tests, from the `integration-tests/gradle` directory:

[source, bash]
----
./mvnw test
----

A single integration test can be run by itself:

[source, bash]
----
./mvnw test -Dtest=<test-class-name>
----

[NOTE]
====
See <<alt-testing>> for an alternative approach to integration testing.
====


[[importing-intellij]]
== Importing using Intellij

Disable "Maven Auto Import" for the Quarkus projects. Since the Gradle plugin has a pom.xml,
IntelliJ will configure this project as a Maven project. You need to configure it to be a Gradle
project. To do so, follow these instructions:

. Go to File -&gt; Project Structure
. In Modules, remove the `quarkus-gradle-plugin` and re-import as a Gradle project.


[[alt-testing]]
== Alternative Testing

Another option for testing the plugin is to create a local project that uses the plugin and the features you are working on.

Again, be sure the entire project is <<build,built>>, then run the following:

[source,bash]
----
mvn io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:create \
-DprojectGroupId=${groupName} \
-DprojectArtifactId=${name} \
-DclassName="org.acme.quickstart.GreetingResource" \
-DplatformArtifactId=quarkus-bom \
-Dpath="/hello" \
-DbuildTool=gradle
----

Follow the instructions in the https://quarkus.io/guides/gradle-tooling[Gradle Tooling Guide] for more information about the available commands.
52 changes: 0 additions & 52 deletions devtools/gradle/README.md

This file was deleted.

10 changes: 10 additions & 0 deletions devtools/gradle/gradle-application-plugin/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
= Quarkus Application Gradle Plugin
:root-project-path: ..

Gradle plugin for developing Quarkus Applications

Releases are published at https://plugins.gradle.org/plugin/io.quarkus.

Topics related to developing this plugin are covered in xref:{root-project-path}/README.adoc.

// todo : document usage of this plugin
10 changes: 10 additions & 0 deletions devtools/gradle/gradle-extension-plugin/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
= Quarkus Extension Gradle Plugin
:root-project-path: ..

Gradle plugin for developing Quarkus Extensions

Releases are published at https://plugins.gradle.org/plugin/io.quarkus.extension.

Most topics regarding developing this plugin are covered in xref:{root-project-path}/README.adoc.

// todo : document usage of this plugin

0 comments on commit 4c5d2d5

Please sign in to comment.