Hi everyone, I'm going to build a new & modern extension builder. And here need help to generate component information. Here I want to use the AnnotationProcessors.jar to generate component information. See below compiled .class directory
I've compiled the sources into build/classes directory. Now how to call AnnotationProcessors.jar to generate component information by Java?
The annotation processors are run as part of the Java compiler and you just need to include the JAR file in the classpath passed to javac. Here's the relevant part of the build.xml file:
I'm trying to compile this test project. I could compile it before without the AnnotationProcessors.jar on classpath. But after added it to the classpath now getting the above error. Please help me to resolve this error.
package com.jewel.imagegenerator;
import com.google.appinventor.components.annotations.DesignerComponent;
import com.google.appinventor.components.annotations.SimpleEvent;
import com.google.appinventor.components.annotations.SimpleFunction;
import com.google.appinventor.components.annotations.SimpleObject;
import com.google.appinventor.components.common.ComponentCategory;
import com.google.appinventor.components.runtime.AndroidNonvisibleComponent;
import com.google.appinventor.components.runtime.ComponentContainer;
import com.google.appinventor.components.runtime.EventDispatcher;
@DesignerComponent(version = 1, description = "Test Extension", category = ComponentCategory.EXTENSION, nonVisible = true, iconName = "aiwebres/icon.png")
@SimpleObject(external = true)
public class ImageGenerator extends AndroidNonvisibleComponent {
public ImageGenerator(ComponentContainer container) {
super(container.$form());
}
@SimpleFunction(description = "Generate images using your keyword.")
public void Generate(final String keyword) {
Generated(keyword);
}
@SimpleEvent(description = "Triggered when generated images.")
public void Generated(String testString) {
EventDispatcher.dispatchEvent(this, "Generated", testString);
}
}