From e853f28e940fb535eab87ce4d5d01ffa93665bd2 Mon Sep 17 00:00:00 2001 From: nik Date: Wed, 3 Apr 2019 09:29:05 +0300 Subject: [PATCH] build scripts: provide common option to enable injection of URL of custom plugins repository to ApplicationInfo.xml Replace 'intellij.build.prepare.plugin.repository' system property which is used in IDEA only by the common 'intellij.build.use.teamcity.as.plugins.repository' property so we can enable builtin plugin repository in nightly build of other IDEs as well. Also the new property enables only adding reference to TeamCity artifacts into the product, the custom repository xml file is always generated in TeamCity artifacts so it can be used manually even for public builds. --- .../org/jetbrains/intellij/build/ArtifactsServer.groovy | 4 ++++ .../org/jetbrains/intellij/build/ProductModulesLayout.groovy | 4 +++- .../org/jetbrains/intellij/build/ProprietaryBuildTools.groovy | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/platform/build-scripts/groovy/org/jetbrains/intellij/build/ArtifactsServer.groovy b/platform/build-scripts/groovy/org/jetbrains/intellij/build/ArtifactsServer.groovy index fff8f4531936..0a45ae0eb9c5 100644 --- a/platform/build-scripts/groovy/org/jetbrains/intellij/build/ArtifactsServer.groovy +++ b/platform/build-scripts/groovy/org/jetbrains/intellij/build/ArtifactsServer.groovy @@ -19,5 +19,9 @@ import groovy.transform.CompileStatic @CompileStatic interface ArtifactsServer { + /** + * Returns full URL which can be used to download an artifact. + * @param relativePath path to an artifact from {@link org.jetbrains.intellij.build.BuildPaths#artifacts} directory + */ String urlToArtifact(String relativePath) } \ No newline at end of file diff --git a/platform/build-scripts/groovy/org/jetbrains/intellij/build/ProductModulesLayout.groovy b/platform/build-scripts/groovy/org/jetbrains/intellij/build/ProductModulesLayout.groovy index c201d7a8e728..a84b3e12ecc0 100644 --- a/platform/build-scripts/groovy/org/jetbrains/intellij/build/ProductModulesLayout.groovy +++ b/platform/build-scripts/groovy/org/jetbrains/intellij/build/ProductModulesLayout.groovy @@ -143,7 +143,9 @@ class ProductModulesLayout { /** * If {@code true} a special xml descriptor in custom plugin repository format will be generated for {@link #setPluginModulesToPublish} plugins. - * This descriptor and the plugin *.zip files need to be uploaded to the URL specified in 'plugins@builtin-url' attribute in *ApplicationInfo.xml file. + * This descriptor and the plugin *.zip files can be uploaded to the URL specified in 'plugins@builtin-url' attribute in *ApplicationInfo.xml file + * to allow installing custom plugins directly from IDE. If {@link ProprietaryBuildTools#artifactsServer} is specified, {@code __BUILTIN_PLUGINS_URL__} in + * *ApplicationInfo.xml file will be automatically replaced by the plugin repository URL provided by the artifact server. * * @see #setPluginModulesToPublish * @see #setPluginPublishingSpec diff --git a/platform/build-scripts/groovy/org/jetbrains/intellij/build/ProprietaryBuildTools.groovy b/platform/build-scripts/groovy/org/jetbrains/intellij/build/ProprietaryBuildTools.groovy index d388e622c3d7..f05bfd5c007a 100644 --- a/platform/build-scripts/groovy/org/jetbrains/intellij/build/ProprietaryBuildTools.groovy +++ b/platform/build-scripts/groovy/org/jetbrains/intellij/build/ProprietaryBuildTools.groovy @@ -45,7 +45,7 @@ class ProprietaryBuildTools { MacHostProperties macHostProperties /** - * Describes a server that can be used to download built artifacts + * Describes a server that can be used to download built artifacts to install plugins into IDE */ ArtifactsServer artifactsServer } \ No newline at end of file