https://kotlinlang.org logo
#ktor
Title
# ktor
m

mingkangpan

05/26/2019, 12:22 PM
what I find strange is, somehow the auth library is only in test scope...
n

napperley

05/26/2019, 10:40 PM
Are you using Gradle?
m

mingkangpan

05/26/2019, 10:42 PM
yes
n

napperley

05/26/2019, 10:42 PM
Which Gradle DSL is being used (Groovy or Kotlin)?
m

mingkangpan

05/26/2019, 10:56 PM
kotlin
g

gildor

05/27/2019, 1:31 AM
I’m pretty sure this dependency should be there not only in test there, try to search for other scopes, or maybe idea bug
n

napperley

05/27/2019, 4:09 AM
In the Project window there will be a list of libraries under External Libraries that have been picked up by Gradle. There may be something in the list that indicates if the library is test only or not. One key thing to do is make sure that the auth library in the build file isn't listed as a testCompile or testImplementation.
With the ktorserver project build file replace all instances of compile with implementation, and see if that makes a difference. Don't forget to do a Gradle refresh after making the changes.
m

mingkangpan

05/27/2019, 6:13 AM
tried out all this already, at the end I had to explicit add ktorauth library
g

gildor

05/27/2019, 6:15 AM
yes, and this is correct way, ktor-auth should be added explicitly to gradle dependencies
👍 1