import io.netifi.flatbuffers.plugin.tasks.FlatBuffers apply plugin: "java" apply plugin: "idea" apply plugin: "io.netifi.flatbuffers" sourceCompatibility = 1.7 [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' sourceSets.main.java.srcDirs += file('gen/') idea { module { generatedSourceDirs += file('gen/') } } task createFlatBuffers(type: FlatBuffers) { inputDir = file('src/main/java/com/riiablo/net/') outputDir = file('gen/main/java/') language = 'java' }