From 73556262ed908fdad394c53e8b81be355ccfb092 Mon Sep 17 00:00:00 2001 From: Tobias Roeser Date: Fri, 30 Aug 2019 09:12:05 +0200 Subject: Added mill-aspectj to thirdpary module section (#683) --- docs/pages/10 - Thirdparty Modules.md | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/docs/pages/10 - Thirdparty Modules.md b/docs/pages/10 - Thirdparty Modules.md index 0f878284..58aaf558 100644 --- a/docs/pages/10 - Thirdparty Modules.md +++ b/docs/pages/10 - Thirdparty Modules.md @@ -8,6 +8,51 @@ If you develop or maintain a mill plugin, please create a [pull request](https:/ [comment]: # (Please keep list of plugins in alphabetical order) +## AspectJ + +[AspectJ compiler](https://projects.eclipse.org/projects/tools.aspectj) support for mill. + +Project home: https://github.com/lefou/mill-aspectj + +### Quickstart + +```scala +import mill._ +import mill.scalalib._ +import mill.define._ + +// Load the plugin from Maven Central via ivy/coursier +import $ivy.`de.tototec::de.tobiasroeser.mill.aspectj:0.1.0`, de.tobiasroeser.mill.aspectj._ + +object main extends AspectjModule { + + // Select the AspectJ version + def aspectjVersion = T{ "{aspectjVersion}" } + + // Set AspectJ options, e.g. the language level and annotation processor + // Run `mill main.ajcHelp` to get a list of supported options + def ajcOptions = Seq("-8", "-proc:none") + +} +``` + +### Configuration + +Your module needs to extend `de.tobiasroeser.mill.aspectj.AspectjModule` which itself extends `mill.scalalib.JavaModule`. + +The module trait `de.tobiasroeser.mill.aspectj.AspectjModule` has various configuration options (over those from `mill.scalalib.JavaModule`). + +The most essential targets are: + +* `def aspectjVersion: T[String]` - The AspectJ version. _Required_. +For a list of available releases refer to the [AspectJ Download Page](https://www.eclipse.org/aspectj/downloads.php). + +* `def ajcOptions: T[Seq[String]]` - Additional options to be used by `ajc` in the `compile` target. + +* `def compile: T[CompilationResult]` - Compiles the source code with the ajc compiler. + +For a complete list of configuration options and more documentation, please refer to the [project home page](https://github.com/lefou/mill-aspectj). + ## Bash Completion Limited bash completion support. -- cgit v1.2.3