From 81ced73e09092a81e55ccfefd312074a1d532bef Mon Sep 17 00:00:00 2001 From: Michael Vorburger Date: Mon, 8 Apr 2019 18:50:01 +0200 Subject: [PATCH] use 'plugins' instead of 'apply plugin' in gradle-it related to https://github.com/quarkusio/quarkus/issues/1623 just for consistency with the Quick Start and our doc on https://quarkus.io/guides/gradle-tooling and https://quarkus.io/guides/gradle-config.html FTR: This change does not actually fix the currently broken Gradle IT. --- devtools/gradle-it/build.gradle | 28 ++++------------------------ devtools/gradle-it/settings.gradle | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 24 deletions(-) create mode 100644 devtools/gradle-it/settings.gradle diff --git a/devtools/gradle-it/build.gradle b/devtools/gradle-it/build.gradle index 7d6177d9fff8b..5b7dbf21c7be1 100644 --- a/devtools/gradle-it/build.gradle +++ b/devtools/gradle-it/build.gradle @@ -1,31 +1,11 @@ -apply plugin: 'java' -apply plugin: 'io.quarkus' +plugins { + id 'java' + id 'io.quarkus' version '999-SNAPSHOT' +} compileJava.options.encoding = "UTF-8" compileTestJava.options.encoding = "UTF-8" -buildscript { - repositories { - maven { url '../gradle/target/dependencies/' } - mavenCentral() - } - dependencies { - classpath fileTree(dir: '../gradle/build/libs', include: 'quarkus-gradle-plugin-*.jar') - - classpath 'io.quarkus:quarkus-bootstrap-core:999-SNAPSHOT' - classpath 'io.quarkus:quarkus-devtools-common:999-SNAPSHOT' - classpath 'io.quarkus:quarkus-devtools-common-core:999-SNAPSHOT' - classpath 'io.quarkus:quarkus-development-mode:999-SNAPSHOT' - classpath 'io.quarkus:quarkus-creator:999-SNAPSHOT' - } -} - -repositories { - //Needs latest from local snapshots too: - mavenLocal() - mavenCentral() -} - test { useJUnitPlatform() } diff --git a/devtools/gradle-it/settings.gradle b/devtools/gradle-it/settings.gradle new file mode 100644 index 0000000000000..681b65d28e2b0 --- /dev/null +++ b/devtools/gradle-it/settings.gradle @@ -0,0 +1,15 @@ +pluginManagement { + repositories { + // TODO ideally this, like build.gradle, should just read from ../gradle instead of mavenLocal(), but it's not clear how + // classpath fileTree(dir: '../gradle/build/libs', include: 'quarkus-gradle-plugin-*.jar') + // classpath fileTree(dir: '../gradle/target/dependencies/compile', include: '*.jar') + mavenLocal() + } + resolutionStrategy { + eachPlugin { + if (requested.id.id == 'io.quarkus') { + useModule("io.quarkus:quarkus-gradle-plugin:${requested.version}") + } + } + } +}