I have several defs in my main build.gradle file. Is it possible to move them into a separate file, and then just reference them?
Something like this (don't mind the syntax):
def foo = "foo"
def bar = "bar"
def baz = "baz"
Finally figured it out.
In foobar.gradle, set up the defs like this:
ext.foo = "foo" ext.bar = "bar" ext.baz = "baz"
Then in main.gradle, make sure to include this line:
apply from: 'foobar.gradle'
Now variables can be used as freely as if they are part of the main.gradle file.