After updating to IntelliJ IDEA 2025.2 (Community ...
# intellij
a
After updating to IntelliJ IDEA 2025.2 (Community Edition) Build #IC-252.23892.409, built on August 1, 2025 I can't run certain Kotlin programs. The Kotlin Multiplatform projects on the root run fine, but the programs under the orx-jvm folder do not.
This is the project URL: https://github.com/openrndr/orx
This is the error
Copy code
FAILURE: Build failed with an exception.

* Where:
Initialization script '/tmp/WhaaaKt_main__1.gradle' line: 28

* What went wrong:
A problem occurred configuring project ':orx-jvm:orx-gui'.
> Could not create task ':orx-jvm:orx-gui:WhaaaKt.main()'.
   > Could not set unknown property 'main' for task ':orx-jvm:orx-gui:WhaaaKt.main()' of type org.gradle.api.tasks.JavaExec.
and the program under
orx-jvm/orx-gui/src/demo/kotlin/whaaa.kt
looks like this:
Copy code
fun main() { println("hi") }
Such program were working fine before the IDEA update. I tried restarting the computer and deleting the
.idea
folder.
The content of that generated gradle file is this
Copy code
def gradleProjectId = 'orx:orx-jvm:orx-gui'
    def runAppTaskName = 'WhaaaKt.main()'
    def mainClass = 'WhaaaKt'
    def javaExePath = '/usr/lib/jvm/java-24-openjdk/bin/java'
    def _workingDir = '/home/████/orx'

    def sourceSetName = 'demo'

    allprojects {
        afterEvaluate { project ->
            if (project.rootProject.name + project.path == gradleProjectId) {
                def overwrite = project.tasks.findByName(runAppTaskName) != null
                project.tasks.create(name: runAppTaskName, overwrite: overwrite, type: JavaExec) {
                    if (javaExePath) executable = javaExePath
                    if (project.pluginManager.hasPlugin("org.jetbrains.kotlin.multiplatform")) {
                        project.kotlin.targets.each { target ->
                            target.compilations.each { compilation ->
                                if (compilation.defaultSourceSetName == sourceSetName) {
                                    classpath = compilation.output.allOutputs + compilation.runtimeDependencyFiles
                                }
                            }
                        }
                    } else {
                        classpath = project.sourceSets[sourceSetName].runtimeClasspath
                    }
    
                    main = mainClass
                    
                    if(_workingDir) workingDir = _workingDir
                    standardInput = System.in
                }
            }
        }
    }
Line 28 is
main = mainClass