diff --git a/gradle-plugin-build-logic/build.gradle b/gradle-plugin-build-logic/build.gradle index 55c1f3816..e7ed9f730 100644 --- a/gradle-plugin-build-logic/build.gradle +++ b/gradle-plugin-build-logic/build.gradle @@ -7,3 +7,15 @@ java { languageVersion.set(JavaLanguageVersion.of(11)) } } + +// The :gradle-plugin project needs the `GROUP` and `VERSION_NAME` values +// from the main build's `gradle.properties`. We can't just use a symlink because Windows exists. +// https://github.com/square/anvil/pull/763#discussion_r1379563691 +Properties mainBuildProperties = new Properties().tap { props -> + file("../gradle.properties").withInputStream { stream -> + props.load(stream) + } +} +mainBuildProperties.each { key, value -> + ext[key.toString()] = value +} diff --git a/gradle-plugin-build-logic/gradle.properties b/gradle-plugin-build-logic/gradle.properties deleted file mode 120000 index 7677fb73b..000000000 --- a/gradle-plugin-build-logic/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -../gradle.properties \ No newline at end of file