Update Working With Gradle authored by Derek Williams's avatar Derek Williams
...@@ -6,16 +6,7 @@ Due to the FreshmanRPG consisting of a multi-project environment, we had to modi ...@@ -6,16 +6,7 @@ Due to the FreshmanRPG consisting of a multi-project environment, we had to modi
## Explaining Dependencies ## Explaining Dependencies
These dependencies are listed in a file titled `dependencies.gradle` in the `FreshmanRPG` directory. This file is separated into two sections: These dependencies are listed the `build.gradle` file in the `FreshmanRPG` directory. Inside of the `subprojects` closure, various `implementation` and `testImplementation` lines exist. These get applied to all subprojects.
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 ## Adding New Dependencies
...@@ -28,11 +19,11 @@ To introduce a new dependency to this file, the dependency must be: ...@@ -28,11 +19,11 @@ To introduce a new dependency to this file, the dependency must be:
If these conditions are met, the following example can be modified and used in the proper section: If these conditions are met, the following example can be modified and used in the proper section:
```plaintext ```plaintext
commons_lang: 'org.apache.commons:commons-lang3:3.12.0' implementation/testImplementation [dependencyLine]
``` ```
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. 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. 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. An example of these would be libgdx in the GameClient
\ No newline at end of file \ No newline at end of file