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: README.md
+20-6Lines changed: 20 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ Full JUnit5 integration is provided to help streamline the development process.
40
40
system, and without awkward resource-cleanup logic.
41
41
- Enables running compilations on combinations of real files, class path
42
42
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/)).
44
44
-[Tested on multiple existing frameworks](acceptance-tests/) including
45
45
Avaje, Spring, Lombok, MapStruct, ErrorProne, and CheckerFramework.
46
46
- Supports Java 9 JPMS modules.
@@ -49,7 +49,7 @@ Full JUnit5 integration is provided to help streamline the development process.
49
49
- Provides support for `javac` out of the box, with the
50
50
ability to support other JSR-199 implementations if desired --
51
51
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.
53
53
- Fluent syntax for creating configurations, executing them, and
54
54
inspecting the results.
55
55
- Integration with [AssertJ](https://assertj.github.io/doc/)
@@ -59,7 +59,7 @@ Full JUnit5 integration is provided to help streamline the development process.
59
59
- Diagnostic reporting includes stack traces, so you can find out
60
60
exactly what triggered a diagnostic and begin debugging any
61
61
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:
63
63
64
64
```
65
65
[main] ERROR io.github.ascopes.jct.diagnostics.TracingDiagnosticListener - cannot find symbol
@@ -103,7 +103,7 @@ The project can be found on Maven Central.
103
103
```
104
104
105
105
If you are using Gradle, make sure you enable the Maven Central repositories
106
-
first!
106
+
first, otherwise the dependency will not resolve.
107
107
108
108
```kotlin
109
109
repositories {
@@ -367,7 +367,7 @@ This project uses Java 11, and bootstraps Maven using the Maven Wrapper tooling.
367
367
all you need to build this is any JDK from Java 11
368
368
onwards: everything else will be set up automatically for you.
369
369
370
-
### Non-Windows
370
+
### Unix-like systems
371
371
372
372
On Linux, BSD, and MacOS, I tend to use [sdkman!](https://sdkman.io/) to install the JDK I want to use:
373
373
@@ -390,7 +390,7 @@ and run the correct version of Maven:
390
390
$ ./mvnw clean package
391
391
```
392
392
393
-
### Windows
393
+
### Windows systems
394
394
395
395
On Windows, you can install the JDK of your choice directly from their website, or use Chocolatey to
396
396
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:
404
404
405
405
## Third-party compiler support
406
406
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
+
407
421
### ECJ (Eclipse Java Compiler)
408
422
409
423
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