@@ -35,18 +35,24 @@ repositories {
3535
3636dependencies {
3737 implementation (" org.clojure:clojure:1.12.0" )
38- implementation (" com.github.ericdallo:clj4intellij:0.7.1 " )
38+ implementation (" com.github.ericdallo:clj4intellij:0.8.0 " )
3939 implementation (" seesaw:seesaw:1.5.0" )
4040 implementation (" camel-snake-kebab:camel-snake-kebab:0.4.3" )
4141 implementation (" com.rpl:proxy-plus:0.0.9" )
4242 implementation (" dev.weavejester:cljfmt:0.13.0" )
4343 implementation (" com.github.clojure-lsp:clojure-lsp:2025.01.22-23.28.23" )
44+ implementation (" nrepl:nrepl:1.3.1" )
45+
46+ testImplementation(" junit:junit:latest.release" )
47+ testImplementation(" org.junit.platform:junit-platform-launcher:latest.release" )
48+ testRuntimeOnly (" dev.clojurephant:jovial:0.4.2" )
4449}
4550
4651sourceSets {
4752 main {
4853 java.srcDirs(" src/main" , " src/gen" )
4954 if (project.gradle.startParameter.taskNames.contains(" buildPlugin" ) ||
55+ project.gradle.startParameter.taskNames.contains(" clojureRepl" ) ||
5056 project.gradle.startParameter.taskNames.contains(" runIde" )) {
5157 resources.srcDirs(" src/main/dev-resources" )
5258 }
@@ -146,6 +152,10 @@ tasks {
146152 systemProperty(" jb.consents.confirmation.enabled" , " false" )
147153 }
148154
155+ test {
156+ systemProperty(" idea.mimic.jar.url.connection" , " true" )
157+ }
158+
149159 signPlugin {
150160 certificateChain.set(System .getenv(" CERTIFICATE_CHAIN" ))
151161 privateKey.set(System .getenv(" PRIVATE_KEY" ))
@@ -165,6 +175,26 @@ tasks {
165175 enabled = false
166176 }
167177
178+ clojureRepl {
179+ dependsOn(" compileClojure" )
180+ classpath.from(sourceSets.main.get().runtimeClasspath
181+ + file(" build/classes/kotlin/main" )
182+ + file(" build/clojure/main" )
183+ )
184+ // doFirst {
185+ // println(classpath.asPath)
186+ // }
187+ forkOptions.jvmArgs = listOf (" --add-opens=java.desktop/java.awt=ALL-UNNAMED" ,
188+ " --add-opens=java.desktop/java.awt.event=ALL-UNNAMED" ,
189+ " --add-opens=java.desktop/sun.awt=ALL-UNNAMED" ,
190+ " --add-opens=java.desktop/sun.font=ALL-UNNAMED" ,
191+ " --add-opens=java.base/java.lang=ALL-UNNAMED" ,
192+ " -Djava.system.class.loader=com.intellij.util.lang.PathClassLoader" ,
193+ " -Didea.mimic.jar.url.connection=true" ,
194+ " -Didea.force.use.core.classloader=true"
195+ )
196+ }
197+
168198 generateParser {
169199 source.set(" src/main/gramar/clojure.bnf" )
170200 targetRoot.set(" src/gen" )
@@ -180,14 +210,18 @@ tasks {
180210 }
181211}
182212
213+ tasks.withType<Test >().configureEach {
214+ useJUnitPlatform()
215+ }
216+
183217grammarKit {
184218 jflexRelease.set(" 1.7.0-1" )
185219 grammarKitRelease.set(" 2021.1.2" )
186220 intellijRelease.set(" 203.7717.81" )
187221}
188222
189223clojure.builds.named(" main" ) {
190- classpath.from(sourceSets.main.get().runtimeClasspath.asPath)
224+ classpath.from(sourceSets.main.get().runtimeClasspath.asPath + " build/classes/kotlin/main " )
191225 checkAll()
192226 aotAll()
193227 reflection.set(" fail" )
0 commit comments