Skip to content

Commit

Permalink
Use metadata for gradle/maven repositories and separate gradle plugin…
Browse files Browse the repository at this point in the history
… version

As part of #11256
  • Loading branch information
ia3andy committed Aug 18, 2020
1 parent 0c4ac13 commit 9f352cc
Show file tree
Hide file tree
Showing 68 changed files with 619 additions and 292 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ kotlin-version=${kotlin.version}
scala-version=${scala.version}
scala-plugin-version=${scala-plugin.version}

# Plugin metadata
plugin-groupId=${project.groupId}
plugin-artifactId=quarkus-maven-plugin
plugin-version=${project.version}
quarkus-core-version=${project.version}

# Maven plugin metadata
maven-plugin-groupId=${project.groupId}
maven-plugin-artifactId=quarkus-maven-plugin
maven-plugin-version=${project.version}

# Gradle plugin metadata
gradle-plugin-id=io.quarkus
gradle-plugin-version=${project.version}

supported-maven-versions=${supported-maven-versions}
# the proposed version must be in the range of the supported versions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ plugins {
repositories {
mavenLocal()
mavenCentral()
{#if gradle.repositories}
{#for rep in gradle.repositories}
maven { url = uri("{rep.url}") }
{/for}
{/if}
}
{/}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Gradle properties
#Tue Jun 16 08:41:21 UTC 2020
quarkusPluginVersion={quarkus.plugin.version}
quarkusPluginId={quarkus.gradle-plugin.id}
quarkusPluginVersion={quarkus.gradle-plugin.version}
quarkusPlatformGroupId={quarkus.platform.group-id}
quarkusPlatformArtifactId={quarkus.platform.artifact-id}
quarkusPlatformVersion={quarkus.platform.version}
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
pluginManagement {
val quarkusPluginVersion: String by settings
val quarkusPluginId: String by settings
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
{#if gradle.plugin-repositories}
{#for rep in gradle.plugin-repositories}
maven { url = uri("{rep.url}") }
{/for}
{/if}
}
plugins {
id("io.quarkus") version quarkusPluginVersion
id(quarkusPluginId) version quarkusPluginVersion
}
}
rootProject.name="{project.artifact-id}"
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ language:
base:
data:
quarkus:
plugin:
gradle-plugin:
id: io.quarkus
gradle:
version: 6.5.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{#plugins}
plugins {
java
id("{quarkus.plugin.id}")
id("{quarkus.gradle-plugin.id}")
}
{/plugins}
{/include}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
plugins {
kotlin("jvm") version "{kotlin.version}"
kotlin("plugin.allopen") version "{kotlin.version}"
id("{quarkus.plugin.id}")
id("{quarkus.gradle-plugin.id}")
}
{/plugins}
{/include}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{#plugins}
plugins {
scala
id("{quarkus.plugin.id}")
id("{quarkus.gradle-plugin.id}")
}
{/plugins}
{/plugins}
{/include}

tasks.withType<ScalaCompile> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{#insert plugins}
plugins {
id '{quarkus.plugin.id}'
id '{quarkus.gradle-plugin.id}'
}
{/}

{#insert repositories}
repositories {
mavenLocal()
mavenCentral()
{#if gradle.repositories}
{#for rep in gradle.repositories}
maven { url "{rep.url}" }
{/for}
{/if}
}
{/}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Gradle properties
#Tue Jun 16 08:41:21 UTC 2020
quarkusPluginVersion={quarkus.plugin.version}
quarkusPluginId={quarkus.gradle-plugin.id}
quarkusPluginVersion={quarkus.gradle-plugin.version}
quarkusPlatformGroupId={quarkus.platform.group-id}
quarkusPlatformArtifactId={quarkus.platform.artifact-id}
quarkusPlatformVersion={quarkus.platform.version}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ pluginManagement {
mavenLocal()
mavenCentral()
gradlePluginPortal()
{#if gradle.plugin-repositories}
{#for rep in gradle.plugin-repositories}
maven { url "{rep.url}" }
{/for}
{/if}
}
plugins {
id '{quarkus.plugin.id}' version "$\{quarkusPluginVersion}"
id "$\{quarkusPluginId}" version "$\{quarkusPluginVersion}"
}
}
rootProject.name='{project.artifact-id}'
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ language:
base:
data:
quarkus:
plugin:
gradle-plugin:
id: io.quarkus
gradle:
version: 6.5.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{#plugins}
plugins {
id 'java'
id '{quarkus.plugin.id}'
id '{quarkus.gradle-plugin.id}'
}
{/plugins}
{/include}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
plugins {
id 'org.jetbrains.kotlin.jvm' version "{kotlin.version}"
id "org.jetbrains.kotlin.plugin.allopen" version "{kotlin.version}"
id '{quarkus.plugin.id}'
id '{quarkus.gradle-plugin.id}'
}
{/plugins}
{/include}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{#plugins}
plugins {
id 'scala'
id '{quarkus.plugin.id}'
id '{quarkus.gradle-plugin.id}'
}
{/plugins}
{/plugins}
{/include}

compileScala {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<quarkus.platform.group-id>{quarkus.platform.group-id}</quarkus.platform.group-id>
<quarkus.platform.artifact-id>{quarkus.platform.artifact-id}</quarkus.platform.artifact-id>
<quarkus.platform.version>{quarkus.platform.version}</quarkus.platform.version>
<quarkus-plugin.version>{quarkus.plugin.version}</quarkus-plugin.version>
<quarkus-plugin.version>{quarkus.maven-plugin.version}</quarkus-plugin.version>
<compiler-plugin.version>{maven-compiler-plugin.version}</compiler-plugin.version>
<surefire-plugin.version>{maven-surefire-plugin.version}</surefire-plugin.version>
</properties>
Expand All @@ -31,6 +31,39 @@
</dependency>
</dependencies>
</dependencyManagement>
{#if maven.repositories}

<repositories>
{#for rep in maven.repositories}
<repository>
<id>{rep.id}</id>
<url>{rep.url}</url>
<releases>
<enabled>{rep.releases-enabled ?: true}</enabled>
</releases>
<snapshots>
<enabled>{rep.snapshots-enabled ?: true}</enabled>
</snapshots>
</repository>
{/for}
</repositories>
{/if}
{#if maven.plugin-repositories}
<pluginRepositories>
{#for rep in maven.plugin-repositories}
<pluginRepository>
<id>{rep.id}</id>
<url>{rep.url}</url>
<releases>
<enabled>{rep.releases-enabled ?: true}</enabled>
</releases>
<snapshots>
<enabled>{rep.snapshots-enabled ?: true}</enabled>
</snapshots>
</pluginRepository>
{/for}
</pluginRepositories>
{/if}

<dependencies>
{#each dependencies}
Expand Down Expand Up @@ -65,8 +98,8 @@
<plugins>
<!-- Quarkus build plugin - also provides the quarkus:dev live-reload feature -->
<plugin>
<groupId>{quarkus.plugin.group-id}</groupId>
<artifactId>{quarkus.plugin.artifact-id}</artifactId>
<groupId>{quarkus.maven-plugin.group-id}</groupId>
<artifactId>{quarkus.maven-plugin.artifact-id}</artifactId>
<version>$\{quarkus-plugin.version}</version>
{#if uberjar}
<configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/{project.artifact-id}-jvm
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.1
FROM {dockerfile.fast-jar.from}

ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
ARG JAVA_PACKAGE={dockerfile.fast-jar.java-package}
ARG RUN_JAVA_VERSION={dockerfile.fast-jar.run-java-version}

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/{project.artifact-id}-jvm
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.1
FROM {dockerfile.jvm.from}

ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
ARG JAVA_PACKAGE={dockerfile.jvm.java-package}
ARG RUN_JAVA_VERSION={dockerfile.jvm.run-java-version}

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# docker run -i --rm -p 8080:8080 quarkus/{project.artifact-id}
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.1
FROM {dockerfile.native.from}
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,17 @@
name: dockerfiles
type: tooling
preselected: true
language:
base:
data:
dockerfile:
jvm:
from: registry.access.redhat.com/ubi8/ubi-minimal:8.1
java-package: java-11-openjdk-headless
run-java-version: 1.3.8
fast-jar:
from: registry.access.redhat.com/ubi8/ubi-minimal:8.1
java-package: java-11-openjdk-headless
run-java-version: 1.3.8
native:
from: registry.access.redhat.com/ubi8/ubi-minimal:8.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
quarkusPlatformGroupId = ${bom_groupId}
quarkusPlatformArtifactId = ${bom_artifactId}
quarkusPlatformVersion = ${bom_version}
quarkusPluginVersion = ${plugin_version}
quarkusPluginVersion = ${gradle_plugin_version}
org.gradle.logging.level=INFO
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<quarkus.platform.artifact-id>${bom_artifactId}</quarkus.platform.artifact-id>
<quarkus.platform.group-id>${bom_groupId}</quarkus.platform.group-id>
<quarkus.platform.version>${bom_version}</quarkus.platform.version>
<quarkus-plugin.version>${plugin_version}</quarkus-plugin.version>
<quarkus-plugin.version>${maven_plugin_version}</quarkus-plugin.version>
<compiler-plugin.version>${compiler_plugin_version}</compiler-plugin.version>
<surefire-plugin.version>${surefire_plugin_version}</surefire-plugin.version>
</properties>
Expand Down Expand Up @@ -55,8 +55,8 @@
<plugins>
<!-- Quarkus build plugin - also provides the quarkus:dev live-reload feature -->
<plugin>
<groupId>${plugin_groupId}</groupId>
<artifactId>${plugin_artifactId}</artifactId>
<groupId>${maven_plugin_groupId}</groupId>
<artifactId>${maven_plugin_artifactId}</artifactId>
<version>${quarkus-plugin.version}</version>
<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pluginManagement {
repositories {
mavenLocal()${maven_plugin_repositories}
mavenLocal()
mavenCentral()
gradlePluginPortal()
gradlePluginPortal()${maven_plugin_repositories}
}
plugins {
id 'io.quarkus' version "${quarkusPluginVersion}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
quarkusPlatformGroupId = ${bom_groupId}
quarkusPlatformArtifactId = ${bom_artifactId}
quarkusPlatformVersion = ${bom_version}
quarkusPluginVersion = ${plugin_version}
quarkusPluginVersion = ${gradle_plugin_version}
org.gradle.logging.level=INFO
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<quarkus.platform.artifact-id>${bom_artifactId}</quarkus.platform.artifact-id>
<quarkus.platform.group-id>${bom_groupId}</quarkus.platform.group-id>
<quarkus.platform.version>${bom_version}</quarkus.platform.version>
<quarkus-plugin.version>${plugin_version}</quarkus-plugin.version>
<quarkus-plugin.version>${maven_plugin_version}</quarkus-plugin.version>
<compiler-plugin.version>${compiler_plugin_version}</compiler-plugin.version>
<surefire-plugin.version>${surefire_plugin_version}</surefire-plugin.version>
<kotlin.version>${kotlin_version}</kotlin.version>
Expand Down Expand Up @@ -62,8 +62,8 @@
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
<plugins>
<plugin>
<groupId>${plugin_groupId}</groupId>
<artifactId>${plugin_artifactId}</artifactId>
<groupId>${maven_plugin_groupId}</groupId>
<artifactId>${maven_plugin_artifactId}</artifactId>
<version>${quarkus-plugin.version}</version>
<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pluginManagement {
repositories {
mavenLocal()${maven_plugin_repositories}
mavenLocal()
mavenCentral()
gradlePluginPortal()
gradlePluginPortal()${maven_plugin_repositories}
}
plugins {
id 'io.quarkus' version "${quarkusPluginVersion}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
quarkusPlatformGroupId = ${bom_groupId}
quarkusPlatformArtifactId = ${bom_artifactId}
quarkusPlatformVersion = ${bom_version}
quarkusPluginVersion = ${plugin_version}
quarkusPluginVersion = ${gradle_plugin_version}
org.gradle.logging.level=INFO
Loading

0 comments on commit 9f352cc

Please sign in to comment.