Skip to content

Commit

Permalink
Merge pull request #123 from JetBrains/tobias/search-index
Browse files Browse the repository at this point in the history
make packageArtifactZip also build search index #SCL-21675
  • Loading branch information
vasilmkd authored Oct 12, 2023
2 parents 15e4074 + 8e0d0e3 commit b59ea8f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ideaSupport/src/main/scala/org/jetbrains/sbtidea/Init.scala
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ trait Init { this: Keys.type =>
doPatchPluginXml.value
packageArtifactDynamic.value
},
packageArtifactZip := Def.sequential(
buildIntellijOptionsIndex.toTask,
doPackageArtifactZip.toTask,
).value,

publishPlugin := PublishPlugin.createTask.evaluated,
signPlugin := SignPluginArtifactTask.createTask.value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import scala.collection.JavaConverters.*
object BuildIndex {

private val IDX_DIR = "search"
type IndexElement = (Path, Path) // jar file -> options.xml
private type IndexElement = (Path, Path) // jar file -> options.xml

def createTask: Def.Initialize[Task[Unit]] = Def.task {
implicit val log: PluginLogger = new SbtPluginLogger(streams.value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ object PackagingKeys extends PackagingKeysInit with PackagingDefs {
lazy val dumpDependencyStructureOffline = taskKey[SbtPackageProjectData]("").invisible
lazy val packageMappings = taskKey[Mappings]("").invisible
lazy val packageMappingsOffline = taskKey[Mappings]("").invisible
lazy val doPackageArtifactZip = taskKey[File]("").invisible
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ trait PackagingKeysInit {
new DynamicDistBuilder(stream, myTarget, outputDir, hints).produceArtifact(mappings)
outputDir
},
packageArtifactZip := {
packageArtifactZip := doPackageArtifactZip.value,
doPackageArtifactZip := {
implicit val stream: TaskStreams = streams.value
val outputDir = packageArtifact.value.getParentFile
packageArtifactZipFile.?.value match {
Expand Down

0 comments on commit b59ea8f

Please sign in to comment.