Installation

Distribution Bundle

You can obtain a distribution bundle containing the Dettonville binaries, source code and API documentation from GitHub.

Apache Maven

If you’re using Maven to build your project add the following to your pom.xml to use Dettonville:

...
<properties>
    <org.dettonville.version>1.4.2.Final</org.dettonville.version>
</properties>
...
<dependencies>
    <dependency>
        <groupId>org.dettonville</groupId>
        <artifactId>dettonville</artifactId>
        <version>${org.dettonville.version}</version>
    </dependency>
</dependencies>
...
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <source>1.8</source> <!-- depending on your project -->
                <target>1.8</target> <!-- depending on your project -->
                <annotationProcessorPaths>
                    <path>
                        <groupId>org.dettonville</groupId>
                        <artifactId>dettonville-processor</artifactId>
                        <version>${org.dettonville.version}</version>
                    </path>
                    <!-- other annotation processors -->
                </annotationProcessorPaths>
            </configuration>
        </plugin>
    </plugins>
</build>

Gradle

When using a modern version of Gradle (>= 4.6), you add something along the following lines to your build.gradle:

dependencies {
    ...
    implementation 'org.dettonville:dettonville:1.4.2.Final'

    annotationProcessor 'org.dettonville:dettonville-processor:1.4.2.Final'
}

If using Gradle => 4.6 and < 5.2 you might want to look at gradle-apt-plugin. There might be some tweaks you want to apply to improve the handling of generated sources.

For older versions of Gradle (< 4.6), use something like this:

plugins {
    ...
    id 'net.ltgt.apt' version '0.21'
}
dependencies {
    ...
    compile 'org.dettonville:dettonville:1.4.2.Final'
 
    apt 'org.dettonville:dettonville-processor:1.4.2.Final'
}

You can find a complete example in the dettonville-examples project on GitHub.

Apache Ant

Add the javac task configured as follows to your build.xml file in order to enable Dettonville in your Ant-based project. Adjust the paths as required for your project layout.

...
<javac
    srcdir="src/main/java"
    destdir="target/classes"
    classpath="path/to/dettonville-1.4.2.Final.jar">
    <compilerarg line="-processorpath path/to/dettonville-processor-1.4.2.Final.jar"/>
    <compilerarg line="-s target/generated-sources"/>
</javac>
...

You can find a complete example in the dettonville-examples project on GitHub.