Missing default constructor for SchemeHandler classes
rtsm opened this issue · 3 comments
Fails on runtime when app build on CI with jdk17
java.lang.InstantiationException: java.lang.Class<net.gotev.uploadservice.schemehandlers.FileSchemeHandler> cannot be instantiated at java.lang.Class.newInstance(Native Method) at net.gotev.uploadservice.UploadServiceConfig.getSchemeHandler(UploadServiceConfig.kt:284) at net.gotev.uploadservice.data.UploadFile$handler$2.invoke(UploadFile.kt:39) at net.gotev.uploadservice.data.UploadFile$handler$2.invoke(UploadFile.kt:38) at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) at net.gotev.uploadservice.data.UploadFile.getHandler(UploadFile.kt:38) at net.gotev.uploadservice.protocols.multipart.MultipartUploadRequest.addFileToUpload(MultipartUploadRequest.kt:56)
It's R8 messing with library - with proguard it was working correctly, worth noting in Wiki to exclude it in proguard rules
Thank you for the heads up! Could you please share how you resolved the issue so I could add it to the wiki?
Seen some libraries providing their proguard rules out of the box, but never done it myself. If you know how I'll be happy to include such rules in the next release.