Update Working With Gradle authored by Derek Williams's avatar Derek Williams
This project is configured to use Gradle as it's build system, but it's set up differently than most projects that use it.
---
Due to the FreshmanRPG consisting of a multi-project environment, we had to modify the way that Gradle handles it. Since gradle doesn't have the best concept of project inheritance (Subproject B wants to see all of the dependencies in Subproject C), a system was devised to dynamically add dependencies to **all** projects at once.
## Explaining Dependencies
These dependencies are listed in a file titled `dependencies.gradle` in the `FreshmanRPG` directory. This file is separated into two sections:
1. Normal Dependencies
1. denoted by `normDependencies`
2. Accessible by both source and test code
3. Preferred location for utilities
2. Test Dependencies
1. denoted by `testDependencies`
2. Accessible only by test code
3. Preferred location for test utilities (junit, mockito, equalsverifier)
## Adding New Dependencies
To introduce a new dependency to this file, the dependency must be:
1. required by or useful to more than one subproject,
2. widely used, reputable and stable,
3. justified to and approved by the project lead
If these conditions are met, the following example can be modified and used in the proper section:
```plaintext
commons_lang: 'org.apache.commons:commons-lang3:3.12.0'
```
The [Maven Repository Search Engine](https://mvnrepository.com/) can be used to find your dependency. It also provides you with the necessary Gradle dependency for use in the file.
---
If a new dependency is only required by a single subproject, you can just add it to the `dependencies` section of the respective `build.gradle` file.
\ No newline at end of file