mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
build scripts: allow products to specify several root module to build searchable index (because e.g. AppCode doesn't have single main module)
This commit is contained in:
@@ -17,9 +17,6 @@ package org.jetbrains.intellij.build
|
||||
|
||||
import groovy.transform.CompileDynamic
|
||||
import groovy.transform.CompileStatic
|
||||
import org.jetbrains.intellij.build.impl.PlatformLayout
|
||||
|
||||
import java.util.function.Consumer
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
@@ -41,7 +38,7 @@ class IdeaCommunityProperties extends BaseIdeaProperties {
|
||||
["jps-model-impl", "jps-model-serialization"]
|
||||
productLayout.additionalPlatformJars.put("resources.jar", "community-resources")
|
||||
productLayout.bundledPluginModules = BUNDLED_PLUGIN_MODULES
|
||||
productLayout.mainModule = "community-main"
|
||||
productLayout.mainModules = ["community-main"]
|
||||
productLayout.allNonTrivialPlugins = CommunityRepositoryModules.COMMUNITY_REPOSITORY_PLUGINS + [
|
||||
CommunityRepositoryModules.androidPlugin([:]),
|
||||
CommunityRepositoryModules.groovyPlugin([])
|
||||
|
||||
@@ -86,10 +86,12 @@ class ProductModulesLayout {
|
||||
* Additional customizations of platform JARs. <strong>This is a temporary property added to keep layout of some products.</strong>
|
||||
*/
|
||||
Consumer<PlatformLayout> platformLayoutCustomizer = {} as Consumer<PlatformLayout>
|
||||
|
||||
/**
|
||||
* Name of the module which classpath will be used to build searchable options index
|
||||
* Names of the modules which classpath will be used to build searchable options index <br>
|
||||
* //todo[nik] get rid of this property and automatically include all platform and plugin modules to the classpath when building searchable options index
|
||||
*/
|
||||
String mainModule
|
||||
List<String> mainModules = []
|
||||
|
||||
/**
|
||||
* Name of the module containing search/searchableOptions.xml file.
|
||||
|
||||
@@ -340,7 +340,7 @@ idea.fatal.error.notification=disabled
|
||||
checkModules(layout.platformApiModules, "productProperties.productLayout.platformApiModules")
|
||||
checkModules(layout.platformImplementationModules, "productProperties.productLayout.platformImplementationModules")
|
||||
checkModules(layout.additionalPlatformJars.values(), "productProperties.productLayout.additionalPlatformJars")
|
||||
checkModules([layout.mainModule], "productProperties.productLayout.mainModule")
|
||||
checkModules(layout.mainModules, "productProperties.productLayout.mainModules")
|
||||
checkProjectLibraries(layout.projectLibrariesToUnpackIntoMainJar, "productProperties.productLayout.projectLibrariesToUnpackIntoMainJar")
|
||||
nonTrivialPlugins.findAll {layout.enabledPluginModules.contains(it.mainModule)}.each { plugin ->
|
||||
checkModules(plugin.moduleJars.values(), "'$plugin.mainModule' plugin")
|
||||
|
||||
@@ -131,7 +131,7 @@ class DistributionJARsBuilder {
|
||||
List<String> getPlatformModules() {
|
||||
(platform.moduleJars.values() as List<String>) +
|
||||
["java-runtime", "platform-main", /*required to build searchable options index*/
|
||||
"updater", buildContext.productProperties.productLayout.mainModule]
|
||||
"updater"] + buildContext.productProperties.productLayout.mainModules
|
||||
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ class DistributionJARsBuilder {
|
||||
|
||||
//todo[nik] move buildSearchableOptions and patchedApplicationInfo methods to this class
|
||||
def buildTasks = new BuildTasksImpl(buildContext)
|
||||
buildTasks.buildSearchableOptions(searchableOptionsDir, [productLayout.mainModule], productLayout.licenseFilesToBuildSearchableOptions)
|
||||
buildTasks.buildSearchableOptions(searchableOptionsDir, productLayout.mainModules, productLayout.licenseFilesToBuildSearchableOptions)
|
||||
if (!buildContext.options.buildStepsToSkip.contains(BuildOptions.SEARCHABLE_OPTIONS_INDEX_STEP)) {
|
||||
layoutBuilder.patchModuleOutput(productLayout.searchableOptionsModule, FileUtil.toSystemIndependentName(searchableOptionsDir.absolutePath))
|
||||
}
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ class PyCharmCommunityProperties extends PyCharmPropertiesBase {
|
||||
"python-ide-community", "python-community-configure", "python-openapi", "python-psi-api", "platform-main"
|
||||
]
|
||||
productLayout.bundledPluginModules = new File("$communityHome/python/build/plugin-list.txt").readLines()
|
||||
productLayout.mainModule = "main_pycharm_ce"
|
||||
productLayout.mainModules = ["main_pycharm_ce"]
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ class PyCharmEduProperties extends PyCharmPropertiesBase {
|
||||
applicationInfoModule = "educational-python"
|
||||
brandingResourcePaths = ["$pythonCommunityPath/educational-python/resources"]
|
||||
|
||||
productLayout.mainModule = "main_pycharm_edu"
|
||||
productLayout.mainModules = ["main_pycharm_edu"]
|
||||
productLayout.platformApiModules = CommunityRepositoryModules.PLATFORM_API_MODULES + ["dom-openapi"]
|
||||
productLayout.platformImplementationModules = CommunityRepositoryModules.PLATFORM_IMPLEMENTATION_MODULES + [
|
||||
"dom-impl", "python-community", "python-community-ide-resources",
|
||||
|
||||
Reference in New Issue
Block a user