You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To run tests even if there are no changes from the previous build, use the `--rerun-tasks` option:
96
96
```
97
-
./gradlew --rerun-tasks :game-app:game-core:test
97
+
./gradlew --rerun-tasks :game-core:test
98
98
```
99
99
100
100
## Run Formatting
@@ -137,7 +137,7 @@ save games from loading.
137
137
This can be caused by missing resource files, such as images or icons.
138
138
139
139
The Gradle task `run` for `game-headed` will download and unzip game assets into the `game-headed` project's directory `/build/assests`.
140
-
This directory will then be processed as a main resource, by the task `:game-app:game-headed:processResources`, in order to be packaged in the resulting project jar.
140
+
This directory will then be processed as a main resource, by the task `:game-headed:processResources`, in order to be packaged in the resulting project jar.
141
141
When the game starts, it expects to find the folder `assets` at the root of the classpath, so to load files use the class loader's method `getResourceAsStream()`.
142
142
Since this is a resource file packaged in the library jar produced by this project, the working dir should **not** influence how assets are loaded.
Copy file name to clipboardExpand all lines: docs/development/build-overview-and-development.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,12 @@ Gradle plugins used by the build are located in `/gradle/build-logic`.
6
6
The build uses the Gradle Kotlin DSL.
7
7
This make the build easier to maintain by increasing the completion and refactoring assistance the IDE is able to provide.
8
8
9
+
## Build Structure
10
+
11
+
By explicitly specifying the physical location of nested subprojects in the root `settings.gradle.kts` file, the build is able to avoid [unintentionally creating empty projects](https://docs.gradle.org/current/userguide/best_practices_structuring_builds.html#avoid_empty_projects).
12
+
These empty projects slow the build and make it more difficult to understand the project structure.
13
+
This allows you to reference projects using non-hierarchical names, for example `:game-core` instead of `:game-app:game-core`.
14
+
9
15
## Convention Plugins
10
16
11
17
The TripleA build defines Gradle [Convention Plugins](https://docs.gradle.org/current/userguide/implementing_gradle_plugins_convention.html#header) to avoid cross-project configuration and duplication of configuration.
@@ -18,10 +24,10 @@ It applies the `java-library` plugin and applies universal configuration, code c
18
24
19
25
## Test Fixtures
20
26
21
-
The `:game-app:game-core` project exposes [Test Fixtures](https://docs.gradle.org/current/userguide/java_testing.html#producing_and_using_test_fixtures_within_a_single_project) to share common testing code and resources between projects.
22
-
Other projects (like `:game-app:ai`) can access these fixtures to use during testing by adding a dependency like `testImplementation(testFixtures(project(":game-app:game-core")))`.
27
+
The `:game-core` project exposes [Test Fixtures](https://docs.gradle.org/current/userguide/java_testing.html#producing_and_using_test_fixtures_within_a_single_project) to share common testing code and resources between projects.
28
+
Other projects (like `:ai`) can access these fixtures to use during testing by adding a dependency like `testImplementation(testFixtures(project(":game-core")))`.
23
29
24
-
The fixture in `:game-app:game-core` includes map data present in `/game-app/game-core/src/testFixtures/resources`, that can be loaded by tests via the `TestMapGameDataLoader` class and the `TestMapGameData` enum.
30
+
The fixture in `:game-core` includes map data present in `/game-app/game-core/src/testFixtures/resources`, that can be loaded by tests via the `TestMapGameDataLoader` class and the `TestMapGameData` enum.
0 commit comments