Skip to content
Matthias Ngeo edited this page Jun 16, 2023 · 11 revisions

⚠️ This wiki is no longer maintained. Please refer to https://github.com/Pante/elementary/tree/master/docs instead.

The Elementary project is a suite of libraries that simplify creating and unit testing annotation processors

  • Composable Element matching
  • Provides a real annotation processing environment in unit tests.
  • Utilities to define and retrieve Element representations of syntactical constructs using idiomatic code

The Elementary project is composed of three child projects, Elementary, Satisfactory and Utilitary.

Elementary includes JUnit extensions that provide a real annotation processing environment and utilities to define Element test cases in plain old Java. If you're interested in an in-depth discussion on unit testing annotation processors, please read The Problem with Annotation Processors.

Satisfactory is a declarative and composable Element matching library. Matching Elements imperatively is often a verbose and complex dance , and developers aren't known for being the best dancers. A declarative syntax will reduce the cognitive burden and improve readability since we need only to define what is match as opposed to how it is matched.

Utilitary is a just library that provides frequently used utilities to simplify implementation of annotation processors.


Requires Java 11. Why Java 11?

CI/CD Funding Codecov Discord

Maven Repository

<repository>
  <id>elementary-releases</id>
  <url>https://repo.karuslabs.com/repository/elementary-releases/</url>
</repository>

Elementary - A suite of tools and JUnit extensions to test annotation processors and compilation

releases-maven snapshots-maven javadoc javadoc

"If I have seen further that others, it is by standing on the shoulder of giants"

This project is heavily inspired by Google's compile-testing project.

<!-- Requires JUnit 5.7.1 & above -->
<dependency>
    <groupId>org.junit.jupiter</groupId>
    <artifactId>junit-jupiter-api</artifactId>
    <version>5.7.1</version>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>com.karuslabs</groupId>
    <artifactId>elementary</artifactId>
    <version>1.1.1</version>
    <scope>test</scope>
</dependency>

Satisfactory - A composable Element matching library

releases-maven snapshots-maven javadoc javadoc

<dependency>
    <groupId>com.karuslabs</groupId>
    <artifactId>satisfactory</artifactId>
    <version>1.1.1</version>
</dependency>

Utilitary - Utilities to simplify implementation of annotation processors.

releases-maven snapshots-maven javadoc javadoc

<dependency>
    <groupId>com.karuslabs</groupId>
    <artifactId>satisfactory</artifactId>
    <version>1.1.1</version>
</dependency>