Pill: Disable Kotlin IDE plugin artifact building if not in cooperative mode
This commit is contained in:
committed by
TeamCityServer
parent
5627bbb535
commit
099a44283f
@@ -29,7 +29,9 @@ fun runPillTask(taskName: String) {
|
|||||||
|
|
||||||
val platformDir = IntellijRootUtils.getIntellijRootDir(project)
|
val platformDir = IntellijRootUtils.getIntellijRootDir(project)
|
||||||
val resourcesDir = File(project.projectDir, "resources")
|
val resourcesDir = File(project.projectDir, "resources")
|
||||||
runMethod.invoke(null, project.rootProject, taskName, platformDir, resourcesDir)
|
val isIdePluginAttached = project.rootProject.intellijSdkVersionForIde() != null
|
||||||
|
|
||||||
|
runMethod.invoke(null, project.rootProject, taskName, platformDir, resourcesDir, isIdePluginAttached)
|
||||||
}
|
}
|
||||||
|
|
||||||
val jar: Jar by tasks
|
val jar: Jar by tasks
|
||||||
|
|||||||
@@ -27,7 +27,12 @@ import kotlin.collections.HashMap
|
|||||||
|
|
||||||
const val EMBEDDED_CONFIGURATION_NAME = "embedded"
|
const val EMBEDDED_CONFIGURATION_NAME = "embedded"
|
||||||
|
|
||||||
class JpsCompatiblePluginTasks(private val rootProject: Project, private val platformDir: File, private val resourcesDir: File) {
|
class JpsCompatiblePluginTasks(
|
||||||
|
private val rootProject: Project,
|
||||||
|
private val platformDir: File,
|
||||||
|
private val resourcesDir: File,
|
||||||
|
private val isIdePluginAttached: Boolean
|
||||||
|
) {
|
||||||
companion object {
|
companion object {
|
||||||
private val DIST_LIBRARIES = listOf(
|
private val DIST_LIBRARIES = listOf(
|
||||||
":kotlin-annotations-jvm",
|
":kotlin-annotations-jvm",
|
||||||
@@ -111,7 +116,7 @@ class JpsCompatiblePluginTasks(private val rootProject: Project, private val pla
|
|||||||
removeJpsAndPillRunConfigurations()
|
removeJpsAndPillRunConfigurations()
|
||||||
removeArtifactConfigurations()
|
removeArtifactConfigurations()
|
||||||
|
|
||||||
if (variant.includes.contains(PillExtensionMirror.Variant.BASE)) {
|
if (isIdePluginAttached && variant.includes.contains(PillExtensionMirror.Variant.BASE)) {
|
||||||
val artifactDependencyMapper = object : ArtifactDependencyMapper {
|
val artifactDependencyMapper = object : ArtifactDependencyMapper {
|
||||||
override fun map(dependency: PDependency): List<PDependency> {
|
override fun map(dependency: PDependency): List<PDependency> {
|
||||||
val result = mutableListOf<PDependency>()
|
val result = mutableListOf<PDependency>()
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ object PillImporter {
|
|||||||
)
|
)
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun run(rootProject: Project, taskName: String, platformDir: File, resourcesDir: File) {
|
fun run(rootProject: Project, taskName: String, platformDir: File, resourcesDir: File, isIdePluginAttached: Boolean) {
|
||||||
val tasks = JpsCompatiblePluginTasks(rootProject, platformDir, resourcesDir)
|
val tasks = JpsCompatiblePluginTasks(rootProject, platformDir, resourcesDir, isIdePluginAttached)
|
||||||
val task = TASKS[taskName] ?: error("Unknown task $taskName, available tasks: " + TASKS.keys.joinToString())
|
val task = TASKS[taskName] ?: error("Unknown task $taskName, available tasks: " + TASKS.keys.joinToString())
|
||||||
task(tasks)
|
task(tasks)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user