Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite Java section of compiler args page #2802

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion source/docs/software/advanced-gradlerio/compiler-args.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@ native-utils is used to configure the platform, in this case, `windowsx86-64`. T

## Java

Arguments can also be configured for Java. This can be accomplished by editing `build.gradle` and appending arguments to the `FRCJavaArtifact`. An example of this is shown below.
Compiler arguments can also be configured for Java. We do this by adding arguments in the `JavaCompile` task.

```groovy
// Configure string concat to always inline compile
tasks.withType(JavaCompile) {
options.compilerArgs.add '-XDstringConcat=inline'
}
```

### JVM Arguments

Along with being able to configure compiler arguments Java also allows us to configure runtime options for the JVM. We do this by editing the `frcJava` artifact's arguments.

```groovy
frcJava(getArtifactClass('FRCJavaArtifact')) {
Expand Down