Hello guys, After upgrading the ktor version in my...
# ktor
o
Hello guys, After upgrading the ktor version in my project to 0.9.5 from 0.9.2, I am having dependency problems in intellij about ktor. Going through the Raw Sockets section in the docs doesnt help much more than stating to add io.ktor.ktor-network to the dependencies, hrough i didnt check the examples. Can you tell me which dependencies to include for version 0.9.5? My code is included in a text file.
This is the code:
Copy code
abstract class Connection() {

    abstract fun Connect()

    abstract fun sendDataAsync(data: String): Deferred<Unit>
    abstract fun sendData(data: String)
    abstract fun receiveData(): String?
    abstract fun receiveUTF8Data(): String?

    fun Disconnect() {
        socket.close()
        connected = false
    }

    open var connected: Boolean = false
    open lateinit var output : ByteWriteChannel
    open lateinit var input: ByteReadChannel
    open lateinit var socket: Socket
    open var port: Int = 6667
    open var address: String = ""
}
I'm having trouble importing ByteReadChannel and ByteWriteChannel, plus aSocket too.My dependencies include these:
Copy code
compile "io.ktor:ktor-server-netty:$ktor_version"
    compile "io.ktor:ktor-network:$ktor_version"
    compile "io.ktor:ktor-network-tls:$ktor_version"
Where ktor_version is 0.9.5
m
ktor-network-tls should be depending on org.jetbrains.kotlinxkotlinx coroutines io jvm0.1.0-alpha-4, which should provide those types
o
I have this version of coroutines included
Copy code
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.22.5'
but idlk why it isn't auto-importing the dependencies of aSocket and all
m
What’s the output of ./gradlew dep
o
Here is a long list.
so ?
m
\--- io.ktorktor network tls"0.9.5" FAILED there's your problem
you probably need this:
maven { url '<https://dl.bintray.com/kotlin/ktor>' }
in your
dependencies
block
o
ok
Still getting the issue. Even after adding that line, which was there previously
m
well, for whatever reason, gradle isn't happy about fetching those dependencies
could be a proxy issue. Or try using
--refresh-dependencies
or whatever that option is called
o
yeah fixed it... gradle was having issues with the dependency in another part of the build.script, whcih stated ktor version 0.9.2...
thnx anyways
m
yep