-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Tamás Ádám edited this page Oct 2, 2021
·
5 revisions
Please replace the ${version}
placeholder to the latest version. You can find it by clicking here.
Repository
maven { url 'https://repo.danifoldi.com/repository/maven-releases/' }
Dependency
implementation 'grapefruit:grapefruit:${version}'
Parameter names (See note)
compileJava {
options.compilerArgs << '-parameters'
options.fork = true
options.forkOptions.executable = 'javac'
}
Repository
<repository>
<id>danifoldi-releases</id>
<url>https://repo.danifoldi.com/repository/maven-releases/</url>
</repository>
Dependency
<dependency>
<groupId>grapefruit</groupId>
<artifactId>grapefruit</artifactId>
<version>${version}</version>
</dependency>
Parameter names (See note)
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
Grapefruit relies on parameter names to generate syntax for commands on the fly. However, by default parameters are renamed to arg0, arg1, argN... Luckily there is a workaround, which makes sure that parameter names remain untouched during compilation. If you decide to skip this step the framework will still function properly, but the generated syntax messages will end up looking something like this: root <arg0> <arg1> [arg2]