The omero-api-plugin is a Gradle plugin that provides users and projects the ability to generate/compile the files required to use omero-blitz.
From a high level, the omero-api-plugin consists of the following tasks/stages:
- Import
.ome.xml
map files fromorg.openmicroscopy:omero-model
(omero-model.jar
) resources - Import
-types.properties
files fromorg.openmicroscopy:omero-model
(omero-model.jar
) resources
Include the following at the top of your build.gradle file:
plugins {
id "org.openmicroscopy.api" version "x.y.z"
}
Use the api block to configure the generation of API files with org.openmicroscopy.api.tasks.SplitTask
.
The API block can contain one or more split tasks, each with its own chosen language for generating API files.
api {
java {
language "java"
outputDir "java/omero/model"
}
ice {
language "ice"
outputDir "slice/omero/model"
}
}
The SplitTask
class is responsible for splitting languages from .combine
files.
It supports the following languages:
java
c++ (cpp)
python
ice
If you wish to use the SplitTask
outside of the blitz {}
scope, you can customize
its functionality using
// Handle headers
task splitCpp(type: SplitTask) {
language "cpp"
outputDir "${buildDir}"
combined fileTree(dir: "${buildDir}", include: '**/*.combined')
rename '(.*?)I[.]combined', 'omero/model/$1I'
}