Skip to content

File 1:
settings.gradle
:

What it is: The very first file Gradle reads. It defines the shape of the entire build — what the project is called and what modules exist inside it.
In Ant there was no equivalent. Each
build.xml
was a standalone file. The only thing that knew about all of them was
cm_makeall.cmd
, which manually called ant dir=... 22 times in a hardcoded sequence:
<!-- Ant: cm_makeall.cmd called ant, then common/Agent/build.xml did this -->
<ant dir="../dataspec" inheritAll="false" />
<ant dir="com/apcc/util" inheritAll="false" />
<ant dir="com/apcc/components/AgentHSM" />
... 19 more lines
In Gradle,
settings.gradle
replaces that entire approach with a single declaration:
rootProject.name = 'pcbe' // ← the name of the whole product
nThen for every module:
include ':command-file-runner' // declare it exists
project(':command-file-runner').projectDir = file('common/Agent/com/apcc/m11/components/CommandFileRunner')
// tell Gradle where it lives
The projectDir override is the key migration trick — Gradle normally expects modules to sit in folders named after them directly under the root. Since your source is deeply nested (common/Agent/com/apcc/...), the override points Gradle at the right place without moving a single file.
dependencyResolutionManagement { repositories { mavenCentral() } } tells every subproject where to download JARs from. In Ant there was no such concept — JARs were just files on disk. gradle wrapper --gradle-version 9.4.1 --distribution-type bin —create gradle wrapper but create settings.gradle file in the root directory first before running this command. inherit and injection
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.