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
Changes from 1 commit
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
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.palantir.baseline.plugins.versions.BaselineVersions;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
Expand All @@ -33,6 +34,8 @@ public void apply(Project project) {
"com.palantir.baseline should be applied to the root project only, not '{}'",
project.getName());
}
Preconditions.checkState(!project.getName().equals(project.getProjectDir().getName()),
"Root project name must specified in settings.gradle");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is quite right, it will match locally in most cases

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to just ban the specific name "project" because this is what we hit with the Circle1 -> Circle2 conversion


rootProject.getPluginManager().apply(BaselineConfig.class);
rootProject.getPluginManager().apply(BaselineCircleCi.class);
Expand Down