-
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.
Merge pull request #32668 from grossws/gradle-plugins-update-build
Update Gradle plugins build
- Loading branch information
Showing
37 changed files
with
604 additions
and
433 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,10 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
dependencies { | ||
implementation(plugin("com.gradle.plugin-publish", "1.2.0")) | ||
} | ||
|
||
fun DependencyHandler.plugin(id: String, version: String) = | ||
create("$id:$id.gradle.plugin:$version") |
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,13 @@ | ||
@Suppress("UnstableApiUsage") | ||
dependencyResolutionManagement { | ||
repositories { | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
|
||
versionCatalogs { | ||
create("libs") { | ||
from(files("../gradle/libs.versions.toml")) | ||
} | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
devtools/gradle/build-logic/src/main/kotlin/io.quarkus.devtools.gradle-plugin.gradle.kts
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,16 @@ | ||
plugins { | ||
id("io.quarkus.devtools.java-library") | ||
id("com.gradle.plugin-publish") | ||
id("maven-publish") | ||
} | ||
|
||
dependencies { | ||
val libs = project.the<VersionCatalogsExtension>().named("libs") | ||
implementation(project(":gradle-model")) | ||
implementation(libs.getLibrary("quarkus-devtools-common")) | ||
} | ||
|
||
gradlePlugin { | ||
website.set("https://quarkus.io/") | ||
vcsUrl.set("https://github.com/quarkusio/quarkus") | ||
} |
45 changes: 45 additions & 0 deletions
45
devtools/gradle/build-logic/src/main/kotlin/io.quarkus.devtools.java-library.gradle.kts
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,45 @@ | ||
plugins { | ||
id("java-library") | ||
id("maven-publish") | ||
} | ||
|
||
dependencies { | ||
api(gradleApi()) | ||
|
||
val libs = project.the<VersionCatalogsExtension>().named("libs") | ||
implementation(platform("io.quarkus:quarkus-bom:$version")) | ||
|
||
implementation(libs.getLibrary("quarkus-bootstrap-core")) | ||
implementation(libs.getLibrary("quarkus-bootstrap-gradle-resolver")) | ||
implementation(libs.getLibrary("quarkus-core-deployment")) | ||
|
||
testImplementation(platform("io.quarkus:quarkus-bom:$version")) | ||
testImplementation(platform(libs.getLibrary("junit-bom"))) | ||
testImplementation(gradleTestKit()) | ||
testImplementation(libs.getLibrary("junit-api")) | ||
testImplementation(libs.getLibrary("assertj")) | ||
|
||
testImplementation(libs.getLibrary("quarkus-devtools-testing")) | ||
} | ||
|
||
tasks.withType<JavaCompile>().configureEach { | ||
options.release.set(11) | ||
options.encoding = "UTF-8" | ||
} | ||
|
||
tasks.named<Javadoc>(JavaPlugin.JAVADOC_TASK_NAME) { | ||
options.encoding = "UTF-8" | ||
(options as? CoreJavadocOptions)?.addStringOption("Xdoclint:-reference", "-quiet") | ||
} | ||
|
||
tasks.named<Test>(JavaPlugin.TEST_TASK_NAME) { | ||
useJUnitPlatform() | ||
testLogging { | ||
events("passed", "skipped", "failed") | ||
} | ||
|
||
// propagate the custom local maven repo, in case it's configured | ||
if (System.getProperties().containsKey("maven.repo.local")) { | ||
systemProperty("maven.repo.local", System.getProperty("maven.repo.local")) | ||
} | ||
} |
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,4 @@ | ||
import org.gradle.api.artifacts.VersionCatalog | ||
|
||
fun VersionCatalog.getLibrary(alias: String) = | ||
findLibrary(alias).orElseThrow { IllegalArgumentException("library $alias not found in catalog $name") } |
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
tasks.wrapper { | ||
// not sure if it's still required: IntelliJ works fine with `-bin` distribution | ||
// after indexing Gradle API jars | ||
distributionType = Wrapper.DistributionType.ALL | ||
} |
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
devtools/gradle/gradle-application-plugin/build.gradle.kts
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,26 @@ | ||
plugins { | ||
id("io.quarkus.devtools.gradle-plugin") | ||
} | ||
|
||
dependencies { | ||
implementation(libs.smallrye.config.yaml) | ||
|
||
testImplementation(libs.quarkus.project.core.extension.codestarts) | ||
} | ||
|
||
group = "io.quarkus" | ||
|
||
gradlePlugin { | ||
plugins.create("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" | ||
tags.addAll("quarkus", "quarkusio", "graalvm") | ||
} | ||
} | ||
|
||
tasks.test { | ||
systemProperty("kotlin_version", libs.versions.kotlin.get()) | ||
} |
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
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
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.