https://kotlinlang.org logo
#atrium
Title
# atrium
d

Darren Bell

09/08/2019, 3:12 PM
Hi. I'm trying to use the library in a Multiplatform project . Currently I'm getting the following error in my js side:
Copy code
Cannot access class 'ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown.Builder'. Check your module classpath for missing or conflicting dependencies
I'm trying to use the 0.9.0-alpha version, my build.gradle.kts for test is quite simple:
Copy code
js().compilations["test"].defaultSourceSet {
            dependencies {
                implementation( kotlin("test-js"))

                implementation("ch.tutteli.atrium:atrium-fluent-en_GB-js:${LibraryVersions.atrium_version}")

            }
        }
Do you have any idea what this might be? Thanks
r

robstoll

09/08/2019, 3:12 PM
do you have a public repo for this?
d

Darren Bell

09/08/2019, 3:13 PM
Sorry, no I dont
Here is more of the build.gradle.kts
r

robstoll

09/08/2019, 3:14 PM
no worries, what module system do you use, commonjs, AMD or UMD?
d

Darren Bell

09/08/2019, 3:14 PM
its common.js
r

robstoll

09/08/2019, 3:28 PM
can you show me your settings.gradle please
d

Darren Bell

09/08/2019, 3:41 PM
this in in my root project.
r

robstoll

09/08/2019, 3:47 PM
OK, the good thing, I can reproduce your problem, the bad thing, I have to figure out why this is happening
👍 1
seems like a gradle error, it resolves
api
dependencies correctly when referenced as projects internally but does not when otherwise. Include the following in addition:
Copy code
implementation("ch.tutteli.atrium:atrium-domain-api-js:${LibraryVersions.atrium_version}")
I'll have to figure out a workaround in this case so that the additional dependency is not required
thanks for the report 👍
btw. don't forget to setup a dependency to Atrium, add a testSetup.kt with the following content:
Copy code
import ch.tutteli.atrium.fluent.en_GB.dependOnAtrium

@Suppress("unused")
private val establishDependencyToAtrium = dependOnAtrium()
d

Darren Bell

09/08/2019, 4:01 PM
Brilliant. Yes that has fixed it. Thanks for the super fast response. You could probably use that build.gradle as an the basis of an example mpp project
r

robstoll

09/08/2019, 4:03 PM
d

Darren Bell

09/08/2019, 4:39 PM
Does the testSetup.kt file go in the common sourceset, and what is it for?
When running the tests I'm now getting:
r

robstoll

09/08/2019, 4:43 PM
it has to go into the src folder of Js and it is necessary due to the loosly coupled design of Atrium. I am going to simplify that in 0.10.0
d

Darren Bell

09/08/2019, 4:47 PM
I assume you mean in the commonTest folder of js? If it is there I cannot get it to compile
r

robstoll

09/08/2019, 4:48 PM
I put it into
jsTest/kotlin
and it worked for me
d

Darren Bell

09/08/2019, 4:59 PM
Sorry, my bad, I was being a stupid. All seems to be running fine now. Thanks again
r

robstoll

09/08/2019, 4:59 PM
no worries, and let me know if you encounter other problems
4 Views