-
-
Notifications
You must be signed in to change notification settings - Fork 6
Home
⚠️ 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 Element
s 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?
<repository>
<id>elementary-releases</id>
<url>https://repo.karuslabs.com/repository/elementary-releases/</url>
</repository>
"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>
<dependency>
<groupId>com.karuslabs</groupId>
<artifactId>satisfactory</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.karuslabs</groupId>
<artifactId>satisfactory</artifactId>
<version>1.1.1</version>
</dependency>