I'm trying to migrate from Groovy to Kotlin. My project has several .gradle files, like someFile.gradle, build.gradle, etc.
What I used to do in my app-level build.gradle: apply from: 'someFile.gradle'
My someFile.gradle:
apply plugin: 'com.some.plugin'
somePlugin {
param1 'string'
param2 'string'
param3 false
}
My someFile.gradle.kts after migration:
import com.some.plugin.SomePluginExtension
apply(plugin = "com.some.plugin")
configure<SomePluginExtension> {
param1 = "string"
param2 = "string"
param3 = false
}
My app-level build.gradle.kts after migration: apply(from = "someFile.gradle.kts")
When I try to sync the project with Gradle, I get this error on the line with import:
e: /p/a/t/h/project/someFile.gradle.kts:1:12: Unresolved reference: some
Other files, which have no imports work fine. How can I fix this error?