oliviergauthier / gradle-appcenter-plugin

This gradle plugin allow you to upload each build variant of your android application to separate AppCenter Apps.
MIT License
84 stars 44 forks source link

Fixed OkHttpClient connection timeout and reading from gradle.properties #18

Closed denzap closed 5 years ago

denzap commented 5 years ago
  1. I faced this problem when I tried to upload my apk: okhttp3.OkHttpClient$Builder.connectTimeout(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;
  2. Then I added http.timeout.connect=120 to my gradle.properties file and saw such problem java.lang.String cannot be cast to java.lang.Long

The second problem arose due to every value from gradle.properties is read as String, so it cannot be cast to Long as it was cast before.

As I understood the first problem was arose from Duration.ofSeconds(seconds) Refer to this SO answer https://stackoverflow.com/questions/25953819/how-to-set-connection-timeout-with-okhttp/52366984#52366984