From a56f529af1dbb0f3188a574a0bc44de97a403fb2 Mon Sep 17 00:00:00 2001 From: Sam Snyder Date: Fri, 26 Jan 2024 18:22:58 -0800 Subject: [PATCH] Don't have IDE.properties affect the Gradle build when not running in IDE. --- IDE.properties.tmp | 2 +- rewrite-bom/build.gradle.kts | 2 +- settings.gradle.kts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/IDE.properties.tmp b/IDE.properties.tmp index c48f158ce94..154b6a0af1d 100644 --- a/IDE.properties.tmp +++ b/IDE.properties.tmp @@ -43,4 +43,4 @@ rewrite-bom # Tools that are used less frequently to, for example, build new language parsers. -tools +#tools diff --git a/rewrite-bom/build.gradle.kts b/rewrite-bom/build.gradle.kts index 9aea2ce61b3..a1238b6b451 100644 --- a/rewrite-bom/build.gradle.kts +++ b/rewrite-bom/build.gradle.kts @@ -6,7 +6,7 @@ plugins { dependencies { constraints { - rootProject.subprojects.filter { it != project && !it.name.contains("benchmark") }.sortedBy { it.name }.forEach { + rootProject.subprojects.filter { it != project && !it.name.contains("benchmark") && it.name != "tools" }.sortedBy { it.name }.forEach { api(it) } } diff --git a/settings.gradle.kts b/settings.gradle.kts index 5a0d2028c85..5ae46344dd7 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -31,7 +31,7 @@ val allProjects = listOf( ) val includedProjects = file("IDE.properties").let { - if (it.exists()) { + if (it.exists() && (System.getProperty("idea.active") != null || System.getProperty("idea.sync.active") != null)) { val props = java.util.Properties() it.reader().use { reader -> props.load(reader)