just tried setting up a kmp project but preflights...
# multiplatform
s
just tried setting up a kmp project but preflights fail with "Gradle plugins are not found". what exactly does that mean? the project itself works, I've already launched all non apple targets from a windows machine
t
cc @Maciej Procyk
s
reinstalled xcode but it's not exactly getting better
d
What happens if you run
xcode-select -p
?
Also, I assume you've launched Xcode at least once so the simulators get installed?
s
zsh: command not found: xcode I did launch xcode and I even got the project and simulators running but the error message persists
m
I think you missed the
-
in
xcode-select -p
.
xcode
command does indeed not exist, but
xcode-select
should work. Does the path that is returned point to a valid installation?
d
Also, I assume the error you're seeing is NOT your local language.
s
whoops sorry, my bad. but yes that points to a valid installation as far as I can see. in the normal applications dir
/Applications/Xcode.app/Contents/Developer
languages on the device are english, german and chinese with english being primary. but half of these characters aren't chinese but quite catholic 😅
I reset the entire device (no chinese language pack this time) and reinstalled xcode & intellij, but the problem persists. however, I can run the app in the simulator just fine, had troubles building and archiving the ios app though
m
"Gradle plugins are not found" means that the custom init script was not able to detect the Gradle plugins used in your project which are expected in KMP project. You can create some
init.gradle.kts
file with the following content
Copy code
gradle.settingsEvaluated {
    settings.pluginManagement.resolutionStrategy.eachPlugin {
        println("kdoctor >>> ${requested.id}=${requested.version}")
    }
}

allprojects {
    project.afterEvaluate {
        val deps = buildscript.configurations.flatMap { it.dependencies }
        deps.forEach { d ->
            println("kdoctor >>> DEP ${d.group}:${d.name}:${d.version}")
        }
    }
}
and then run the
Copy code
/path/to/project/gradlew -p /path/to/project -I /path/to/init.gradle.kts
and see how this fails/share the output for further investigation When it comes to this Xcode checks, the preflight uses the Xcode that you have configured in IJ settings, see
Tools
>
Xcode
. Maybe you have there value different from
/Applications/Xcode.app/Contents/Developer
, which has some Chinese language pack set as default?