简体   繁体   中英

gradle REPL in java8 for scala development

Is there a way to retrofit java8 with a REPL in gradle similar to sbt console which automatically adds the classes of the project to the class path of the REPL? https://plugins.gradle.org/plugin/net.java.openjdk.shinyafox.jshell.gradle.plugin only is applicable for java9 or is the workaround of Scala REPL in Gradle considered still best practice?

Following along with http://geekplace.eu/flow/posts/2017-09-28-how-to-add-a-repl.html

my build.gradle.kts looks like:

plugins {
    scala
}

dependencies {
    compile(project(":core"))
    compile(Conf.plugins.ammonite)
}

tasks{
    "printClasspath"{
        dependsOn("assemble")
        doLast{
            println(java.sourceSets["main"].runtimeClasspath.asPath)

        }
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM