jprante / gradle-plugin-jflex

A JFlex plugin for Gradle
Apache License 2.0
8 stars 6 forks source link

Question about how to use the jflex plugin #7

Open dprutean opened 5 years ago

dprutean commented 5 years ago

Hi, May I ask how to use the plugin ? I am not experienced with Gradle. If I do as you presented on the plugin page, no java class is generated. Do I have to create a task and specify some output folder ( I had like this in ant task ) ? I mean in ant I had something like below. But only with apply plugin: 'org.xbib.gradle.plugin.jflex' gradle does nothing. Do I miss something ?

<target name="JFlexLexers" description="distribution" >
    <jflex file="build/installers/flex/bash.flex" outdir="dbs-app/src/main/java/com/wisecoders/dbs/sql/editor/lexers"/>
</target>
jprante commented 5 years ago

You can have a look at https://github.com/xbib/cql

That is my project I use the gradle jflex plugin for.

It should enough to declare

plugins {
    id 'org.xbib.gradle.plugin.jflex' version '1.2.1'
}

in the build.gradle file and place the jflex files under the package structure you want to have generated under src/main/jflex e.g. src/main/jflex/org/xbib/cql/CQL.jflex

rillig commented 1 year ago

@jprante

You can have a look at https://github.com/xbib/cql

That project is not visible anymore. Do you have another active example project that uses the plugin? Alternatively, could you describe a complete hello-world workflow in the README, with a minimal JFlex source file?

jprante commented 1 year ago

Sorry for the inconvenience. The project ist now located at

https://github.com/jprante/cql