Hi all. I have next weird issue.
I have file with next content:
data class Point(val x: Int, val y: Int)
data class Size(val width: Int, val height: Int)
fun Point.scale(view: Size, screen: Size): Point {
return Point(
(screen.height * this.x) / view.height, // x
(screen.width * this.y) / view.width) // y
}
infix fun Point.offset(offset: Point): Point {
return Point(this.x + offset.x, this.y + offset.y)
}
And simple test files with test look like:
@Test fun `scale up`() {
val point = Point(10, 10)
val view = Size(80, 60)
val screen = Size(800, 600)
assertEquals(Point(100, 100), point.scale(view, screen))
}
On my local machine all works fine. But on our CI we got complilation errors:
171426 e: /mnt/jenkins/workspace/Android/Androidclient_Gerrit-CI@2/androidclient/android/app/src/test/kotlin/com/unify/circuit/common/util/PointUtilTest.kt: (15, 21): Unresolved reference: Point
171426 e: /mnt/jenkins/workspace/Android/Androidclient_Gerrit-CI@2/androidclient/android/app/src/test/kotlin/com/unify/circuit/common/util/PointUtilTest.kt: (16, 20): Unresolved reference: Size
171426 e: /mnt/jenkins/workspace/Android/Androidclient_Gerrit-CI@2/androidclient/android/app/src/test/kotlin/com/unify/circuit/common/util/PointUtilTest.kt: (17, 22): Unresolved reference: Size
What may be the reason?
The versions of stuff that I use : kotlin - 1.0.4, gradle plugin - 2.2.0, gradle - 3.1