File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
plugin/src/main/scala/com/sourcegraph/sbtsourcegraph Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,11 @@ import sbt._
2
2
import sbt .Keys ._
3
3
import sbt .plugins .JvmPlugin
4
4
import scala .sys .process ._
5
+ import scala .jdk .CollectionConverters ._
6
+ import java .io .File
5
7
import java .nio .file .Files
6
8
import java .nio .file .StandardCopyOption
9
+ import java .nio .file .StandardOpenOption
7
10
8
11
object SourcegraphPlugin extends AutoPlugin {
9
12
override def trigger = allRequirements
@@ -160,7 +163,16 @@ object SourcegraphPlugin extends AutoPlugin {
160
163
Nil
161
164
} else {
162
165
val javacTargetroot = sourcegraphJavacTargetroot.value
163
- val _ = fullClasspath.value
166
+ val jars = fullClasspath.value.map(_.data)
167
+ val javacopts =
168
+ semanticdbTargetRoot.value / " META-INF" / " semanticdb" / " javacopts.txt"
169
+ Files .createDirectories(javacopts.toPath().getParent())
170
+ Files .write(
171
+ javacopts.toPath,
172
+ List (" -classpath" , jars.mkString(File .pathSeparator)).asJava,
173
+ StandardOpenOption .CREATE ,
174
+ StandardOpenOption .TRUNCATE_EXISTING
175
+ )
164
176
List (
165
177
javacTargetroot,
166
178
Option (semanticdbTargetRoot.value)
You can’t perform that action at this time.
0 commit comments