- Notifications
You must be signed in to change notification settings - Fork2
Retrofit converter which uses Thrifty for Apache Thrift-compatible serialization
License
infinum/thrifty-retrofit-converter
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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
.
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.
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.
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
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.
About
Retrofit converter which uses Thrifty for Apache Thrift-compatible serialization
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.