---
title: Gradle tasks
description: The tasks Arciphant registers — projectDependencies and validatePackageStructure.
icon: list-checks
sidebar:
  label: Tasks
---

Arciphant registers two Gradle tasks.

## projectDependencies

Prints all project dependencies of each project in the whole project hierarchy — useful to verify that the dependencies
Arciphant wired are as expected. The task is only available in the root project:

```bash
./gradlew -q projectDependencies
```

```text
Project ':'
Project ':customers'
Project ':customers:application'
 |- [api] :customers:domain
Project ':customers:domain'
Project ':customers:web'
 |- [implementation] :customers:application
Project ':orders'
Project ':orders:application'
 |- [api] :orders:domain
...
```

Each line shows the configuration (e.g. `api`, `implementation`, `testFixturesApi`) and the target project of one
dependency.

:::note[Source set layout]
The task only prints dependencies between Gradle projects. In the [source set layout](/component-layouts), the
component dependencies inside a module are wired between source sets of the same project and therefore do not appear —
visible are only cross-project dependencies, such as those on library modules, bundle dependencies and
[`component(...)` dependencies](/component-layouts#component-dependencies-in-build-scripts) on other modules.
:::

## validatePackageStructure

Validates that the package structure of the source files matches the project structure. The expected packages and all
options are configured in the [`packageStructureValidation` block](/validate-project-structure).

The task is registered on every project: each project validates its own sources, and the root project's task aggregates
the validation of all subprojects. So a single invocation on the root project validates the whole build:

```bash
./gradlew validatePackageStructure
```

:::tip[Validate on every build]
To make every build validate the package structure automatically, hook the task into a task of your regular build,
e.g. compilation. Since the task is registered per project, do this in every project — typically in a convention plugin
applied to all components (project layout) or modules (source set layout):

```kotlin title="convention plugin"
tasks.named("compileKotlin") {
    dependsOn("validatePackageStructure")
}
```

:::
