-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb926a4
commit 052a234
Showing
25 changed files
with
832 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
api/src/main/java/org/fuin/esc/api/GenerateSerializedDataTypesRegistrationRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.fuin.esc.api; | ||
|
||
import jakarta.validation.Constraint; | ||
import jakarta.validation.Payload; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Inherited; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Request to generate a class that implements {@link SerializedDataTypesRegistrationRequest}. | ||
* Should only be placed on an interface as it will be used for the implementation with "implements". | ||
*/ | ||
@Documented | ||
@Target(ElementType.TYPE) | ||
@Inherited | ||
@Retention(RetentionPolicy.SOURCE) | ||
public @interface GenerateSerializedDataTypesRegistrationRequest { | ||
|
||
/** | ||
* Name of the class to generate. In case it's not set, the class will be named | ||
* like annotated interface with an "Impl" extension. | ||
* | ||
* @return Simple class name. | ||
*/ | ||
String name() default ""; | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
api/src/main/java/org/fuin/esc/api/SerializedDataTypesRegistrationRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.fuin.esc.api; | ||
|
||
import java.util.Set; | ||
|
||
/** | ||
* Returns classes that are annotated with {@link HasSerializedDataTypeConstant} and should be | ||
* included in the applications {@link SerializedDataTypeRegistry}. | ||
*/ | ||
public interface SerializedDataTypesRegistrationRequest { | ||
|
||
/** | ||
* Returns the class to type mappings that should be registered. | ||
* | ||
* @return Set of mappings. | ||
*/ | ||
Set<SerializedDataType2ClassMapping> getMappingsToRegister(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.fuin.esc</groupId> | ||
<artifactId>esc-parent</artifactId> | ||
<version>0.8.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>esc-apt</artifactId> | ||
<packaging>jar</packaging> | ||
<description>Generation of source code with APT (Annotation Processing Tool)</description> | ||
|
||
<dependencies> | ||
|
||
<!-- compile --> | ||
|
||
<dependency> | ||
<groupId>com.google.auto.service</groupId> | ||
<artifactId>auto-service-annotations</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.google.auto.service</groupId> | ||
<artifactId>auto-service</artifactId> | ||
<version>1.1.1</version> | ||
<optional>true</optional> | ||
</dependency> | ||
|
||
<!-- test --> | ||
|
||
<dependency> | ||
<groupId>org.fuin.esc</groupId> | ||
<artifactId>esc-api</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.toolisticon.cute</groupId> | ||
<artifactId>cute</artifactId> | ||
<version>1.4.0</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
|
||
<plugins> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.jacoco</groupId> | ||
<artifactId>jacoco-maven-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>3.5.2</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<createDependencyReducedPom>true</createDependencyReducedPom> | ||
<relocations> | ||
<relocation> | ||
<pattern>com.google.auto.common</pattern> | ||
<shadedPattern>org.fuin.esc.apt.auto.common</shadedPattern> | ||
</relocation> | ||
</relocations> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<configuration> | ||
<includes> | ||
<include>**/*</include> | ||
</includes> | ||
<archive> | ||
<manifestEntries> | ||
<Automatic-Module-Name>org.fuin.esc.apt</Automatic-Module-Name> | ||
</manifestEntries> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jdeps-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<configuration> | ||
<ignoredUnusedDeclaredDependencies> | ||
<ignoredUnusedDeclaredDependency>com.tngtech.archunit:archunit-junit5</ignoredUnusedDeclaredDependency> | ||
<ignoredUnusedDeclaredDependency>org.junit.jupiter:junit-jupiter</ignoredUnusedDeclaredDependency> | ||
<ignoredUnusedDeclaredDependency>com.google.auto.service:auto-service</ignoredUnusedDeclaredDependency> | ||
<ignoredUnusedDeclaredDependency>org.fuin.esc:esc-api</ignoredUnusedDeclaredDependency> | ||
</ignoredUnusedDeclaredDependencies> | ||
<ignoredUsedUndeclaredDependencies> | ||
<ignoredUsedUndeclaredDependency>com.tngtech.archunit:archunit-junit5-api</ignoredUsedUndeclaredDependency> | ||
<ignoredUsedUndeclaredDependency>org.junit.jupiter:junit-jupiter-api</ignoredUsedUndeclaredDependency> | ||
</ignoredUsedUndeclaredDependencies> | ||
</configuration> | ||
</plugin> | ||
|
||
</plugins> | ||
|
||
</build> | ||
|
||
</project> |
Oops, something went wrong.