-
Notifications
You must be signed in to change notification settings - Fork 113
Annotation Processor
Deprecated 1.4.0
users only. 2.0.0
users do not use the annotation processor.
+gwt, +desktop, +android, +ios
Add the following to enable annotation processing in maven. This should be sufficient for most IDE:s.
<dependency>
<groupId>net.onedaybeard.artemis</groupId>
<artifactId>artemis-odb-processor</artifactId>
<version>1.4.0</version>
<scope>provided</scope>
</dependency>
+gwt, +desktop, +android, +ios
Add to your build script dependencies:
buildscript {
dependencies {
// introduces support for provided scope.
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:1.12.+'
}
}
Add to your project dependencies:
project(":core") {
apply plugin: 'provided-base'
dependencies {
provided "net.onedaybeard.artemis:artemis-odb-processor:1.4.0"
}
}
see https://github.com/DaanVanYperen/libgdx-artemis-quickstart for a running example.
For android, see http://stackoverflow.com/questions/25649442/how-do-i-use-custom-java-annotation-processor-in-gradle
The command line tool's eclipse-ap command can configure existing eclipse projects.
$ java -jar /path/to/artemis-odb-cli-1.4.0.jar \
> eclipse-ap -p /path/to/eclipse/project
It is recommended to close the project in Eclipse before running the command. A project refresh (F5
) may be required before Eclipse picks up the new project configuration.
Eclipse doesn't automatically pick up annotation processors from maven POM:s - they must be added manually.
- Download the annotation processor.
- Optionally copy the jar to someplace convenient
- In the project containing components + entity factories
-
Java compiler > Annotation Processing
, enableEnable annotation processing
-
Java compiler > Annotation Processing > Factory Path
, add the artemis processor jar
-
Make sure the annotation processors are on your classpath.
-
File
>Settings
(CTRL-ALT-S) -
Build Execution, Development
->Compiler
->Annotation Processors
- Check
Enable Annotation Processing
At least required when using Gradle in combination with IntellIJ.
- Overview
- Concepts
- Getting Started
- Using
- More guides
- Plugins
- Game Gallery
- Tools and Frameworks
- API reference