Using Gradle Configuration Files

Your generated application uses the Gradle build system. Gradle relies on a few files that are worth knowing:

  • The build.gradle files throughout the source code hierarchy of your application contain the Gradle configuration for the component defined in the corresponding directory.

  • The gradle/templates directory contains a few Gradle script files that define shared behavior, and that are used in the build.gradle files mentioned above.

  • The build.gradle file located in the root directory of your project defines global or general purpose configuration.

  • The settings.gradle file located in the same root directory defines the components where build.gradle files are expected, and a few flags that control the build process.

  • The gradle.properties file located in the same root directory defines a few global variables, such as the names or URLs of DecisionBrain repositories.

  • The .gradle/gradle.properties file located in your home directory defines additional variables that complement (actually override) the previous ones. This is where you will store your credentials, so that they are nor committed in a version control system with the project files.

All these files, with the exception of the last one, are generated by the Application Generator tool.

In addition, the file gradle-local.properties.sample, also generated in the root directory, can be copied as gradle-local.properties and edited to specify the Python interpreter to use locally. Its usage is described in the file itself.

As mentioned above, the gradle.properties file in the root directory of your project defines global variables for the names or URLs of DecisionBrain repositories. The following sections will review these variables and explain how to use them.