groovy - Gradle Thrift Plugin by Example -
please note: although question calls out gradle thrift plugin, believe general gradle question battle-weary gradle veteran me with.
i new apache thrift , quasi-familiar gradle (2.4.x). trying gradle thrift plugin work , encountering few issues gaps in gradle knowledge.
here sample project: thrifty
if clone , run ./gradlew compilethrift
, you'll see gradle thrift readme says do. generates source under build/generated-sources/thrift/*
.
i compile , build source. java source generates, i'd produce jar library...so what's best way this? should copy, say, build/generated-sources/thrift/gen-java/*
src/main/java
, , run build
?
so, should able add following build script
compilethrift { outputdir = file('src/generated/thrift') } sourcesets { main.java.srcdirs += 'src/generated/thrift/gen-java' }
so thrift plugin generate folder under src (i prefer this, source code being in build)
and can add these sources directories java plugin checks
no idea python question
Comments
Post a Comment