cbeust / kobalt-intellij-plugin

An IntelliJ plug-in for Kobalt
21 stars 7 forks source link

Ktor project structure not recognized in IntelliJ IDEA after initial Kobalt setup #94

Closed knight-robert closed 6 years ago

knight-robert commented 6 years ago

I can't get IntelliJ IDEA to recognize Ktor after importing my project through the Kobalt plugin. I did the init, assemble, and compile steps before trying to import the project in IDEA—no folders appear in the project window. Am I missing something? Here's my build.kt file:

import com.beust.kobalt.*
import com.beust.kobalt.plugin.packaging.*
import com.beust.kobalt.plugin.application.*
import com.beust.kobalt.plugin.kotlin.*

val bs = buildScript {
    repos("https://dl.bintray.com/kotlin/ktor/")
}

val p = project {
    name = "SimpleWebAPI"
    group = "com.example"
    artifactId = name
    version = "0.1"

    dependencies {
        compile("io.ktor:ktor-server-core:0.9.3")
        compile("io.ktor:ktor-server-netty:0.9.3")
        compile("org.jetbrains.kotlin:kotlin-runtime:1.2.51")
        compile("org.jetbrains.kotlin:kotlin-stdlib:1.2.51")
    }

    dependenciesTest {
        compile("io.kotlintest:kotlintest:2.0.7")
    }

    assemble {
        jar {
        }
    }

    application {
        mainClass = "com.example.MainKt"
    }
}
dmitry-zhuravlev commented 6 years ago

Hi @whiteknight- Could you tell me which version of Kobalt do you use? Which directory layout of the project do you have?

As far as I understood you init project by using one of the Kobalt's template. Which one do you use? Did you try to create Kobalt project by using IDEA's new project wizard?

knight-robert commented 6 years ago

Hi @dmitry-zhuravlev,

I just updated to the latest version of IntelliJ. It seems to have fixed everything. Thank you for looking.

IntelliJ IDEA Community 2018.2 (build 182.3684.101) Kobalt v1.0.114. Kobalt plugin v1.131 Kotlin v1.2.51 OpenJDK Runtime Environment (Zulu build 9.0.7.1+1)