Skip to content

OkHttp4 Engine docs should include details for R8 users #1339

@prfarlow1

Description

@prfarlow1

Describe the issue

For smithy-kotlin users who both need to use the OkHttp4 Engine and also use code minification tools like R8 (such as Android apps).

Sample project which follow the documentation for setup: https://github.com/prfarlow1/AWS-Kotlin-OkHttp-Sample
If you pull down the sample project observe that the project cannot be built using the release build variant. But if you open the proguard-rules.pro file and add the -dontwarn okhttp3.coroutines.ExecuteAsyncKt line, the app can now be built.

I think the readme file for the OkHttp4 Engine here should include a section for R8 / Proguard rules for Android apps using the Kotlin SDK. And ideally would distinguish between single module apps (rule should go in proguard-rules.pro) vs multi module apps (rules should go in the consumer-rules.pro file of the module that depends on the AWS SDK).

Links

https://github.com/smithy-lang/smithy-kotlin/tree/main/runtime/protocol/http-client-engines/http-client-engine-okhttp4

Metadata

Metadata

Assignees

Labels

documentationThis is a problem with documentation.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions