Paullo612 / mlfx

OpenJFX's FXML language AOT compler
Apache License 2.0
11 stars 0 forks source link

Add service identifier file #22

Closed ennerf closed 1 year ago

ennerf commented 1 year ago

If your annotation processor includes a META-INF/services/javax.annotation.processing.Processor service file you can omit the manual setup in the compiler plugin. I usually use AutoService to automatically generate it and keep it in sync, e.g.,

<dependency>
    <groupId>com.google.auto.service</groupId>
    <artifactId>auto-service</artifactId> 
    <version>1.0.1</version>
    <scope>compile</scope>
</dependency>
import com.google.auto.service.AutoService;
import javax.annotation.processing.Processor;

@AutoService(Processor.class)
public class MyAnnotationProcessor extends AbstractProcessor {
  /* ... */
}
Paullo612 commented 1 year ago

Annotation processor is registered by Micronaut, and mlfx is registered in Micronaut through ServiceLoader. So, service loader's services can definitely be registered through google's AutoService.

Paullo612 commented 1 year ago

Done.