Closed jdvp closed 2 years ago
@vdelricco Just checking, I noticed that 1.4.0 release notes mention that it requires Kt 1.7.0 but is that true? I tried compiling my app with Ibotta 1.4.0 and Kt 1.5.0 and it seemed to work? Maybe I had some weird caching issue though
Oh interesting! It's certainly possible there are some build configurations that work properly. When applying this to our main app codebase, I received the following error when using the 1.4.0 release of this plugin:
FAILURE: Build failed with an exception.
* What went wrong:
'org.gradle.api.file.ConfigurableFileCollection org.jetbrains.kotlin.gradle.tasks.KotlinCompile.getLibraries()'
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Exception is:
java.lang.NoSuchMethodError: 'org.gradle.api.file.ConfigurableFileCollection org.jetbrains.kotlin.gradle.tasks.KotlinCompile.getLibraries()'
at com.ibotta.gradle.aop.PipelineAopWeaverPlugin.gatherClasspaths(PipelineAopWeaverPlugin.kt:386)
at com.ibotta.gradle.aop.PipelineAopWeaverPlugin.access$gatherClasspaths(PipelineAopWeaverPlugin.kt:34)
at com.ibotta.gradle.aop.PipelineAopWeaverPlugin$configureAopWeaveTask$1$2.invoke(PipelineAopWeaverPlugin.kt:297)
at com.ibotta.gradle.aop.PipelineAopWeaverPlugin$configureAopWeaveTask$1$2.invoke(PipelineAopWeaverPlugin.kt:34)
at com.ibotta.gradle.aop.AopWeaveTask.getClassPath(AopWeaveTask.kt:43)
I was able to get past this by updating our kotlin version from 1.6.10 to 1.7.0 (and then faced other errors later on because we're not quite ready for 1.7.0 😅) which was the reason for the note in the 1.4.0 release. I didn't do much digging after that though, so like I said this may be limited to our build config and will work in some other scenarios. Would be interested to hear if you uncover anything else 😄
Updating my sample project from Kotlin 1.6.21 to 1.7.0 breaks the plugin
Sample project: https://github.com/jdvp/AndroidAspectExample
You can check out master and just update the Kt version. Prior to updating
./gradlew clean lint test
will run successfully and after updating it will fail with the following error:This appears to be because of the following:
which is mentioned in the What's new in 1.7.0 Changes in compile tasks section