{"id":17280817,"url":"https://github.com/lefou/mill-aspectj","last_synced_at":"2025-04-14T09:42:15.697Z","repository":{"id":39970869,"uuid":"204689551","full_name":"lefou/mill-aspectj","owner":"lefou","description":"AspectJ compiler/weaver support for mill build tool","archived":false,"fork":false,"pushed_at":"2024-10-21T21:11:27.000Z","size":165,"stargazers_count":4,"open_issues_count":7,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T23:02:32.438Z","etag":null,"topics":["aspectj","aspectj-plugin","mill","mill-plugin"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lefou.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"lefou"}},"created_at":"2019-08-27T11:34:35.000Z","updated_at":"2024-10-21T21:11:31.000Z","dependencies_parsed_at":"2024-03-02T15:25:19.865Z","dependency_job_id":"3ad84df9-9f1e-4190-bae9-2c9bbf442256","html_url":"https://github.com/lefou/mill-aspectj","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefou%2Fmill-aspectj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefou%2Fmill-aspectj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefou%2Fmill-aspectj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefou%2Fmill-aspectj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lefou","download_url":"https://codeload.github.com/lefou/mill-aspectj/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248855961,"owners_count":21172673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aspectj","aspectj-plugin","mill","mill-plugin"],"created_at":"2024-10-15T09:22:05.316Z","updated_at":"2025-04-14T09:42:15.675Z","avatar_url":"https://github.com/lefou.png","language":"Scala","funding_links":["https://github.com/sponsors/lefou"],"categories":[],"sub_categories":[],"readme":"\n= mill-aspectj - AspectJ compiler support for mill\n:version: 0.5.0\n:projectHome: https://github.com/lefou/mill-aspectj\n:minimal-mill-version: 0.9.3\n:example-aspectj-version: 1.9.7\n:example-scala-version: 2.13.11\n:example-mill-platform-version: 0.11\n:toc:\n:toc-placement: preamble\n\nDocumentation for mill-aspectj, a mill plugin to support the https://github.com/eclipse/org.aspectj[AspectJ language and compiler].\n\n== Quickstart\n\nMill version {minimal-mill-version} or newer is required.\nUsing the latest stable Mill release is recommended.\n\n[source,scala,subs=\"attributes,verbatim\"]\n----\nimport mill._\nimport mill.scalalib._\nimport mill.define._\n\n// Load the plugin from Maven Central via ivy/coursier\nimport $ivy.`de.tototec::de.tobiasroeser.mill.aspectj::{version}`\nimport de.tobiasroeser.mill.aspectj._\n\nobject main extends AspectjModule {\n\n  // Select the AspectJ version\n  def aspectjVersion = \"{example-aspectj-version}\"\n\n  // Set AspectJ options, e.g. the language level and annotation processor\n  // Run `mill main.ajcHelp` to get a list of supported options\n  def ajcOptions = Seq(\"-8\", \"-proc:none\")\n\n}\n----\n\n== Configuration\n\nYour module needs to extend `de.tobiasroeser.mill.aspectj.AspectjModule` which itself extends `mill.scalalib.JavaModule`.\n\nThe module trait `de.tobiasroeser.mill.aspectj.AspectjModule` has the following configuration options (over those from `mill.scalalib.JavaModule`).\n\n`def aspectjVersion: T[String]`::\n  The AspectJ version. _Required_.\n  For a list of available releases refer to the https://www.eclipse.org/aspectj/downloads.php[AspectJ Download Page].\n\n`def ivyDeps: T[Agg[Dep]]`::\n  The compile and runtime dependencies.\n  Contains by default the `aspectjrt.jar` which is resolved via ivy (`ivy\"org.aspectj:aspectjrt:${aspectjVersion()}\"`).\n  If you do do not use `super.ivyDeps()` when overriding this def, you need to provide the `aspectjrt.jar` manually.\n\n`def aspectjToolsDeps: T[Agg[Dep]]`::\n  The ivy dependencies representing the aspectj compiler classes, which is typically a `aspectjtools.jar`.\n  Default to `ivy\"org.aspectj:aspectjtools:${aspectjVersion()}\"`.\n\n`def aspectjToolsClasspath: T[Agg[PathRef]]`::\n  The aspectj compiler classpath.\n  By default resolved from `aspectjToolsDeps`.\n\n`def ajcOptions: T[Seq[String]]`::\n  Additional options to be used by `ajc` in the `compile` target.\n\n`def aspectPath: T[Agg[PathRef]]`::\n  Additional classes, JARs or ZIPs to be used as aspect path (`ajc -aspectpath`).\n  In most cases it is enough to use `aspectModuleDeps` and `aspectIvyDeps`.\n\n`def aspectModuleDeps: Seq[JavaModule]`::\n  List of modules to be used as aspect path (`ajc -aspectpath`).\n\n`def aspectIvyDeps: T[Agg[Dep]]`::\n  List of ivy dependencies to be used as aspect path (`ajc -aspectpath`).\n\n`def effectiveAspectPath: T[Seq[PathRef]]`::\n  Effective aspect path (`ajc -inpath`).\n  In most cases, it is enough to use `aspectModuleDeps` and `aspectIvyDeps`.\n\n`def weavePath: T[Seq[PathRef]]`::\n  List of directories with `.class` files to weave (into target directory).\n  Corresponds to `ajc -inpath` option.\n\n`def compile: T[CompilationResult]`::\n  Compiles the source code with the ajc compiler.\n\n`def ajcHelp: Command[Unit]`::\n  Shows the help of the AspectJ compiler (`ajc -help`).\n\n== Mixing in the Aspectj-Compiler in an existing Compiler chain (aka Scala support)\n\nIf you override the `def aspectjCompileMode` to return `CompileMode.OnlyAjSources`, you can chain the AspectJ compiler after another compiler.\n\nIn this setup, the AspectJ compiler will not compile your Java source files but weave-compiles the already compiled classes.\nOnly the `*.aj` files (if any) are fed as source files. All other\ninputs (the already compiled classes) are fed via the `-inpath` option.\n\nWith this setup, we can even compile-time weave Scala (and probably also Kotlin or other JVM language) classes. But this only works reliably with Mill 0.10.0 and newer.\n\n.Example for chained compilation setup: First Zinc, then AspectJ\n[source,scala,subs=\"attributes,verbatim\"]\n----\nimport mill._\nimport mill.scalalib._\nimport mill.define._\n\n// Load the plugin from Maven Central via ivy/coursier\nimport $ivy.`de.tototec::de.tobiasroeser.mill.aspectj::{version}`\nimport de.tobiasroeser.mill.aspectj._\n\nobject main extends ScalaModule with AspectjModule {\n\n  def scalaVersion = \"{example-scala-version}\"\n\n  // Select the AspectJ version\n  def aspectjVersion = \"{example-aspectj-version}\"\n\n  // Set AspectJ options, e.g. the language level and annotation processor\n  // Run `mill main.ajcHelp` to get a list of supported options\n  def ajcOptions = Seq(\"-8\", \"-proc:none\")\n\n  // other settings\n}\n----\n\n== Version Compatibility Matrix\n\nThe following table shows a matrix of compatible mill and mill-aspectj versions.\n\n.Version Compatibility Matrix\n[options=\"header\"]\n|===\n| mill-aspectj | mill\n| 0.5.0 | 0.9.0 - 0.11.x\n| 0.4.0 | 0.6.0 - 0.10.x\n| 0.3.2 | 0.6.0 - 0.10.x\n| 0.3.1 | 0.6.0 - 0.8.0\n| 0.3.0 | 0.6.0 - 0.6.3\n| 0.2.2 | 0.6.0 - 0.6.3\n| 0.2.1 | 0.5.8 - 0.5.9\n| 0.2.0 | 0.5.7\n| 0.1.0 | 0.3.6 - 0.5.3\n|===\n\nTo ensure some basic compatibility, there are some integration tests in place.\nNewer mill versions may work as well.\n\nIf you need support for other versions, please create an {projectHome}/issues[issue].\n\n== Download\n\nYou can download binary releases from https://search.maven.org/artifact/de.tototec/de.tobiasroeser.mill.aspectj_mill{example-mill-platform-version}_2.13[Maven Central].\n\nPlease make sure to use the correct _mill platform suffix_ matching your used mill version.\n\n== License\n\nThis project is published under the https://www.apache.org/licenses/LICENSE-2.0[Apache License, Version 2.0].\n\n== Supporters\n\nThanks to https://iba-cg.de/[iba Consulting Gesellschaft mbH \u0026 Co KG] for the initial development support.\n\n== About\n\nMill::\n  https://github.com/lihaoyi/mill[Mill] is a Scala-based open source build tool.\n  In my opinion the best build tool for the JVM.\n  It is fast, reliable and easy to understand.\n\nMe::\n+\n--\nI am https://github.com/lefou/[Tobias Roeser], a professional software developer and love to create open source software.\nI'm actively developing and maintaining Mill as well as https://github.com/lefou?utf8=%E2%9C%93\u0026tab=repositories\u0026q=topic%3Amill\u0026type=\u0026language=[several mill plugins].\n\nIf you like my work, please star it on GitHub. You can also support me via https://github.com/sponsors/lefou[GitHub Sponsors].\n--\n\nContributing::\n+\n--\nIf you found a bug or have a feature request, please open a {projectHome}/issues[new issue on GitHub].\nI also accept {projectHome}/pulls[pull requests on GitHub].\n\nYou can also ask question and join our discussion at the {projectHome}/discussions[GitHub Discussions board]\n--\n\n== Changelog\n\n=== 0.5.0 - 2023-06-24\n:version: 0.5.0\n:prev-version: 0.4.0\n:github-milestone: 5\n\n* Support Mill 0.11 API\n* Dropped support for Mill versions older than `0.9`\n* Tooling and Dependency updates\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-aspectj/milestone/{github-milestone}?closed=1[milestone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-aspectj/compare/{prev-version}\\...{version}[list of commits]_\n\n\n=== mill-aspectj 0.4.0 - 2022-05-20\n:version: 0.4.0\n:prev-version: 0.3.2\n:github-milestone: 4\n\n* Support chained compilation to run AspectJ compiler after Zinc or other compilers\n* New `aspectjCompileMode` config option, to configure Aspectj compiler behavior, e.g. to weave-compile already compiled classes.\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-aspectj/milestone/{github-milestone}?closed=1[milestone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-aspectj/compare/{prev-version}\\...{version}[list of commits]_\n\n\n=== mill-aspectj 0.3.2 - 2022-01-16\n:version: 0.3.2\n:prev-version: 0.3.1\n:github-milestone: 3\n\n* Support for newer mill APIs\n* AspecjJ worker is only initialized when needed\n* Improved test suite\n* Various dependency version updates\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-aspectj/milestone/{github-milestone}?closed=1[milestone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-aspectj/compare/{prev-version}\\...{version}[list of commits]_\n\n\n=== mill-aspectj 0.3.1 - 2020-06-15\n:version: 0.3.1\n:prev-version: 0.3.0\n:github-milestone:\n\n* Support for mill API 0.7.x and Scala 2.13\n* Switch to GitHub Actions workflow and removed Travis CI setup\n* Enabled auto-deployment of tagged and snapshot releases to Maven Central\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-aspectj/milestone/{github-milestone}?closed=1[milestone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-aspectj/compare/{prev-version}\\...{version}[list of commits]_\n\n=== mill-aspectj 0.3.0 - 2020-03-04\n:version: 0.3.0\n:prev-version: 0.2.2\n:github-milestone: 2\n\n* Splitted out new api and worker package to access Aspectj Java API instead of reflection\n* Removed need to use a Java SecurityManager to trap `System.exit()` calls\n* Made concurrent runs of the compiler configurable\n* Fixed `ajcHelp` task\n* Support for Java 11 and others\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-aspectj/milestone/{github-milestone}?closed=1[milestone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-aspectj/compare/{prev-version}\\...{version}[list of commits]_\n\n=== mill-aspectj 0.2.2 - 2020-02-24\n:version: 0.2.2\n:prev-version: 0.2.1\n:github-milestone:\n\n* Version bump mill API to 0.6.0\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-aspectj/milestone/{github-milestone}?closed=1[milestone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-aspectj/compare/{prev-version}\\...{version}[list of commits]_\n\n=== mill-aspectj 0.2.1 - 2020-02-24\n:version: 0.2.1\n:prev-version: 0.2.0\n:github-milestone:\n\n* Version bump mill API to 0.5.8\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-aspectj/milestone/{github-milestone}?closed=1[milestone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-aspectj/compare/{prev-version}\\...{version}[list of commits]_\n\n=== mill-aspectj 0.2.0 - 2020-01-08\n:version: 0.2.0\n:prev-version: 0.1.0\n:github-milestone: 1\n\n* Share ajc compiler instance between module\n* Version bump mill API to 0.5.7\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-aspectj/milestone/{github-milestone}?closed=1[milestone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-aspectj/compare/{prev-version}\\...{version}[list of commits]_\n\n=== mill-aspectj 0.1.0 - 2019-08-30\n\n* Initial public release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefou%2Fmill-aspectj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flefou%2Fmill-aspectj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefou%2Fmill-aspectj/lists"}