diff --git a/changelog/@unreleased/pr-775.v2.yml b/changelog/@unreleased/pr-775.v2.yml new file mode 100644 index 000000000..99987b71a --- /dev/null +++ b/changelog/@unreleased/pr-775.v2.yml @@ -0,0 +1,6 @@ +type: improvement +improvement: + description: baseline-circleci now validates that the rootProject.name isn't the + CircleCI default (`project`) as can interfere with publishing. + links: + - https://github.com/palantir/gradle-baseline/pull/775 diff --git a/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineCircleCi.java b/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineCircleCi.java index 5a9cde063..0bb127bb1 100644 --- a/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineCircleCi.java +++ b/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineCircleCi.java @@ -16,6 +16,7 @@ package com.palantir.baseline.plugins; +import com.google.common.base.Preconditions; import com.google.common.base.Splitter; import com.palantir.configurationresolver.ConfigurationResolverPlugin; import com.palantir.gradle.junit.JunitReportsExtension; @@ -46,6 +47,11 @@ public void apply(Project project) { configurePluginsForReports(project); configurePluginsForArtifacts(project); + + Preconditions.checkState( + !project.getName().equals("project"), + "Please specify rootProject.name in your settings.gradle, otherwise CircleCI's" + + "checkout dir ('project') will be used instead."); } private void configurePluginsForArtifacts(Project project) {