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
Copy file name to clipboardexpand all lines: DEVELOPING.md
+9-6
Original file line number
Diff line number
Diff line change
@@ -4,19 +4,19 @@ This document describes how to set up and develop Native Build Tools on your loc
4
4
5
5
## Environment
6
6
7
-
The project uses Gradle as its build system. At the very minimum, you should set`JAVA_HOME` to a [Gradle-compatible JDK](https://docs.gradle.org/current/userguide/compatibility.html).
7
+
Start by setting`JAVA_HOME` to a [Gradle-compatible JDK](https://docs.gradle.org/current/userguide/compatibility.html).
8
8
9
9
Some build tasks require a GraalVM JDK (e.g., tests). You should set `GRAALVM_HOME` to an appropriate GraalVM JDK.
10
10
11
11
## IDE Setup
12
12
13
-
The Native Build Tools repo is set up as a multi-project Gradle project, with the Maven and Gradle plugins declared as subprojects of the root project.
14
-
To set the project up in your IDE (e.g., IntelliJ IDEA), import the root project and the IDE should automatically import the subprojects.
13
+
The Native Build Tools repository is structured as a Gradle multi-project, with the Maven and Gradle plugins declared as subprojects of the root project.
14
+
To configure it in your IDE (e.g., IntelliJ IDEA), import the root project, and the IDE should automatically detect and include the subprojects.
15
15
16
16
## Building and Testing
17
17
18
18
You can use the various commands in the [Gradle build lifecycle](https://docs.gradle.org/current/userguide/build_lifecycle.html) to build and test the project.
19
-
Some examples (all executed from the root of the repository):
19
+
Some examples are (all executed from the root of the repository):
20
20
21
21
```bash
22
22
# Compile all projects
@@ -35,8 +35,8 @@ Some examples (all executed from the root of the repository):
35
35
./gradlew build
36
36
```
37
37
38
-
39
38
## Debugging Plugin(s)
39
+
40
40
It is often useful to attach a debugger to the Gradle and Maven plugins during a project build.
41
41
42
42
For the Gradle plugin, this can be accomplished by passing debugger options to the Gradle daemon via `org.gradle.jvmargs`, for example:
@@ -50,6 +50,7 @@ The Gradle daemon will suspend on start-up, wait for you to attach a debugger, a
50
50
For the Maven plugin, simply use the `mvnDebug` command in place of the `mvn` command.
51
51
52
52
## Testing Local Changes with an Existing Project
53
+
53
54
A common development task is to modify a plugin and then test it with an existing project.
54
55
55
56
To do this, first modify the project as necessary, and then build and publish the plugins:
@@ -63,6 +64,7 @@ Next, update the project build files:
63
64
2. Update the list of repositories to include and prioritize the common repo.
64
65
65
66
### Gradle
67
+
66
68
Make the following changes to the build files:
67
69
```bash
68
70
# build.gradle
@@ -98,7 +100,8 @@ Make the following changes to the build files:
0 commit comments