Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

baseline-circleci: Ensures root project name is specified #775

Merged
merged 5 commits into from
Sep 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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