gradle-thrift-plugin


License

License

Categories

Categories

Gradle Build Tools
GroupId

GroupId

co.tomlee.gradle.plugins
ArtifactId

ArtifactId

gradle-thrift-plugin
Last Version

Last Version

0.0.6
Release Date

Release Date

Type

Type

jar
Description

Description

gradle-thrift-plugin
gradle-thrift-plugin
Project URL

Project URL

http://github.com/thomaslee/gradle-thrift-plugin
Source Code Management

Source Code Management

http://github.com/thomaslee/gradle-thrift-plugin

Download gradle-thrift-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/co.tomlee.gradle.plugins/gradle-thrift-plugin/ -->
<dependency>
    <groupId>co.tomlee.gradle.plugins</groupId>
    <artifactId>gradle-thrift-plugin</artifactId>
    <version>0.0.6</version>
</dependency>
// https://jarcasting.com/artifacts/co.tomlee.gradle.plugins/gradle-thrift-plugin/
implementation 'co.tomlee.gradle.plugins:gradle-thrift-plugin:0.0.6'
// https://jarcasting.com/artifacts/co.tomlee.gradle.plugins/gradle-thrift-plugin/
implementation ("co.tomlee.gradle.plugins:gradle-thrift-plugin:0.0.6")
'co.tomlee.gradle.plugins:gradle-thrift-plugin:jar:0.0.6'
<dependency org="co.tomlee.gradle.plugins" name="gradle-thrift-plugin" rev="0.0.6">
  <artifact name="gradle-thrift-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='co.tomlee.gradle.plugins', module='gradle-thrift-plugin', version='0.0.6')
)
libraryDependencies += "co.tomlee.gradle.plugins" % "gradle-thrift-plugin" % "0.0.6"
[co.tomlee.gradle.plugins/gradle-thrift-plugin "0.0.6"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

gradle-thrift-plugin

Put your thrift files in src/main/thrift.

Configuration example:

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'thrift'

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath 'co.tomlee.gradle.plugins:gradle-thrift-plugin:0.0.6'
    }
}

repositories {
    mavenCentral()
}

dependencies {
    //
    // adjust for your Thrift version ...
    //
    compile 'org.apache.thrift:libthrift:0.9.1'
}

generateThriftSource {
    //
    // The output directory (optional)
    //
    out file('build/generated-src/thrift/main')

    //
    // -verbose / -debug / -strict (all optional)
    //
    verbose false
    debug false
    strict false

    //
    // Modify the include path (optional)
    //
    path file('vendor/thrift')

    //
    // Set the thrift executable (optional)
    //
    executable '/usr/bin/thrift'

    generators {
        //
        // --gen java:hashcode,beans
        //
        java {
            //
            // Options passed to the `java` generator
            //
            option 'hashcode'
            option 'beans'
        }

        //
        // --gen go
        //
        go {
            //
            // Output directory can be set on a per-generator basis too
            //
            out file('build/generated-src/thrift/go-main')
        }
    }
}

//
// optional: add generated sources as a source directory in IDEA
//
idea.module.excludeDirs = []
idea.module.sourceDirs += file('build/generated-src/thrift/main')
idea.module.jdkName = '1.8'

Versions

Version
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1