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

Refactor environment -> project map out of build #300

Merged
merged 1 commit into from Oct 7, 2019

Conversation

@mindhog
Copy link
Member

commented Oct 7, 2019

Move the project mapping into its own file so that it can be more easily
overriden.


This change is Reviewable

Move the project mapping into its own file so that it can be more easily
overriden.
@googlebot googlebot added the cla: yes label Oct 7, 2019
def gcpProject = null

apply from: "${rootDir.path}/projects.gradle"

This comment has been minimized.

Copy link
@jianglai

jianglai Oct 7, 2019

Member

Sometimes I felt this kind of apply is quite invasive. We are just importing everything in the other file into this namespace, unqualified. Can we explicitly only import the projects?

Copy link
Member Author

left a comment

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @jianglai)


build.gradle, line 124 at r1 (raw file):

Previously, jianglai (Lai Jiang) wrote…

Sometimes I felt this kind of apply is quite invasive. We are just importing everything in the other file into this namespace, unqualified. Can we explicitly only import the projects?

From the gradle docs, I can't find a way to do that. I'm also not clear on how a plugin changes the environment of build.gradle, but I can say with some certainty that the definition of the "projects" variable doesn't get migrated into the project namespace automatically: we have to inject it by setting rootProject.ext.projects instead of just doing "def projects".

Copy link
Member

left a comment

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@mindhog mindhog merged commit 8ca8fff into google:master Oct 7, 2019
5 of 7 checks passed
5 of 7 checks passed
LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: Python No code changes detected
Details
LGTM analysis: Java No new or fixed alerts
Details
cla/google All necessary CLAs are signed
code-review/reviewable 2 files reviewed
Details
kokoro-foss Kokoro build finished
Details
kokoro-internal Kokoro build finished
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.