From 66eb9f7f3d7f12bf300db9dfd4dd80bb491547cb Mon Sep 17 00:00:00 2001 From: Dawid Weiss Date: Mon, 31 Aug 2020 15:09:26 +0200 Subject: [PATCH] LUCENE-9438: moved eclipse template files under corresponding gradle's script. --- gradle/defaults.gradle | 6 ++++++ gradle/ide/eclipse.gradle | 4 +++- {dev-tools => gradle/ide}/eclipse/dot.classpath.xsl | 0 {dev-tools => gradle/ide}/eclipse/dot.project | 0 .../eclipse/dot.settings/org.eclipse.core.resources.prefs | 0 .../ide}/eclipse/dot.settings/org.eclipse.jdt.core.prefs | 0 .../ide}/eclipse/dot.settings/org.eclipse.jdt.ui.prefs | 0 {dev-tools => gradle/ide}/eclipse/run-solr-cloud.launch | 0 {dev-tools => gradle/ide}/eclipse/run-solr.launch | 0 {dev-tools => gradle/ide}/eclipse/run-test-cases.launch | 0 10 files changed, 9 insertions(+), 1 deletion(-) rename {dev-tools => gradle/ide}/eclipse/dot.classpath.xsl (100%) rename {dev-tools => gradle/ide}/eclipse/dot.project (100%) rename {dev-tools => gradle/ide}/eclipse/dot.settings/org.eclipse.core.resources.prefs (100%) rename {dev-tools => gradle/ide}/eclipse/dot.settings/org.eclipse.jdt.core.prefs (100%) rename {dev-tools => gradle/ide}/eclipse/dot.settings/org.eclipse.jdt.ui.prefs (100%) rename {dev-tools => gradle/ide}/eclipse/run-solr-cloud.launch (100%) rename {dev-tools => gradle/ide}/eclipse/run-solr.launch (100%) rename {dev-tools => gradle/ide}/eclipse/run-test-cases.launch (100%) diff --git a/gradle/defaults.gradle b/gradle/defaults.gradle index 5f118035ffd..a011add67b9 100644 --- a/gradle/defaults.gradle +++ b/gradle/defaults.gradle @@ -57,5 +57,11 @@ allprojects { propertyOrEnvOrDefault = { propName, envName, defValue -> return propertyOrDefault(propName, envOrDefault(envName, defValue)); } + + // Locate script-relative resource folder. This is context-sensitive so pass + // the right buildscript (top-level). + scriptResources = { buildscript -> + return file(buildscript.sourceFile.absolutePath.replaceAll('.gradle$', "")) + } } } diff --git a/gradle/ide/eclipse.gradle b/gradle/ide/eclipse.gradle index 3bebd1d8ad7..e414112697a 100644 --- a/gradle/ide/eclipse.gradle +++ b/gradle/ide/eclipse.gradle @@ -18,6 +18,8 @@ import org.gradle.plugins.ide.eclipse.model.SourceFolder import org.gradle.plugins.ide.eclipse.model.ClasspathEntry +def resources = scriptResources(buildscript) + configure(rootProject) { apply plugin: "eclipse" @@ -73,7 +75,7 @@ configure(rootProject) { eclipseJdt { doLast { project.sync { - from rootProject.file("dev-tools/eclipse/dot.settings") + from rootProject.file("${resources}/dot.settings") into rootProject.file(".settings") } } diff --git a/dev-tools/eclipse/dot.classpath.xsl b/gradle/ide/eclipse/dot.classpath.xsl similarity index 100% rename from dev-tools/eclipse/dot.classpath.xsl rename to gradle/ide/eclipse/dot.classpath.xsl diff --git a/dev-tools/eclipse/dot.project b/gradle/ide/eclipse/dot.project similarity index 100% rename from dev-tools/eclipse/dot.project rename to gradle/ide/eclipse/dot.project diff --git a/dev-tools/eclipse/dot.settings/org.eclipse.core.resources.prefs b/gradle/ide/eclipse/dot.settings/org.eclipse.core.resources.prefs similarity index 100% rename from dev-tools/eclipse/dot.settings/org.eclipse.core.resources.prefs rename to gradle/ide/eclipse/dot.settings/org.eclipse.core.resources.prefs diff --git a/dev-tools/eclipse/dot.settings/org.eclipse.jdt.core.prefs b/gradle/ide/eclipse/dot.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from dev-tools/eclipse/dot.settings/org.eclipse.jdt.core.prefs rename to gradle/ide/eclipse/dot.settings/org.eclipse.jdt.core.prefs diff --git a/dev-tools/eclipse/dot.settings/org.eclipse.jdt.ui.prefs b/gradle/ide/eclipse/dot.settings/org.eclipse.jdt.ui.prefs similarity index 100% rename from dev-tools/eclipse/dot.settings/org.eclipse.jdt.ui.prefs rename to gradle/ide/eclipse/dot.settings/org.eclipse.jdt.ui.prefs diff --git a/dev-tools/eclipse/run-solr-cloud.launch b/gradle/ide/eclipse/run-solr-cloud.launch similarity index 100% rename from dev-tools/eclipse/run-solr-cloud.launch rename to gradle/ide/eclipse/run-solr-cloud.launch diff --git a/dev-tools/eclipse/run-solr.launch b/gradle/ide/eclipse/run-solr.launch similarity index 100% rename from dev-tools/eclipse/run-solr.launch rename to gradle/ide/eclipse/run-solr.launch diff --git a/dev-tools/eclipse/run-test-cases.launch b/gradle/ide/eclipse/run-test-cases.launch similarity index 100% rename from dev-tools/eclipse/run-test-cases.launch rename to gradle/ide/eclipse/run-test-cases.launch