Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Retrofit converter which uses Thrifty for Apache Thrift-compatible serialization

License

NotificationsYou must be signed in to change notification settings

infinum/thrifty-retrofit-converter

Repository files navigation

License

ARetrofit converter implementation usingThrifty for(de)serialization of Apache Thrift requests and responses.

It supportsBinary,Compact andJson Thrift protocols.It supports Thrifty models generated in bothJava andKotlin.

Usage

Add the library as a dependency to yourbuild.gradle to automatically download it from Maven Central.

implementation"com.infinum:retrofit-converter-thrifty:3.0.0"

... and add the converter factory when you create theRetrofit object.

Retrofitretrofit =newRetrofit.Builder()    .baseUrl("https://example.com/api/")    .addConverterFactory(ThriftyConverterFactory.create(ProtocolType.COMPACT))    .build();

We also maintain achangelog.

Contributing

Feedback and code contributions are very much welcome. Just make a pull request with a short description of your changes. By making contributions to this project you give permission for your code to be used under the samelicense.

Generating new files with the thrifty compiler

In case source files need to be generated from .thrift files using a different version of the thrifty compiler, use these commands:

wget https://repo1.maven.org/maven2/com/microsoft/thrifty/thrifty-compiler/2.1.2/thrifty-compiler-2.1.2-all.jarjava -jar thrifty-compiler-2.1.2-all.jar --out=retrofit-converter-thrifty/src/test/java/ --lang=java retrofit-converter-thrifty/src/test/resources/phone.thriftjava -jar thrifty-compiler-2.1.2-all.jar --out=retrofit-converter-thrifty/src/test/kotlin/ --lang=kotlin --kt-file-per-type retrofit-converter-thrifty/src/test/resources/phone.thrift

Deploying a new version

To publish to Maven Central you first need to set the followingGradle properties:

signing.keyId=<GPG_KEY_ID>signing.password=<GPG_KEY_PASSWORD>signing.secretKeyRingFile=<GPG_SECRING_LOCATION>sonatypeUrl=https://oss.sonatype.org/service/local/staging/deploy/maven2/sonatypeUsername=<SONATYPE_USERNAME>sonatypePassword=<SONATYPE_PASSWORD>

To deploy a new version to Maven Central, usedeploy.sh:

./publish.sh<artifact version> [optional tag message]

Thepublish.sh script will automatically push a tag with the version name and change the version in the README.

All you need to do after the script runs is to press release inSonatype OSS.

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp