-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Showing
111 changed files
with
837 additions
and
178 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,27 @@ | ||
dependencies { | ||
api gradleApi() | ||
|
||
implementation "io.quarkus:quarkus-bootstrap-core:${version}" | ||
implementation "io.quarkus:quarkus-devtools-common:${version}" | ||
implementation "io.quarkus:quarkus-core-deployment:${version}" | ||
|
||
testImplementation "io.quarkus:quarkus-project-core-extension-codestarts:${version}" | ||
testImplementation 'org.assertj:assertj-core:3.20.2' | ||
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.2' | ||
testImplementation "io.quarkus:quarkus-devmode-test-utils:${version}" | ||
testImplementation "io.quarkus:quarkus-devtools-testing:${version}" | ||
testImplementation gradleTestKit() | ||
} | ||
|
||
group = "io.quarkus" | ||
|
||
gradlePlugin { | ||
plugins { | ||
quarkusPlugin { | ||
id = 'io.quarkus' | ||
implementationClass = 'io.quarkus.gradle.QuarkusPlugin' | ||
displayName = 'Quarkus Plugin' | ||
description = 'Builds a Quarkus application, and provides helpers to launch dev-mode, the Quarkus CLI, building of native images' | ||
} | ||
} | ||
} |
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,89 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>io.quarkus.gradle.plugin.parent</artifactId> | ||
<version>999-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>io.quarkus.gradle.plugin</artifactId> | ||
<packaging>pom</packaging> | ||
<name>Quarkus - Gradle Plugin</name> | ||
<description>Quarkus - Gradle Plugin</description> | ||
|
||
<dependencies> | ||
<!-- Compile --> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-bootstrap-core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-core-deployment</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-devtools-common</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-project-core-extension-codestarts</artifactId> | ||
<type>pom</type> | ||
<scope>test</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>*</groupId> | ||
<artifactId>*</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-devmode-test-utils</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>attach-artifacts</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>attach-artifact</goal> | ||
</goals> | ||
<configuration> | ||
<artifacts> | ||
<artifact> | ||
<file>build/libs/application-plugin-${project.version}.jar</file> | ||
<type>jar</type> | ||
</artifact> | ||
<artifact> | ||
<file>build/libs/application-plugin-${project.version}-javadoc.jar</file> | ||
<type>jar</type> | ||
<classifier>javadoc</classifier> | ||
</artifact> | ||
<artifact> | ||
<file>build/libs/application-plugin-${project.version}-sources.jar</file> | ||
<type>jar</type> | ||
<classifier>sources</classifier> | ||
</artifact> | ||
</artifacts> | ||
<skipAttach>${skip.gradle.build}</skipAttach> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
|
||
</project> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -1,79 +1,59 @@ | ||
plugins { | ||
id 'com.gradle.plugin-publish' version '0.15.0' | ||
id 'java-gradle-plugin' | ||
} | ||
if (JavaVersion.current().isJava9Compatible()) { | ||
compileJava.options.compilerArgs.addAll(['--release', '11']) | ||
} | ||
compileJava { | ||
options.encoding = 'UTF-8' | ||
sourceCompatibility = '11' | ||
targetCompatibility = '11' | ||
id 'com.gradle.plugin-publish' version '0.15.0' apply false | ||
} | ||
|
||
compileTestJava { | ||
options.encoding = 'UTF-8' | ||
} | ||
subprojects { | ||
apply plugin: 'java-gradle-plugin' | ||
apply plugin: 'com.gradle.plugin-publish' | ||
|
||
repositories { | ||
// in case a custom local repo is configured we are going to use that instead of the default mavenLocal() | ||
if (System.properties.containsKey('maven.repo.local')) { | ||
maven { | ||
url System.properties.get('maven.repo.local') | ||
} | ||
} else { | ||
mavenLocal() | ||
if (JavaVersion.current().isJava9Compatible()) { | ||
compileJava.options.compilerArgs.addAll(['--release', '11']) | ||
} | ||
compileJava { | ||
options.encoding = 'UTF-8' | ||
sourceCompatibility = '11' | ||
targetCompatibility = '11' | ||
} | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
api gradleApi() | ||
|
||
implementation "io.quarkus:quarkus-bootstrap-core:${version}" | ||
implementation "io.quarkus:quarkus-devtools-common:${version}" | ||
implementation "io.quarkus:quarkus-core-deployment:${version}" | ||
|
||
testImplementation "io.quarkus:quarkus-project-core-extension-codestarts:${version}" | ||
testImplementation 'org.assertj:assertj-core:3.20.2' | ||
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.2' | ||
testImplementation "io.quarkus:quarkus-devmode-test-utils:${version}" | ||
testImplementation "io.quarkus:quarkus-devtools-testing:${version}" | ||
testImplementation gradleTestKit() | ||
} | ||
|
||
test { | ||
// propagate the custom local maven repo, in case it's configured | ||
if (System.properties.containsKey('maven.repo.local')) { | ||
systemProperty 'maven.repo.local', System.properties.get('maven.repo.local') | ||
compileTestJava { | ||
options.encoding = 'UTF-8' | ||
} | ||
testLogging { | ||
events "passed", "skipped", "failed" | ||
|
||
repositories { | ||
// in case a custom local repo is configured we are going to use that instead of the default mavenLocal() | ||
if (System.properties.containsKey('maven.repo.local')) { | ||
maven { | ||
url System.properties.get('maven.repo.local') | ||
} | ||
} else { | ||
mavenLocal() | ||
} | ||
mavenCentral() | ||
} | ||
useJUnitPlatform() | ||
} | ||
|
||
javadoc { | ||
options.addStringOption('encoding', 'UTF-8') | ||
} | ||
test { | ||
// propagate the custom local maven repo, in case it's configured | ||
if (System.properties.containsKey('maven.repo.local')) { | ||
systemProperty 'maven.repo.local', System.properties.get('maven.repo.local') | ||
} | ||
testLogging { | ||
events "passed", "skipped", "failed" | ||
} | ||
useJUnitPlatform() | ||
} | ||
|
||
pluginBundle { | ||
website = 'https://quarkus.io/' | ||
vcsUrl = 'https://github.com/quarkusio/quarkus' | ||
tags = ['quarkus', 'quarkusio', 'graalvm'] | ||
} | ||
javadoc { | ||
options.addStringOption('encoding', 'UTF-8') | ||
} | ||
|
||
gradlePlugin { | ||
plugins { | ||
quarkusPlugin { | ||
id = 'io.quarkus' | ||
implementationClass = 'io.quarkus.gradle.QuarkusPlugin' | ||
displayName = 'Quarkus Plugin' | ||
description = 'Builds a Quarkus application, and provides helpers to launch dev-mode, the Quarkus CLI, building of native images' | ||
} | ||
pluginBundle { | ||
website = 'https://quarkus.io/' | ||
vcsUrl = 'https://github.com/quarkusio/quarkus' | ||
tags = ['quarkus', 'quarkusio', 'graalvm'] | ||
} | ||
} | ||
|
||
wrapper { | ||
distributionType = Wrapper.DistributionType.ALL | ||
} | ||
|
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 @@ | ||
dependencies { | ||
api gradleApi() | ||
|
||
implementation "io.quarkus:quarkus-bootstrap-core:${version}" | ||
implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}" | ||
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${jacksonVersion}" | ||
|
||
testImplementation gradleTestKit() | ||
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.2' | ||
testImplementation 'org.assertj:assertj-core:3.20.2' | ||
} | ||
|
||
group = "io.quarkus.extension" | ||
|
||
gradlePlugin { | ||
plugins { | ||
quarkusBootstrapPlugin { | ||
id = 'io.quarkus.extension' | ||
implementationClass = 'io.quarkus.extension.gradle.QuarkusExtensionPlugin' | ||
displayName = 'Quarkus Extension Plugin' | ||
description = 'Builds a Quarkus extension' | ||
} | ||
} | ||
} |
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 @@ | ||
jacksonVersion = 2.12.4 |
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,63 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>io.quarkus.gradle.plugin.parent</artifactId> | ||
<version>999-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>io.quarkus.extension</groupId> | ||
<artifactId>io.quarkus.extension.gradle.plugin</artifactId> | ||
<packaging>pom</packaging> | ||
<name>Quarkus - Extension Gradle Plugin</name> | ||
<description>Quarkus - Extension Gradle Plugin</description> | ||
|
||
<dependencies> | ||
<!-- Compile --> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-bootstrap-core</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>attach-artifacts</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>attach-artifact</goal> | ||
</goals> | ||
<configuration> | ||
<artifacts> | ||
<artifact> | ||
<file>build/libs/extension-plugin-${project.version}.jar</file> | ||
<type>jar</type> | ||
</artifact> | ||
<artifact> | ||
<file>build/libs/extension-plugin-${project.version}-javadoc.jar</file> | ||
<type>jar</type> | ||
<classifier>javadoc</classifier> | ||
</artifact> | ||
<artifact> | ||
<file>build/libs/extension-plugin-${project.version}-sources.jar</file> | ||
<type>jar</type> | ||
<classifier>sources</classifier> | ||
</artifact> | ||
</artifacts> | ||
<skipAttach>${skip.gradle.build}</skipAttach> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
32 changes: 32 additions & 0 deletions
32
...le/extension-plugin/src/main/java/io/quarkus/extension/gradle/QuarkusExtensionPlugin.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,32 @@ | ||
package io.quarkus.extension.gradle; | ||
|
||
import org.gradle.api.Plugin; | ||
import org.gradle.api.Project; | ||
import org.gradle.api.Task; | ||
import org.gradle.api.plugins.JavaPlugin; | ||
import org.gradle.api.tasks.TaskContainer; | ||
|
||
import io.quarkus.extension.gradle.tasks.ExtensionDescriptorTask; | ||
|
||
public class QuarkusExtensionPlugin implements Plugin<Project> { | ||
|
||
public static final String EXTENSION_DESCRIPTOR_TASK_NAME = "extensionDescriptor"; | ||
|
||
@Override | ||
public void apply(Project project) { | ||
registerTasks(project); | ||
} | ||
|
||
private void registerTasks(Project project) { | ||
TaskContainer tasks = project.getTasks(); | ||
ExtensionDescriptorTask extensionDescriptorTask = tasks.create(EXTENSION_DESCRIPTOR_TASK_NAME, | ||
ExtensionDescriptorTask.class); | ||
|
||
project.getPlugins().withType( | ||
JavaPlugin.class, | ||
javaPlugin -> { | ||
Task jarTask = tasks.getByName(JavaPlugin.JAR_TASK_NAME); | ||
jarTask.dependsOn(extensionDescriptorTask); | ||
}); | ||
} | ||
} |
Oops, something went wrong.