Closed stan-ko closed 3 years ago
Can you please also provide result of ./gradlew :<module-name>:dependencies
task with Moxy version 2.2.0?
@stan-ko this stacktrace doesn't look like the one from :dependencies, cause :dependencies task does not run compilation
Dependencies log is 312 Kb, I guess its a bas idea to post it here, so I sent it via Telegram
So as you can see from screenshots above, kotlin 1.4 introduced new constructor in this class, and Moxy 2.2.0 compiled against 1.4.10. This class didn't change from 1.3.61 to 1.3.70, but using 1.3.70 in sample you provided somehow resolves the issue. I think it's a bug in kapt 1.3.61, where it uses wrong classpath to do annotation processing.
So updating to Kotlin 1.3.70 or higher should resolve the issue
Yes, thanks, kotlin version 1.3.70 fixed the issue!
Should we close this issue then?
yes
Recently I started to update legacy project which uses Moxy 1.5.3 (and it has new features written in kotlin while the rest part in Java) to use AndroidX. So I need to use newer moxy library version which utilizes AndroidX as well. I followed migration guide but in the end I've stuck with the following issue:
Moxy section in gradle.build:
AndroidStudio version: 3.5.3 Gradle.Wrapper.Properties: distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
project build.gradle:
As for now I was able to migrate to AndroidX using 3rd party fork - [(https://jitpack.io/p/sergevalevich/moxy)]
Using this lib does not require following the migration guide since it built on Moxy 1.5.8.
So, project builds/compiles with Moxy 1.5.8 fork OK, works OK and if I switch to official Moxy 2.2.0 (no more changes except required according to migration guide) I will got the issue.