Download ktor from maven central in wizard project

This commit is contained in:
Nikolay Krasko
2021-01-12 19:47:06 +03:00
committed by TeamCityServer
parent ae67bb4565
commit 0a1e4fd7d7
4 changed files with 3 additions and 5 deletions
@@ -13,7 +13,6 @@ repositories {
mavenCentral()
maven { url 'https://dl.bintray.com/kotlin/kotlin-js-wrappers' }
maven { url 'https://dl.bintray.com/kotlin/kotlinx' }
maven { url 'https://dl.bintray.com/kotlin/ktor' }
}
kotlin {
@@ -13,7 +13,6 @@ repositories {
mavenCentral()
maven { url = uri("https://dl.bintray.com/kotlin/kotlin-js-wrappers") }
maven { url = uri("https://dl.bintray.com/kotlin/kotlinx") }
maven { url = uri("https://dl.bintray.com/kotlin/ktor") }
}
kotlin {
@@ -45,7 +45,7 @@ data class JetBrainsSpace(val repository: String) : CustomMavenRepository {
}
object Repositories {
val KTOR_BINTRAY = BintrayRepository("kotlin/ktor")
val KTOR = DefaultRepository.MAVEN_CENTRAL
val KOTLINX = BintrayRepository("kotlin/kotlinx")
val KOTLIN_JS_WRAPPERS_BINTRAY = BintrayRepository("kotlin/kotlin-js-wrappers")
val KOTLIN_EAP_MAVEN_CENTRAL = DefaultRepository.MAVEN_CENTRAL
@@ -59,7 +59,7 @@ class KtorServerTemplate : Template() {
}
override fun Writer.getIrsToAddToBuildFile(module: ModuleIR): List<BuildSystemIR> = buildList {
+RepositoryIR(Repositories.KTOR_BINTRAY)
+RepositoryIR(Repositories.KTOR)
+RepositoryIR(DefaultRepository.JCENTER)
+runTaskIrs(mainClass = "ServerKt")
}
@@ -89,7 +89,7 @@ class KtorServerTemplate : Template() {
}
private fun ktorArtifactDependency(@NonNls name: String, kotlinVersion: Version) = ArtifactBasedLibraryDependencyIR(
MavenArtifact(Repositories.KTOR_BINTRAY, "io.ktor", name),
MavenArtifact(Repositories.KTOR, "io.ktor", name),
Versions.KTOR,
DependencyType.MAIN
)