Skip to content

Commit

Permalink
chore: adjust locations and names of Gradle plugins to latest changes
Browse files Browse the repository at this point in the history
Signed-off-by: Jendrik Johannes <[email protected]>
  • Loading branch information
jjohannes committed Jun 13, 2024
1 parent 113e8aa commit 58e3d23
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions hedera-node/docs/design/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ Java modules.
Each module needs a `build.gradle.kts` file that describes the module.

General best practices for all our (Java) modules are defined in custom plugins that can be found
under `build-logic/src/main/kotlin`. For a Java module the `com.hedera.hashgraph.javaConventions` plugin should be used.
under `gradle/plugins/src/main/kotlin`. For a Java module the `com.hedera.gradle.java` plugin should be used.
Next to this each module should have a description. Since nothing else is needed for a minimal module the most simple
`build.gradle.kts` looks like this:

```
plugins {
id("com.hedera.hashgraph.javaConventions")
id("com.hedera.gradle.java")
}
description = "A minimal module without any dependecies"
```

The `group`, `name` and `version` of the module should not be added here. The `group` is the same for all modules on the
repository (`com.hedera.hashgraph`) and its definition can be found in the `com.hedera.hashgraph.conventions` plugin.
The `group` and `version` of the module should not be added here. The `group` is the same for all modules on the
repository (`com.hedera.hashgraph`) and its definition can be found in the `com.hedera.gradle.conventions` plugin.
For the `version` we use a global definition, too. The current `version` is defined in the `gradle.properties` file in
the root folder of the project. The `name` of a module is simple created based on the folder name of the module.

Expand All @@ -45,14 +45,14 @@ specific path below the `src/main/resources/com/hedera/node/app/services/foo` fo

## Tests

All modules can have different types of tests. The `com.hedera.hashgraph.javaConventions` plugin provides direct support
All modules can have different types of tests. The `com.hedera.gradle.java` plugin provides direct support
for unit test, integration tests, and end-to-end tests. Next to this the test fixtures functionality of Gradle is
supported.

### Test fixtures

To create clean and readable unit tests it is best practice to provide common functionality for tests in the test
fixtures of a module. Based on the `com.hedera.hashgraph.javaConventions` plugin test fixtures are supported for all
fixtures of a module. Based on the `com.hedera.gradle.java` plugin test fixtures are supported for all
Java modules.

All Java sources for the test fixtures must be placed under `src/testFixtures/java`. Additional resources that should be
Expand Down
4 changes: 2 additions & 2 deletions hedera-node/docs/design/service-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Next to this the `build.gradle.kts` file should look like this:

```
plugins {
id("com.hedera.hashgraph.conventions")
id("com.hedera.gradle.services")
}
description = "Hedera Foo Service API"
Expand Down Expand Up @@ -130,7 +130,7 @@ Based on the given definitions and constrains a minimalistic `build.gradle.kts`

```
plugins {
id("com.hedera.hashgraph.conventions")
id("com.hedera.gradle.services")
}
description = "Default Hedera Foo Service Implementation"
Expand Down

0 comments on commit 58e3d23

Please sign in to comment.