mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-01-03 21:40:18 +07:00
Refined flatbuffers dependency implementation (see #132)
Included flatc.exe within repository (v1.11.0 binary) Added check within :core:createFlatBuffers task for Windows OS family Added flatbuffersVersion variable within gradle.properties to 1.11.0 Changed many fields to variables and implemented flatbuffers closure
This commit is contained in:
parent
fb089185c1
commit
6e44b4d745
@ -3,6 +3,7 @@ apply plugin: 'artemis'
|
|||||||
apply plugin: 'io.netifi.flatbuffers'
|
apply plugin: 'io.netifi.flatbuffers'
|
||||||
|
|
||||||
import io.netifi.flatbuffers.plugin.tasks.FlatBuffers
|
import io.netifi.flatbuffers.plugin.tasks.FlatBuffers
|
||||||
|
import org.gradle.internal.os.OperatingSystem
|
||||||
|
|
||||||
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
||||||
|
|
||||||
@ -13,6 +14,8 @@ project.ext.generatedSourceDirs = file('gen/main/java/')
|
|||||||
sourceSets.main.java.srcDirs += generatedSourceDirs
|
sourceSets.main.java.srcDirs += generatedSourceDirs
|
||||||
idea.module.generatedSourceDirs += generatedSourceDirs
|
idea.module.generatedSourceDirs += generatedSourceDirs
|
||||||
|
|
||||||
|
project.ext.flatbuffersSourceDirs = file('src/main/java/com/riiablo/net/')
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api "com.badlogicgames.gdx:gdx:$gdxVersion"
|
api "com.badlogicgames.gdx:gdx:$gdxVersion"
|
||||||
api "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
|
api "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
|
||||||
@ -29,7 +32,7 @@ dependencies {
|
|||||||
api "org.apache.commons:commons-math3:3.6.1"
|
api "org.apache.commons:commons-math3:3.6.1"
|
||||||
api "org.apache.commons:commons-text:1.8"
|
api "org.apache.commons:commons-text:1.8"
|
||||||
api "com.jcraft:jzlib:1.1.3"
|
api "com.jcraft:jzlib:1.1.3"
|
||||||
api "com.google.flatbuffers:flatbuffers-java:1.11.0"
|
api "com.google.flatbuffers:flatbuffers-java:$flatbuffersVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@ -81,8 +84,19 @@ dependencies {
|
|||||||
//
|
//
|
||||||
// classes.finalizedBy weave
|
// classes.finalizedBy weave
|
||||||
|
|
||||||
task createFlatBuffers(type: FlatBuffers) {
|
flatbuffers {
|
||||||
inputDir = file('src/main/java/com/riiablo/net/')
|
flatcPath = rootProject.file('flatbuffers/flatc.exe')
|
||||||
outputDir = file('gen/main/java/')
|
|
||||||
language = 'java'
|
language = 'java'
|
||||||
|
flatBuffersVersion = flatbuffersVersion
|
||||||
|
}
|
||||||
|
|
||||||
|
task createFlatBuffers(type: FlatBuffers) {
|
||||||
|
doFirst {
|
||||||
|
if (OperatingSystem.current() != OperatingSystem.WINDOWS) {
|
||||||
|
throw new GradleException("'flatc' can only run on Windows")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inputDir = flatbuffersSourceDirs
|
||||||
|
outputDir = generatedSourceDirs
|
||||||
}
|
}
|
||||||
|
BIN
flatbuffers/flatc.exe
Normal file
BIN
flatbuffers/flatc.exe
Normal file
Binary file not shown.
@ -9,5 +9,6 @@ artemisOdbVersion=2.3.0
|
|||||||
artemisContribVersion=2.4.0
|
artemisContribVersion=2.4.0
|
||||||
gdxAiVersion=1.8.2
|
gdxAiVersion=1.8.2
|
||||||
nettyVersion=4.1.50.Final
|
nettyVersion=4.1.50.Final
|
||||||
|
flatbuffersVersion=1.11.0
|
||||||
cliVersion=1.4
|
cliVersion=1.4
|
||||||
box2DLightsVersion=1.5
|
box2DLightsVersion=1.5
|
||||||
|
Loading…
Reference in New Issue
Block a user