I'm trying out kotlin multiplatform but I'm having...
# multiplatform
r
I'm trying out kotlin multiplatform but I'm having problems compiling this project: https://github.com/raniejade/multiplatform-test. So I got 3 modules:
common
,
another-common
and
jvm
.
another-common
depends on
common
and
jvm
implements
another-common
.
Copy code
kotlin

// common
package com.example

interface Foo {
    fun hello()
}


// another-common
abstract class AbstractFoo: Foo {
    override fun hello() {
        TODO()
    }

    abstract fun doHello()
}

// jvm
class ActualFoo: AbstractFoo() {
    override fun doHello() {
        hello()
    }
}
When I run
./gradlew jvm:compileKotlin
I get the following error:
Copy code
$ ./gradlew jvm:compileKotlin        
e: /home/raniejade/Workspace/multiplatform-test/another-common/src/main/kotlin/com/example/AbstractFoo.kt: (3, 29): Unresolved reference: Foo
e: /home/raniejade/Workspace/multiplatform-test/another-common/src/main/kotlin/com/example/AbstractFoo.kt: (4, 5): 'hello' overrides nothing

> Task :jvm:compileKotlin
Using Kotlin incremental compilation


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':jvm:compileKotlin'.
> Compilation error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at <https://help.gradle.org>

BUILD FAILED in 0s
1 actionable task: 1 executed
Interestingly IntelliJ can load the project with no errors, but when I try compiling within the IDE it doesn't do anything.