Hi, what is the kotlin equivalent of ```dependenci...
# gradle
a
Hi, what is the kotlin equivalent of
Copy code
dependencies {
   runtimeClasspath files ("../core/build/classes/kotlin/main")
   runtimeClasspath files ("build/classes/kotlin/main")   
}
?
v
You should not declare dependencies on
runtimeClasspath
, no matter which DSL you use.
But to answer the actual question, the same. You just need to put the arguments of the function call (
runtimeClasspath
) into parentheses.
a
ah okay, thanks !
v
runtimeOnly
is probably what your want
a
I don't really know it was just a snippet I found while trying KTX saying to put that if main class is not found, but it was because of another mistake that my class was not found finally. I had never seen
runtimeClassPath files
before ss this is why I asked !
v
Yeah, that snippet anyway looks like a big bad hack, noone should ever do. :-)