https://kotlinlang.org logo
Title
t

tim

07/01/2020, 3:24 PM
Hello, I have a multi-project kotlin setup and I want to access test helper classes cross project. Basically I have this:
// inside project A /src/tests/kotlin
package com.example.a
object TestHelper { ... }
And from project b I'd like to be able to do
// inside project B /src/tests/kotlin
package com.example.b

import com.example.a.TestHelper

fun someTest() ...
I was checking out test fixtures gradle plugin for java but I couldn't get it to work. Wasnt sure if i was misconfigurating it, or otherwise?
1
j

Joost Klitsie

07/02/2020, 8:02 AM
I think once upon a time I wanted to reuse a test helper and I think you have to point the test sourcesets to it, maybe worth checking out
t

tim

07/02/2020, 8:20 AM
ahh yes I tried this yesterday but I wasn't quiet sure of the syntax ... will give it another go!