dependencies {
    compile project(':freeplane')

    // from flatDir "localGitDepsRepository":
    // from the Debian "libjsyntaxpane-java" package:
    // https://anonscm.debian.org/cgit/pkg-java/libjsyntaxpane-java.git
    lib ':jsyntaxpane-0.9.6~r156-7' 
}

ext.bundleExports = """\
                 jsyntaxpane,
                 jsyntaxpane.lexers,
                 jsyntaxpane.syntaxkits,
                 jsyntaxpane.actions
                 """

task generateLaTeXLexer(type: Exec) {
    onlyIf { !file('src/main/java/jsyntaxpane/lexers/LaTeXLexer.java').exists() }

    commandLine 'jflex', '-d', 'src/main/java/jsyntaxpane/lexers/', 'src/main/java/jsyntaxpane/lexers/latex.flex'
}

compileJava.dependsOn generateLaTeXLexer
