-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoSuchMethodError: kotlin.time.DurationKt.toDuration with version 5.3.1 when testing Gradle plugins #3059
Comments
Seems to be caused by
I guess Gradle 7.4.2 still embeds Kotlin 1.5.31? |
This is very much possible indeed |
I guess this wasn't working on 5.x.x ? Kotest requires Kotlin 1.6 since 5.0.0 (see https://kotest.io/docs/changelog.html#kotlin-16-is-now-the-minimum-supported-version) |
This is a duplicate of #2804 |
… On Tue, 14 Jun 2022 at 10:42, Emil Kantis ***@***.***> wrote:
I guess this wasn't working on 5.x.x ? Kotest requires Kotlin 1.6 since
5.0.0 (see
https://kotest.io/docs/changelog.html#kotlin-16-is-now-the-minimum-supported-version
)
—
Reply to this email directly, view it on GitHub
<#3059 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGXONEVBQN7K42DHIS3VPCSABANCNFSM5YXGGFBA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@sksamuel It can't be an exact duplicate, as it works with Kotest 5.3.0: https://github.com/DanySK/Template-for-Gradle-Plugins/blob/master/gradle/libs.versions.toml |
I am seeing a similar issue as well - my Gradle plugin tests are failing with 5.3.1 and 5.3.2, but passed with 5.3.0. |
…3.1." This reverts commit dda3739. Upgrading is blocked by kotest/kotest#3059.
The current version of Gradle uses Kotlin 1.5, so retaining backwards compatibility with Kotlin 1.5 allows us to use Kotest to write tests for Gradle plugins. Resolves kotest#3059.
It looks like Gradle 7.5 upgrades the embedded version of Kotlin to 1.6.10 🎉 gradle/gradle#19539 |
Tested, confirmed. Issue solved.
…On Fri, Jul 15, 2022, 09:05 Charles Korn ***@***.***> wrote:
It looks like Gradle 7.5 upgrades the embedded version of Kotlin to 1.6.10
🎉
—
Reply to this email directly, view it on GitHub
<#3059 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPGH6JUW5N55WAZWWBFJQLVUEERZANCNFSM5YXGGFBA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
…rgets on Kotlin 1.7+ (#3107) * Add (currently failing) test for Gradle plugin, and improve warnings generated by plugin when invalid configuration is detected. * Fix issue where compilation for Kotlin/Native and Kotlin/JS projects would fail if the project uses Kotlin 1.7. * Fix issue running Kotest tests under Kotlin 1.5. The current version of Gradle uses Kotlin 1.5, so retaining backwards compatibility with Kotlin 1.5 allows us to use Kotest to write tests for Gradle plugins. Resolves #3059. * Fix issue where Gradle plugin tests could fail due to conflicting with other concurrent build tasks. * Remove Gradle plugin test for now. See #3075 (comment). * Revert "Remove Gradle plugin test for now." This reverts commit ec14c55. * Disable JS browser test for now. * Fix issue where no tests are run when targeting a native platform using Kotlin 1.7. Kotlin 1.7 now uses the embeddable compiler JAR and corresponding plugins (from "getPluginArtifact" rather than "getPluginArtifactForNative" in KotestMultiplatformCompilerGradlePlugin) by default for all platforms. This means that the "JS" compiler plugin is used by all targets by default in projects that use Kotlin 1.7+. As a first step, I've brought the existing native plugin code over to the "JS" plugin. Next steps are to rename the projects to make their intention clearer and merge the transformers used by each platform. * Rename JS compiler plugin project to better reflect its purpose. * Update package name to match project name. * Rename "native" compiler plugin project to better reflect its purpose. * Refactor transformers to share more logic. * Add tests to ensure Kotest behaves correctly with Kotlin/Native memory model. * Extract further common functionality. * Configure project config objects when running on Kotlin/Native. * Reorder method calls in native transformer to match JS transformer. * Further consolidate IR generation logic into base Transformer class. * Fix issues running compiler plugin on modules that do not contain any Kotest tests. * Add workaround for issues running Gradle plugin tests on GitHub Actions. * Revert "Add workaround for issues running Gradle plugin tests on GitHub Actions." This reverts commit 9df35f8. * Set target JVM versions for all libraries. * Add Yarn lock file. * Run Gradle plugin tests in a separate GitHub Actions job. Co-authored-by: Sam <sam@sksamuel.com>
Hi,
I tried to update Kotest to 5.3.1, but I could not in projects testing Gradle plugins, for instance https://github.com/DanySK/Template-for-Gradle-Plugins, on the branch
renovate/patch-kotest
.Here is the build scan of the failing build: https://scans.gradle.com/s/fyvjl7xhjrazm/failure?anchor=e30&expanded-stacktrace=WyIwIl0&focused-exception-line=0-0#1
I guess that there is some feature of a recent version of Kotlin being used by Kotest 5.3.1 and not present in the version of Kotlin that Gradle embeds.
The text was updated successfully, but these errors were encountered: