Hello. I was unsure whether to create an issue in ktor, since I am not sure if I am doing something wrong, or it is an actual bug.
Basically, I am unable to import dependencies in a project.
Steps to reproduce:
1 - Go to
start.ktor.io
2 - Generate a new project
3 - Open from IntelliJ
4 - go to the single `build.gradle`file and try to import:
implementation("org.kodein.di:kodein-di-generic-jvm:6.3.4")
implementation("org.kodein.di:kodein-di-framework-ktor-server-jvm:6.3.4")
š“ It will fail with this error message:
Execution failed for task ':compileKotlin'.
> Error while evaluating property 'filteredArgumentsMap' of task ':compileKotlin'
> Could not resolve all files for configuration ':compileClasspath'.
> Could not find org.kodein.di:kodein-di-generic-jvm:6.3.4.
Searched in the following locations:
- <https://repo.maven.apache.org/maven2/org/kodein/di/kodein-di-generic-jvm/6.3.4/kodein-di-generic-jvm-6.3.4.pom>
- <https://maven.pkg.jetbrains.space/public/p/ktor/eap/org/kodein/di/kodein-di-generic-jvm/6.3.4/kodein-di-generic-jvm-6.3.4.pom>
Required by:
project :
> Could not find org.kodein.di:kodein-di-framework-ktor-server-jvm:6.3.4.
Searched in the following locations:
- <https://repo.maven.apache.org/maven2/org/kodein/di/kodein-di-framework-ktor-server-jvm/6.3.4/kodein-di-framework-ktor-server-jvm-6.3.4.pom>
- <https://maven.pkg.jetbrains.space/public/p/ktor/eap/org/kodein/di/kodein-di-framework-ktor-server-jvm/6.3.4/kodein-di-framework-ktor-server-jvm-6.3.4.pom>
Required by:
project :
Possible solution:
- Declare repository providing the artifact, see the documentation at <https://docs.gradle.org/current/userguide/declaring_repositories.html>
However, itās not the issue of the library I tried, even if you import other libraries except jetbrain libraries, it would also happen. What am I doing wrong here?
Setup is pretty straightforward actually, nothing new added:
val ktor_version: String by project
val kotlin_version: String by project
val logback_version: String by project
val exposedVersion: String by project
plugins {
application
kotlin("jvm") version "1.6.10"
id("org.jetbrains.kotlin.plugin.serialization") version "1.6.10"
}
group = "com.coroutinedispatcher"
version = "0.0.1"
application {
mainClass.set("com.coroutinedispatcher.ApplicationKt")
}
repositories {
mavenCentral()
maven { url = uri("<https://maven.pkg.jetbrains.space/public/p/ktor/eap>") }
}
dependencies {
implementation("io.ktor:ktor-server-content-negotiation:$ktor_version")
implementation("io.ktor:ktor-server-core:$ktor_version")
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor_version")
implementation("io.ktor:ktor-server-auth:$ktor_version")
implementation("io.ktor:ktor-server-netty:$ktor_version")
implementation("ch.qos.logback:logback-classic:$logback_version")
implementation("org.jetbrains.exposed:exposed-core:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-dao:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-jdbc:$exposedVersion")
implementation("mysql:mysql-connector-java:8.0.19")
implementation("org.kodein.di:kodein-di-generic-jvm:6.3.4")
implementation("org.kodein.di:kodein-di-framework-ktor-server-jvm:6.3.4")
testImplementation("io.ktor:ktor-server-tests:$ktor_version")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version")
}