From f021b1dec4fbb0797a2b53f45db9b6401345549c Mon Sep 17 00:00:00 2001 From: Jake Wharton Date: Mon, 16 Oct 2023 22:33:01 -0400 Subject: [PATCH] Move Gradle plugin build directory when included This ensures we do not get stale build config used when publishing from the main build. --- redwood-gradle-plugin/build.gradle | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/redwood-gradle-plugin/build.gradle b/redwood-gradle-plugin/build.gradle index 4c81a2dc84..99428d5557 100644 --- a/redwood-gradle-plugin/build.gradle +++ b/redwood-gradle-plugin/build.gradle @@ -14,6 +14,10 @@ if (rootProject.name == 'redwood') { redwoodBuild { publishing() } +} else { + // Move the build directory when included in build-support so as to not poison the real build. + // If we don't there's a chance incorrect build config values (configured below) will be used. + layout.buildDirectory = new File(rootDir, "build/redwood-gradle-plugin") } tasks.withType(JavaCompile).configureEach {