-
Notifications
You must be signed in to change notification settings - Fork 271
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
Create a nom_build wrapper script #508
Conversation
nom_build is a wrapper around ./gradlew. It's purpose is to help us deal with properties. The main problem that it is trying to solve is that when properties are specified using -P, we don't get an error if the property we specify isn't correct. As a result, a user or a build agent can launch a build with unintended parameters. nom_build consolidates all of the properties that we define into a python script where the properties are translated to flags (actual gradlew flags are also proxied). It also generates the property file and warns the user if the current properties file is out of sync with the script and includes documentation on each of the properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 4 files reviewed, 2 unresolved discussions (waiting on @mindhog and @weiminyu)
config/nom_build.py, line 273 at r1 (raw file):
parser.add_argument('--generate-gradle-properties',
Does this command always regenerate the properties file? It could be annoying if, say, I alternate between maven central and gcs for mavenUrl.
config/nom_build_test.py, line 44 at r1 (raw file):
class MyTest(unittest.TestCase):
How is this test invoked? Do we need a Graadle plugin for Python?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 4 files reviewed, 2 unresolved discussions (waiting on @weiminyu)
config/nom_build.py, line 273 at r1 (raw file):
Previously, weiminyu (Weimin Yu) wrote…
parser.add_argument('--generate-gradle-properties',
Does this command always regenerate the properties file? It could be annoying if, say, I alternate between maven central and gcs for mavenUrl.
You need to add this flag explicitly to regenerate the properties file. If the file is different from what we expect, the tool will give a warning but will allow you to proceed.
config/nom_build_test.py, line 44 at r1 (raw file):
Previously, weiminyu (Weimin Yu) wrote…
How is this test invoked? Do we need a Graadle plugin for Python?
It is currently invoked by hand: python3 config/nom_build_test.py
but yes, we need a follow-up PR to add it to the test suite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 4 files at r1.
Reviewable status: 2 of 4 files reviewed, 1 unresolved discussion (waiting on @weiminyu)
nom_build is a wrapper around ./gradlew. It's purpose is to help us
deal with properties. The main problem that it is trying to solve is
that when properties are specified using -P, we don't get an error if
the property we specify isn't correct. As a result, a user or a build
agent can launch a build with unintended parameters.
nom_build consolidates all of the properties that we define into a
python script where the properties are translated to flags (actual
gradlew flags are also proxied). It also generates the property file
and warns the user if the current properties file is out of sync with
the script and includes documentation on each of the properties.
This change is