Open kekulta opened 1 year ago
hi. it's gradle 8 strict validations. read https://docs.gradle.org/8.0/userguide/validation_problems.html#implicit_dependency
you should add dependencies between gradle task like:
tasks.getByName("kspKotlinIosSimulatorArm64")
.dependsOn(tasks.getByName("generateMRiosSimulatorArm64Main"))
for all tasks that gradle report in errors
Yes, I tried this but could not understand where I should add this line, because when added it In the build.gradle.kts I got this:
Task with name 'kspKotlinIosSimulatorArm64' not found in project ':shared'.
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Exception is:
org.gradle.api.UnknownTaskException: Task with name 'kspKotlinIosSimulatorArm64' not found in project ':shared'.
at org.gradle.api.internal.tasks.DefaultTaskCollection.createNotFoundException(DefaultTaskCollection.java:102)
at org.gradle.api.internal.tasks.DefaultTaskCollection.createNotFoundException(DefaultTaskCollection.java:46)
at org.gradle.api.internal.DefaultNamedDomainObjectCollection.getByName(DefaultNamedDomainObjectCollection.java:333)
at org.gradle.api.internal.tasks.DefaultTaskCollection.getByName(DefaultTaskCollection.java:46)
at Build_gradle.<init>(build.gradle.kts:24)
at Program.execute(Unknown Source)
Where should I look for all this stuff?
for me it helped adding in build.gradle.kts
tasks.matching { it.name == "kspKotlinIosX64" }.configureEach {
dependsOn(tasks.getByName("generateMRiosX64Main"))
}
tasks.matching { it.name == "kspKotlinIosArm64" }.configureEach {
dependsOn(tasks.getByName("generateMRiosArm64Main"))
}
and adding -Pmoko.resources.ARCHS="$ARCHS" \
in the Build Phases task :shared:copyFrameworkResourcesToApp
in xcode
If your build also has the simulatorArm64 sourceSet you would also have to add this:
tasks.matching { it.name == "kspKotlinIosSimulatorArm64" }.configureEach {
dependsOn(tasks.getByName("generateMRiosSimulatorArm64Main"))
}
Or maybe even dynamically like this:
tasks.matching { it.name.startsWith("kspKotlin") }.configureEach {
val sourceSetName = if (name.length == 9) "" else name[9].lowercase() + name.substring(10, name.length)
tasks.findByName("generateMR$sourceSetName") ?: tasks.findByName("generateMR${sourceSetName}Main")?.let { dependsOn(it) }
}
im having this issue too .. when im adding this
If your build also has the simulatorArm64 sourceSet you would also have to add this:
tasks.matching { it.name == "kspKotlinIosSimulatorArm64" }.configureEach { dependsOn(tasks.getByName("generateMRiosSimulatorArm64Main")) }
Or maybe even dynamically like this:
tasks.matching { it.name.startsWith("kspKotlin") }.configureEach { val sourceSetName = if (name.length == 9) "" else name[9].lowercase() + name.substring(10, name.length) tasks.findByName("generateMR$sourceSetName") ?: tasks.findByName("generateMR${sourceSetName}Main")?.let { dependsOn(it) } }
What went wrong: Execution failed for task ':ScanTabletApp:copyResourcesDebugFrameworkIosX64'.
java.io.FileNotFoundException: /Users/ardinata/StudioProjects/ats-android-app/build/ios/Debug-iphonesimulator/FT_ATS.app/FT_ATS:ui_components.bundle/Contents/Resources/Inter-Medium.ttf (No such file or directory)
Hi! I'm playing with Compose Multiplatform, ktorfit and moko right now and I have this problem when I'm trying to build for iOS. What could it be?
Here is also my build.gradle.kts:
also settings.gradle.kts
My other project is built on top of the template Before I added moko-resources it was working. I don't have any problems with build or run on Android.