Closed jdvp closed 2 years ago
Hey @jdvp thank you so much for the PR, we really appreciate it! The code changes looked good to me.
For some reason I'm facing some issues locally despite your changes succeeding on CI. My local build was okay with updating lintOptions
-> lint
but not the options within like warningsAsErrors
, I just get an unresolved reference (wondering if maybe this is related to the following?).
Aside from that, it seems I still get the same error you reported originally when running gradle tasks. I confirmed I'm building using your changes by checking gradlew was using version 7.4.2, but when running for example ./gradlew clean lint test
, I receive the error
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':sample-kotlin:aopWeaveDebug'.
> class org.jetbrains.kotlin.gradle.tasks.KotlinCompile_Decorated cannot be cast to class org.gradle.api.tasks.compile.AbstractCompile (org.jetbrains.kotlin.gradle.tasks.KotlinCompile_Decorated is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @53f3685e; org.gradle.api.tasks.compile.AbstractCompile is in unnamed module of loader org.gradle.initialization.MixInLegacyTypesClassLoader @7ac296f6)
I'm still digging on my side, because it seems this may be a local setup issue given CI success but wanted to report my initial findings and let you know we're actively looking at this PR 😄
@vdelricco awesome, thanks for looking into it. I think we can revert the lintOptions update. I subconsciously did it since I had been updating a lot of gradle files lately and that was part of it lmao. lintOptions
should still work but is deprecated afaik
Regarding the second issue, not personally sure what it could be. I had something similar until I realized I wasn't actually publishing the plugin to mavenLocal first but I don't think that's your issue since it doesn't appear to be the exact same error
Hey @jdvp, the issue ended up being on my end as suspected. Thanks for mentioning your maven local issue, that was my mistake as well 🤦 After fixing, was able to build successfully with all your changes (including the lint ones 😄). Thanks again for the PR, this is great. I'll work on getting this merged and published.
24 : Fix issue with Kotlin 1.7.0 changing the KotlinCompileTask to no longer inherit from AbstractCompile
feat : This fixes the error by checking if the task is a KotlinCompile or AbstractCompile task. This also updates the Kotlin and Gradle plugin versions accordingly.
@eschlenz This seems to fix #24 for me when I tried on my personal project using mavenLocal but some more eyes on it would be helpful because I'm not totally sure if I missed anything. Thanks!