Sueta
AN

Annotation Config API

1.1

This API allows you to create configuration files in an easy and fast way.

·Plugin

This API allows you to create configs without having to go through the process of filling the default and saving manually, but by simply adding an annotation over the different fields.

To use this release, include the following in your pom.xml file :

<build> 
    <plugins> 
        <plugin> 
                <groupId>org.apache.maven.plugins</groupId> 
                <artifactId>maven-shade-plugin</artifactId> 
                <version>3.2.1</version> 
                <configuration> 
                    <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation> 
                    <relocations> 
                        <relocation> 
                            <pattern>me.EtienneDx.AttributeConfig</pattern> 
                            <shadedPattern>MY.PACKAGE.NAME.AttributeConfig</shadedPattern> 
                        </relocation> 
                    </relocations> 
                </configuration> 
                <executions> 
                    <execution> 
                        <phase>package</phase> 
                        <goals> 
                            <goal>shade</goal> 
                        </goals> 
                    </execution> 
                </executions> 
            </plugin> 
    </plugins> 
</build> 
<repositories> 
    <repository> 
        <id>jitpack.io</id> 
        <url>https://jitpack.io</url> 
    </repository> 
</repositories> 
<dependencies> 
    <dependency> 
        <groupId>com.github.EtienneDx</groupId> 
        <artifactId>AnnotationConfig</artifactId> 
        <version>1.0</version> 
    </dependency> 
</dependencies>

Of course, you'll need to replace MY.PACKAGE.NAME by your package's path.

The maven shade plugin will copy the required types into your own jar file on build, so the users don't need to download it themeselves.

A good example for a config can be found at http://github.com/EtienneDx/RealEstate/blob/master/src/me/EtienneDx/RealEstate/Config.java

Similar projects

Plugin →