mirror of
https://github.com/jlengrand/quarkus.git
synced 2026-03-10 08:41:22 +00:00
Updated Gradle templates to match plugins DSL
This commit is contained in:
@@ -36,7 +36,6 @@ import org.gradle.api.artifacts.Configuration;
|
||||
import org.gradle.api.artifacts.Dependency;
|
||||
import org.gradle.api.artifacts.DependencySet;
|
||||
import org.gradle.api.artifacts.ProjectDependency;
|
||||
import org.gradle.api.artifacts.ResolvedDependency;
|
||||
import org.gradle.api.plugins.Convention;
|
||||
import org.gradle.api.plugins.JavaPlugin;
|
||||
import org.gradle.api.plugins.JavaPluginConvention;
|
||||
@@ -249,11 +248,6 @@ public class QuarkusDev extends QuarkusTask {
|
||||
wiringClassesDirectory.mkdirs();
|
||||
addToClassPaths(classPathManifest, context, wiringClassesDirectory);
|
||||
|
||||
//we also want to add the maven plugin jar to the class path
|
||||
//this allows us to just directly use classes, without messing around copying them
|
||||
//to the runner jar
|
||||
addGradlePluginDeps(classPathManifest, context);
|
||||
|
||||
//now we need to build a temporary jar to actually run
|
||||
|
||||
File tempFile = new File(getBuildDir(), extension.finalName() + "-dev.jar");
|
||||
@@ -394,18 +388,6 @@ public class QuarkusDev extends QuarkusTask {
|
||||
}
|
||||
}
|
||||
|
||||
private void addGradlePluginDeps(StringBuilder classPathManifest, DevModeContext context) {
|
||||
Configuration conf = getProject().getBuildscript().getConfigurations().getByName("classpath");
|
||||
ResolvedDependency quarkusDep = conf.getResolvedConfiguration().getFirstLevelModuleDependencies().stream()
|
||||
.filter(rd -> "quarkus-gradle-plugin".equals(rd.getModuleName()))
|
||||
.findFirst()
|
||||
.orElseThrow(() -> new IllegalStateException("Unable to find quarkus-gradle-plugin dependency"));
|
||||
|
||||
quarkusDep.getAllModuleArtifacts().stream()
|
||||
.map(ra -> ra.getFile())
|
||||
.forEach(f -> addToClassPaths(classPathManifest, context, f));
|
||||
}
|
||||
|
||||
private void addToClassPaths(StringBuilder classPathManifest, DevModeContext context, File file) {
|
||||
if (filesIncludedInClasspath.add(file)) {
|
||||
getProject().getLogger().info("Adding dependency {}", file);
|
||||
|
||||
@@ -1,20 +1,8 @@
|
||||
// this block is necessary to make enforcedPlatform work for Quarkus plugin available
|
||||
// only locally (snapshot) that is also importing the Quarkus BOM
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
}
|
||||
dependencies {
|
||||
classpath "io.quarkus:quarkus-gradle-plugin:${quarkusPluginVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'io.quarkus'
|
||||
}
|
||||
|
||||
apply plugin: 'io.quarkus'
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
@@ -26,9 +14,6 @@ dependencies {
|
||||
|
||||
testImplementation 'io.quarkus:quarkus-junit5'
|
||||
testImplementation 'io.rest-assured:rest-assured'
|
||||
|
||||
nativeTestImplementation 'io.quarkus:quarkus-junit5'
|
||||
nativeTestImplementation 'io.rest-assured:rest-assured'
|
||||
}
|
||||
|
||||
group '${project_groupId}'
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.id == 'io.quarkus') {
|
||||
useModule("io.quarkus:quarkus-gradle-plugin:${quarkus_version}")
|
||||
}
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
id 'io.quarkus' version "${quarkusPluginVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name='${project_artifactId}'
|
||||
|
||||
@@ -1,21 +1,9 @@
|
||||
// this block is necessary to make enforcedPlatform work for Quarkus plugin available
|
||||
// only locally (snapshot) that is also importing the Quarkus BOM
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
}
|
||||
dependencies {
|
||||
classpath "io.quarkus:quarkus-gradle-plugin:${quarkusPluginVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.jvm' version "${kotlin_version}"
|
||||
id "org.jetbrains.kotlin.plugin.allopen" version "${kotlin_version}"
|
||||
id 'io.quarkus'
|
||||
}
|
||||
|
||||
apply plugin: 'io.quarkus'
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
@@ -28,9 +16,6 @@ dependencies {
|
||||
|
||||
testImplementation 'io.quarkus:quarkus-junit5'
|
||||
testImplementation 'io.rest-assured:rest-assured'
|
||||
|
||||
nativeTestImplementation 'io.quarkus:quarkus-junit5'
|
||||
nativeTestImplementation 'io.rest-assured:rest-assured'
|
||||
}
|
||||
|
||||
group '${project_groupId}'
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.id == 'io.quarkus') {
|
||||
useModule("io.quarkus:quarkus-gradle-plugin:${quarkus_version}")
|
||||
}
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
id 'io.quarkus' version "${quarkusPluginVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name='${project_artifactId}'
|
||||
|
||||
@@ -1,20 +1,8 @@
|
||||
// this block is necessary to make enforcedPlatform work for Quarkus plugin available
|
||||
// only locally (snapshot) that is also importing the Quarkus BOM
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
}
|
||||
dependencies {
|
||||
classpath "io.quarkus:quarkus-gradle-plugin:${quarkusPluginVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'scala'
|
||||
id 'io.quarkus'
|
||||
}
|
||||
|
||||
apply plugin: 'io.quarkus'
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
@@ -26,9 +14,6 @@ dependencies {
|
||||
|
||||
testImplementation 'io.quarkus:quarkus-junit5'
|
||||
testImplementation 'io.rest-assured:rest-assured'
|
||||
|
||||
nativeTestImplementation 'io.quarkus:quarkus-junit5'
|
||||
nativeTestImplementation 'io.rest-assured:rest-assured'
|
||||
}
|
||||
|
||||
group '${project_groupId}'
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.id == 'io.quarkus') {
|
||||
useModule("io.quarkus:quarkus-gradle-plugin:${quarkus_version}")
|
||||
}
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
id 'io.quarkus' version "${quarkusPluginVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name='${project_artifactId}'
|
||||
|
||||
Reference in New Issue
Block a user