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

Cannot invoke "String.trim()" because "in" is null #2309

Closed
bric3 opened this issue Sep 13, 2022 · 3 comments
Closed

Cannot invoke "String.trim()" because "in" is null #2309

bric3 opened this issue Sep 13, 2022 · 3 comments

Comments

@bric3
Copy link

bric3 commented Sep 13, 2022

I'm building a new project with jetbrains compose (plugin version 1.1.1), kotlin 1.7.20-RC

plugins {
    id("io.github.bric3.gctk.java-common-conventions")
    kotlin("jvm")
    id("org.jetbrains.compose")
    application
}

But the loading of the plugin fails with this error

org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.
	at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:130)
	at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:42)
Caused by: java.lang.NullPointerException: Cannot invoke "String.trim()" because "in" is null
	at org.jetbrains.compose.ComposePlugin.apply$lambda-6$lambda-5(ComposePlugin.kt:129)
	at org.jetbrains.compose.ComposePlugin.apply$lambda-6(ComposePlugin.kt:126)
	at jdk.proxy1/jdk.proxy1.$Proxy65.afterEvaluate(Unknown Source)
	at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:130)

Also when setting the jvm target, eg. kotlinOptions.jvmTarget = "17", the error then become about void org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions.setUseIR(boolean)

org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.
	at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:130)
	at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:42)
Caused by: org.gradle.internal.event.ListenerNotificationException: Failed to notify project evaluation listener.
	at jdk.proxy1/jdk.proxy1.$Proxy65.afterEvaluate(Unknown Source)
	at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:130)
	at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:42)
Caused by: java.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions.setUseIR(boolean)'
	at org.jetbrains.compose.ComposePlugin.apply$lambda-6$lambda-5(ComposePlugin.kt:131)
	at org.jetbrains.compose.ComposePlugin.apply$lambda-6
	at jdk.proxy1/jdk.proxy1.$Proxy65.afterEvaluate(Unknown Source)
	at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:130)
@hfhbd
Copy link
Contributor

hfhbd commented Sep 13, 2022

1.1.1 is not compatible with Kotlin 1.7.20-RC.

@bric3
Copy link
Author

bric3 commented Sep 13, 2022

Yeah it was not immediately clear to me hence the issue. And at this time I played with the alpha version to get it working, but with some adjustment on the compiler module, see #2108 (comment)

So follow up on #2108

@okushnikov
Copy link
Collaborator

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

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

No branches or pull requests

3 participants