Skip to content
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

Encountering problems when trying to integrate the plugin #310

Open
stefan-tkii opened this issue Nov 10, 2023 · 1 comment
Open

Encountering problems when trying to integrate the plugin #310

stefan-tkii opened this issue Nov 10, 2023 · 1 comment
Labels

Comments

@stefan-tkii
Copy link

Hello, in my project we have recently decided to migrate our tests to make use of JUnit 5 and I have encountered this plugin as indeed a useful way to make our instrumented tests run on JUnit 5. However after attempting to integrate the latest version of your plugin I have encountered the following issue. We are currently using Gradle and AGP 8.0.2 and Java 17.
Stacktrace:

org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ‘:obm-app'.
at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:125)
at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:42)
Caused by: java.lang.IllegalStateException: The value for this property is final and cannot be changed any further.
at de.mannodermaus.gradle.plugins.junit5.internal.ConfigureJUnit5Kt$configureUnitTests$1.invoke(configureJUnit5.kt:143)
at de.mannodermaus.gradle.plugins.junit5.internal.ConfigureJUnit5Kt$configureUnitTests$1.invoke(configureJUnit5.kt:140)
at de.mannodermaus.gradle.plugins.junit5.internal.ConfigureJUnit5Kt.configureUnitTests$lambda$6(configureJUnit5.kt:140)
at de.mannodermaus.gradle.plugins.junit5.internal.ConfigureJUnit5Kt.configureUnitTests(configureJUnit5.kt:140)
at de.mannodermaus.gradle.plugins.junit5.internal.ConfigureJUnit5Kt.access$configureUnitTests(configureJUnit5.kt:1)
at de.mannodermaus.gradle.plugins.junit5.internal.ConfigureJUnit5Kt$configureJUnit5$1$3.invoke(configureJUnit5.kt:48)
at de.mannodermaus.gradle.plugins.junit5.internal.ConfigureJUnit5Kt$configureJUnit5$1$3.invoke(configureJUnit5.kt:46)
at de.mannodermaus.gradle.plugins.junit5.internal.ConfigureJUnit5Kt.configureJUnit5$lambda$1$lambda$0(configureJUnit5.kt:4)
at jdk.proxy1/jdk.proxy1.$Proxy56.afterEvaluate(Unknown Source)
at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:125)
at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:42)

@mannodermaus
Copy link
Owner

mannodermaus commented Feb 4, 2024

Hey, apologies for the late response. Would you mind sharing a bit of your app module's build script file? I'd like to see how the plugin is integrated into the project. Assuming that you are using the latest version of the plugin, this stacktrace suggests that the project calls useJUnitPlatform from somewhere and this conflicts with how the plugin wants to set it up. Another question is, have you ensured that AGP 8.0 and Java 17 work together without the plugin? I vaguely remember something about Java 17 support only being added from AGP 8.1, but I may remember it wrong. Furthermore, what Gradle version are you running with this?

I'll do a bit of research into this and will report back when I find something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants