raniejade
09/30/2017, 6:49 AMcommon
, another-common
and jvm
. another-common
depends on common
and jvm
implements another-common
.
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:
$ ./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.