Skip to content

Commit 4b032e2

Browse files
authored
Update README.md notes
[skip ci] Signed-off-by: ascopes <[email protected]>
1 parent 4a64c9e commit 4b032e2

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Full JUnit5 integration is provided to help streamline the development process.
4040
system, and without awkward resource-cleanup logic.
4141
- Enables running compilations on combinations of real files, class path
4242
resources, in-memory files, JARs, WARs, EARs, ZIP files, etc.
43-
- Null-safe API (using [JSpecify](https://jspecify.dev/))
43+
- Null-safe API (using [JSpecify](https://jspecify.dev/)).
4444
- [Tested on multiple existing frameworks](acceptance-tests/) including
4545
Avaje, Spring, Lombok, MapStruct, ErrorProne, and CheckerFramework.
4646
- Supports Java 9 JPMS modules.
@@ -49,7 +49,7 @@ Full JUnit5 integration is provided to help streamline the development process.
4949
- Provides support for `javac` out of the box, with the
5050
ability to support other JSR-199 implementations if desired --
5151
just make use of one of the compiler classes, or make your own!
52-
- Implements a fully functional JSR-199 Path JavaFileManager.
52+
- Implements a fully functional JSR-199 Path JavaFileManager and class loading mechanism.
5353
- Fluent syntax for creating configurations, executing them, and
5454
inspecting the results.
5555
- Integration with [AssertJ](https://assertj.github.io/doc/)
@@ -59,7 +59,7 @@ Full JUnit5 integration is provided to help streamline the development process.
5959
- Diagnostic reporting includes stack traces, so you can find out
6060
exactly what triggered a diagnostic and begin debugging any
6161
issues in your applications quickly.
62-
- Helpful error messages to assist in annotation processor development:
62+
- Helpful error messages to assist in annotation processor development. For example:
6363

6464
```
6565
[main] ERROR io.github.ascopes.jct.diagnostics.TracingDiagnosticListener - cannot find symbol
@@ -103,7 +103,7 @@ The project can be found on Maven Central.
103103
```
104104

105105
If you are using Gradle, make sure you enable the Maven Central repositories
106-
first!
106+
first, otherwise the dependency will not resolve.
107107

108108
```kotlin
109109
repositories {
@@ -367,7 +367,7 @@ This project uses Java 11, and bootstraps Maven using the Maven Wrapper tooling.
367367
all you need to build this is any JDK from Java 11
368368
onwards: everything else will be set up automatically for you.
369369

370-
### Non-Windows
370+
### Unix-like systems
371371

372372
On Linux, BSD, and MacOS, I tend to use [sdkman!](https://sdkman.io/) to install the JDK I want to use:
373373

@@ -390,7 +390,7 @@ and run the correct version of Maven:
390390
$ ./mvnw clean package
391391
```
392392

393-
### Windows
393+
### Windows systems
394394

395395
On Windows, you can install the JDK of your choice directly from their website, or use Chocolatey to
396396
install it for you. Once installed, you can just run the Maven Wrapper batch script to download,
@@ -404,6 +404,20 @@ install, and run the correct version of Maven:
404404

405405
## Third-party compiler support
406406

407+
The base classes to provide third party compiler integrations are made public in this
408+
API so you can extend them.
409+
410+
To integrate with your chosen JSR-199 compatible compiler, extend the [AbstractJctCompiler](https://javadoc.io/doc/io.github.ascopes.jct/java-compiler-testing/latest/io.github.ascopes.jct/io/github/ascopes/jct/compilers/AbstractJctCompiler.html)
411+
class and override anything you need to tweak.
412+
413+
The call to `compile` will return a [JctCompilation](https://javadoc.io/doc/io.github.ascopes.jct/java-compiler-testing/latest/io.github.ascopes.jct/io/github/ascopes/jct/compilers/JctCompilation.html)
414+
object. This is already defined for you. All you need to provide in your compiler class is:
415+
416+
- A [Jsr199CompilerFactory](https://javadoc.io/doc/io.github.ascopes.jct/java-compiler-testing/latest/io.github.ascopes.jct/io/github/ascopes/jct/compilers/AbstractJctCompiler.html#compile(io.github.ascopes.jct.workspaces.Workspace)) to provide JavaCompiler objects.
417+
- A [default release](https://javadoc.io/static/io.github.ascopes.jct/java-compiler-testing/1.0.3/io.github.ascopes.jct/io/github/ascopes/jct/compilers/AbstractJctCompiler.html#getDefaultRelease()) that defines the default language version to use unless overridden.
418+
- A [JctFileManagerFactory](https://javadoc.io/static/io.github.ascopes.jct/java-compiler-testing/1.0.3/io.github.ascopes.jct/io/github/ascopes/jct/compilers/AbstractJctCompiler.html#getFileManagerFactory()) to create a file manager.
419+
- A [FlagBuilder](https://javadoc.io/static/io.github.ascopes.jct/java-compiler-testing/1.0.3/io.github.ascopes.jct/io/github/ascopes/jct/compilers/AbstractJctCompiler.html#getFlagBuilderFactory()) to translate the compiler configuration to command-line arguments.
420+
407421
### ECJ (Eclipse Java Compiler)
408422

409423
While ECJ supports the same interfaces as Javac that are used to call the compiler from this library, [eclipse-jdt/eclipse.jdt.core#1153](https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1153) means we will not get functional Java 11 support going forwards.

0 commit comments

Comments
 (0)