All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jetbrains.pluginverifier.tasks.checkTrunkApi.CheckTrunkApiParams.kt Maven / Gradle / Ivy

Go to download

Command-line interface for JetBrains Plugin Verifier with set of high-level tasks for plugin and IDE validation

There is a newer version: 1.379
Show newest version
/*
 * Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 */

package com.jetbrains.pluginverifier.tasks.checkTrunkApi

import com.jetbrains.plugin.structure.base.utils.closeLogged
import com.jetbrains.pluginverifier.PluginVerificationDescriptor
import com.jetbrains.pluginverifier.PluginVerificationTarget
import com.jetbrains.pluginverifier.filtering.ProblemsFilter
import com.jetbrains.pluginverifier.ide.IdeDescriptor
import com.jetbrains.pluginverifier.repository.files.FileLock
import com.jetbrains.pluginverifier.tasks.TaskParameters


class CheckTrunkApiParams(
  private val trunkIde: IdeDescriptor,
  private val releaseIde: IdeDescriptor,
  private val releaseIdeFile: FileLock,
  val problemsFilters: List,
  val releaseVerificationDescriptors: List,
  val trunkVerificationDescriptors: List,
  val releaseVerificationTarget: PluginVerificationTarget.IDE,
  val trunkVerificationTarget: PluginVerificationTarget.IDE,
  val excludeExternalBuildClassesSelector: Boolean
) : TaskParameters {
  override val presentableText: String
    get() = buildString {
      appendLine("Trunk IDE: $trunkIde")
      appendLine("Release IDE: $releaseIde")

      appendLine("Release verifications (${releaseVerificationDescriptors.size}): ")
      for ((ideVersion, ideVerifications) in releaseVerificationDescriptors.groupBy { it.ideVersion }) {
        appendLine(ideVersion.asString() + " against " + ideVerifications.joinToString { it.checkedPlugin.presentableName })
      }

      appendLine("Trunk verifications (${releaseVerificationDescriptors.size}): ")
      for ((ideVersion, ideVerifications) in trunkVerificationDescriptors.groupBy { it.ideVersion }) {
        appendLine(ideVersion.asString() + " against " + ideVerifications.joinToString { it.checkedPlugin.presentableName })
      }
    }

  override fun createTask() = CheckTrunkApiTask(this)

  override fun close() {
    trunkIde.closeLogged()
    releaseIde.closeLogged()
    releaseIdeFile.release()
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy