fun short2()

in src/main/kotlin/com/intellij/indexing/shared/short.kt [16:36]


fun short2() {
    // example with many options omitted,
    // builds indexes using IJ_HOME and starts local server with them inside data directory.

    val dataDir = Paths.get(DEFAULT_DATA_DIR)

    val url = IntelliJSharedIndexes(dataDir.tempDir())
        .project(PROJECT_HOME)
        .using(IntelliJ.fromLocallyInstalled(IJ_HOME))
        .buildAndUpload(
            dataDir.serverDir(),
            "http://$DEFAULT_HOST:$DEFAULT_PORT"
        )

    println(
        "Put the following lines into ${PROJECT_HOME.intellijYaml()}:\n" +
                sharedIndexesConfigurationForIntelliJYaml(url)
    )

    startServerOnLocalIndexes(dataDir.serverDir())
}