Skip to content

Commit

Permalink
baseline-circleci: Ensures root project name is specified (#775)
Browse files Browse the repository at this point in the history
Enforce that the root project name is specified
  • Loading branch information
ferozco authored and bulldozer-bot[bot] committed Sep 9, 2019
1 parent 4fe80e9 commit 31bc943
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions changelog/@unreleased/pr-775.v2.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 31bc943

Please sign in to comment.