IJPL-215077 migrate CE/DS/PCC products to DSL to fix xi-include resolve without complicating build scripts

GitOrigin-RevId: cc9030aad002c6034c0ebb5e001cb85ac5420302
This commit is contained in:
Vladimir Krivosheev
2025-11-02 09:25:11 +00:00
committed by intellij-monorepo-bot
parent ce3eb1c360
commit 5b64cc6221
7 changed files with 271 additions and 131 deletions
@@ -9,6 +9,8 @@ import org.jetbrains.intellij.build.impl.qodana.QodanaProductProperties
import org.jetbrains.intellij.build.io.copyFileToDir
import org.jetbrains.intellij.build.productLayout.CommunityModuleSets
import org.jetbrains.intellij.build.productLayout.ModuleSetProvider
import org.jetbrains.intellij.build.productLayout.ProductModulesContentSpec
import org.jetbrains.intellij.build.productLayout.productModules
import java.nio.file.Files
import java.nio.file.Path
@@ -51,6 +53,27 @@ open class PyCharmCommunityProperties(protected val communityHome: Path) : PyCha
override val moduleSetsProviders: List<ModuleSetProvider>
get() = listOf(CommunityModuleSets)
override fun getProductContentDescriptor(): ProductModulesContentSpec = productModules {
// Module capability aliases
alias("com.intellij.modules.pycharm.community")
alias("com.intellij.modules.python-core-capable")
alias("com.intellij.platform.ide.provisioner")
// Content modules
module("intellij.platform.ide.newUiOnboarding")
module("intellij.ide.startup.importSettings")
module("intellij.platform.tips")
// Module sets
moduleSet(CommunityModuleSets.ideCommon())
moduleSet(CommunityModuleSets.rdCommon())
// Static includes
deprecatedInclude("intellij.platform.extended.community.impl", "META-INF/community-extensions.xml", ultimateOnly = true)
deprecatedInclude("intellij.pycharm.community", "META-INF/pycharm-core.xml")
deprecatedInclude("intellij.pycharm.community", "META-INF/pycharm-core-customization.xml")
}
override suspend fun copyAdditionalFiles(context: BuildContext, targetDir: Path) {
super.copyAdditionalFiles(context, targetDir)
@@ -59,8 +82,9 @@ open class PyCharmCommunityProperties(protected val communityHome: Path) : PyCha
copyFileToDir(context.paths.communityHomeDir.resolve("NOTICE.txt"), licenseTargetDir)
}
override fun getSystemSelector(appInfo: ApplicationInfoProperties, buildNumber: String): String =
"PyCharmCE${appInfo.majorVersion}.${appInfo.minorVersionMainPart}"
override fun getSystemSelector(appInfo: ApplicationInfoProperties, buildNumber: String): String {
return "PyCharmCE${appInfo.majorVersion}.${appInfo.minorVersionMainPart}"
}
override fun getBaseArtifactName(appInfo: ApplicationInfoProperties, buildNumber: String): String = "pycharmPC-$buildNumber"
@@ -79,24 +103,28 @@ open class PyCharmCommunityProperties(protected val communityHome: Path) : PyCha
PyCharmBuildUtils.copySkeletons(context, targetDir, "skeletons-win*.zip")
}
override fun getUninstallFeedbackPageUrl(appInfo: ApplicationInfoProperties): String =
"https://www.jetbrains.com/pycharm/uninstall/?version=${appInfo.productCode}-${appInfo.majorVersion}.${appInfo.minorVersion}"
override fun getUninstallFeedbackPageUrl(appInfo: ApplicationInfoProperties): String {
return "https://www.jetbrains.com/pycharm/uninstall/?version=${appInfo.productCode}-${appInfo.majorVersion}.${appInfo.minorVersion}"
}
}
override fun createMacCustomizer(projectHome: String): MacDistributionCustomizer = PyCharmMacDistributionCustomizer(communityHome)
override fun createLinuxCustomizer(projectHome: String): LinuxDistributionCustomizer = object : LinuxDistributionCustomizer() {
init {
iconPngPath = "${communityHome}/python/build/resources/PyCharmCore128.png"
iconPngPathForEAP = "${communityHome}/python/build/resources/PyCharmCore128_EAP.png"
snapName = "pycharm-community"
snapDescription =
"Python IDE for professional developers. Save time while PyCharm takes care of the routine. " +
"Focus on bigger things and embrace the keyboard-centric approach to get the most of PyCharm’s many productivity features."
}
override fun createLinuxCustomizer(projectHome: String): LinuxDistributionCustomizer {
return object : LinuxDistributionCustomizer() {
init {
iconPngPath = "${communityHome}/python/build/resources/PyCharmCore128.png"
iconPngPathForEAP = "${communityHome}/python/build/resources/PyCharmCore128_EAP.png"
snapName = "pycharm-community"
snapDescription =
"Python IDE for professional developers. Save time while PyCharm takes care of the routine. " +
"Focus on bigger things and embrace the keyboard-centric approach to get the most of PyCharm’s many productivity features."
}
override fun getRootDirectoryName(appInfo: ApplicationInfoProperties, buildNumber: String): String =
"pycharm-community-${if (appInfo.isEAP) buildNumber else appInfo.fullVersion}"
override fun getRootDirectoryName(appInfo: ApplicationInfoProperties, buildNumber: String): String {
return "pycharm-community-${if (appInfo.isEAP) buildNumber else appInfo.fullVersion}"
}
}
}
override fun getOutputDirectoryName(appInfo: ApplicationInfoProperties): String = "pycharm-ce"