diff --git a/build/jvm-rules/dependency-graph/resources/intellij.platform.jps.build.dependencyGraph.xml b/build/jvm-rules/dependency-graph/resources/intellij.platform.jps.build.dependencyGraph.xml new file mode 100644 index 000000000000..92407ffc94cd --- /dev/null +++ b/build/jvm-rules/dependency-graph/resources/intellij.platform.jps.build.dependencyGraph.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/build/jvm-rules/jps-builders-6/resources/intellij.platform.jps.build.javac.rt.xml b/build/jvm-rules/jps-builders-6/resources/intellij.platform.jps.build.javac.rt.xml new file mode 100644 index 000000000000..b8b154cf012e --- /dev/null +++ b/build/jvm-rules/jps-builders-6/resources/intellij.platform.jps.build.javac.rt.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/java/compiler/forms-compiler/BUILD.bazel b/java/compiler/forms-compiler/BUILD.bazel index 2f3864170d87..1ff4bba033ea 100644 --- a/java/compiler/forms-compiler/BUILD.bazel +++ b/java/compiler/forms-compiler/BUILD.bazel @@ -1,11 +1,18 @@ ### auto-generated section `build intellij.java.guiForms.compiler` start -load("@rules_jvm//:jvm.bzl", "jvm_library") +load("@rules_jvm//:jvm.bzl", "jvm_library", "resourcegroup") + +resourcegroup( + name = "java-guiForms-compiler_resources", + srcs = glob(["resources/**/*"]), + strip_prefix = "resources" +) jvm_library( name = "java-guiForms-compiler", module_name = "intellij.java.guiForms.compiler", visibility = ["//visibility:public"], srcs = glob(["src/**/*.kt", "src/**/*.java", "src/**/*.form"], allow_empty = True), + resources = [":java-guiForms-compiler_resources"], kotlinc_opts = "@community//:k8", deps = [ "//platform/util/jdom", diff --git a/java/compiler/forms-compiler/intellij.java.guiForms.compiler.iml b/java/compiler/forms-compiler/intellij.java.guiForms.compiler.iml index 23a6329e3383..83e4b46295c0 100644 --- a/java/compiler/forms-compiler/intellij.java.guiForms.compiler.iml +++ b/java/compiler/forms-compiler/intellij.java.guiForms.compiler.iml @@ -5,6 +5,7 @@ + diff --git a/java/compiler/forms-compiler/resources/intellij.java.guiForms.compiler.xml b/java/compiler/forms-compiler/resources/intellij.java.guiForms.compiler.xml new file mode 100644 index 000000000000..77531f851bc9 --- /dev/null +++ b/java/compiler/forms-compiler/resources/intellij.java.guiForms.compiler.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/java/compiler/impl/resources/intellij.java.compiler.impl.xml b/java/compiler/impl/resources/intellij.java.compiler.impl.xml index 87595a0e1691..ba223efec149 100644 --- a/java/compiler/impl/resources/intellij.java.compiler.impl.xml +++ b/java/compiler/impl/resources/intellij.java.compiler.impl.xml @@ -21,6 +21,10 @@ + + + + diff --git a/java/compiler/instrumentation-util-8/BUILD.bazel b/java/compiler/instrumentation-util-8/BUILD.bazel index 3bf50cc15050..adeef075debc 100644 --- a/java/compiler/instrumentation-util-8/BUILD.bazel +++ b/java/compiler/instrumentation-util-8/BUILD.bazel @@ -1,11 +1,18 @@ ### auto-generated section `build intellij.java.compiler.instrumentationUtil.java8` start -load("@rules_jvm//:jvm.bzl", "jvm_library") +load("@rules_jvm//:jvm.bzl", "jvm_library", "resourcegroup") + +resourcegroup( + name = "java-compiler-instrumentationUtil-java8_resources", + srcs = glob(["resources/**/*"]), + strip_prefix = "resources" +) jvm_library( name = "java-compiler-instrumentationUtil-java8", module_name = "intellij.java.compiler.instrumentationUtil.java8", visibility = ["//visibility:public"], srcs = glob(["src/**/*.kt", "src/**/*.java", "src/**/*.form"], allow_empty = True), + resources = [":java-compiler-instrumentationUtil-java8_resources"], kotlinc_opts = "@community//:k8", deps = ["//java/compiler/instrumentation-util"] ) diff --git a/java/compiler/instrumentation-util-8/intellij.java.compiler.instrumentationUtil.java8.iml b/java/compiler/instrumentation-util-8/intellij.java.compiler.instrumentationUtil.java8.iml index d0c58d098d4c..943e5978eb0f 100644 --- a/java/compiler/instrumentation-util-8/intellij.java.compiler.instrumentationUtil.java8.iml +++ b/java/compiler/instrumentation-util-8/intellij.java.compiler.instrumentationUtil.java8.iml @@ -3,6 +3,7 @@ + diff --git a/java/compiler/instrumentation-util-8/resources/intellij.java.compiler.instrumentationUtil.java8.xml b/java/compiler/instrumentation-util-8/resources/intellij.java.compiler.instrumentationUtil.java8.xml new file mode 100644 index 000000000000..7aefb7ac3768 --- /dev/null +++ b/java/compiler/instrumentation-util-8/resources/intellij.java.compiler.instrumentationUtil.java8.xml @@ -0,0 +1,4 @@ + + + + diff --git a/java/compiler/instrumentation-util/BUILD.bazel b/java/compiler/instrumentation-util/BUILD.bazel index 49c7aea25c6f..9f802a1710b4 100644 --- a/java/compiler/instrumentation-util/BUILD.bazel +++ b/java/compiler/instrumentation-util/BUILD.bazel @@ -1,11 +1,18 @@ ### auto-generated section `build intellij.java.compiler.instrumentationUtil` start -load("@rules_jvm//:jvm.bzl", "jvm_library") +load("@rules_jvm//:jvm.bzl", "jvm_library", "resourcegroup") + +resourcegroup( + name = "instrumentation-util_resources", + srcs = glob(["resources/**/*"]), + strip_prefix = "resources" +) jvm_library( name = "instrumentation-util", module_name = "intellij.java.compiler.instrumentationUtil", visibility = ["//visibility:public"], srcs = glob(["src/**/*.kt", "src/**/*.java", "src/**/*.form"], allow_empty = True), + resources = [":instrumentation-util_resources"], kotlinc_opts = "@community//:k8", deps = ["//libraries/asm"] ) diff --git a/java/compiler/instrumentation-util/intellij.java.compiler.instrumentationUtil.iml b/java/compiler/instrumentation-util/intellij.java.compiler.instrumentationUtil.iml index 46d24f662ad8..a152a327b458 100644 --- a/java/compiler/instrumentation-util/intellij.java.compiler.instrumentationUtil.iml +++ b/java/compiler/instrumentation-util/intellij.java.compiler.instrumentationUtil.iml @@ -3,6 +3,7 @@ + diff --git a/java/compiler/instrumentation-util/resources/intellij.java.compiler.instrumentationUtil.xml b/java/compiler/instrumentation-util/resources/intellij.java.compiler.instrumentationUtil.xml new file mode 100644 index 000000000000..6628b4c14d6b --- /dev/null +++ b/java/compiler/instrumentation-util/resources/intellij.java.compiler.instrumentationUtil.xml @@ -0,0 +1,4 @@ + + + + diff --git a/java/compiler/javac2/BUILD.bazel b/java/compiler/javac2/BUILD.bazel index df3aa37d446d..9dfaac065e35 100644 --- a/java/compiler/javac2/BUILD.bazel +++ b/java/compiler/javac2/BUILD.bazel @@ -1,11 +1,18 @@ ### auto-generated section `build intellij.java.compiler.antTasks` start -load("@rules_jvm//:jvm.bzl", "jvm_library") +load("@rules_jvm//:jvm.bzl", "jvm_library", "resourcegroup") + +resourcegroup( + name = "java-compiler-antTasks_resources", + srcs = glob(["resources/**/*"]), + strip_prefix = "resources" +) jvm_library( name = "java-compiler-antTasks", module_name = "intellij.java.compiler.antTasks", visibility = ["//visibility:public"], srcs = glob(["src/**/*.kt", "src/**/*.java", "src/**/*.form"], allow_empty = True), + resources = [":java-compiler-antTasks_resources"], kotlinc_opts = "@community//:k8", deps = [ "@lib//ant/lib:ant-provided", diff --git a/java/compiler/javac2/intellij.java.compiler.antTasks.iml b/java/compiler/javac2/intellij.java.compiler.antTasks.iml index b7e6f7c24e2c..b0b7b700cf22 100644 --- a/java/compiler/javac2/intellij.java.compiler.antTasks.iml +++ b/java/compiler/javac2/intellij.java.compiler.antTasks.iml @@ -3,6 +3,7 @@ + diff --git a/java/compiler/javac2/resources/intellij.java.compiler.antTasks.xml b/java/compiler/javac2/resources/intellij.java.compiler.antTasks.xml new file mode 100644 index 000000000000..6628b4c14d6b --- /dev/null +++ b/java/compiler/javac2/resources/intellij.java.compiler.antTasks.xml @@ -0,0 +1,4 @@ + + + + diff --git a/java/debugger/impl/resources/intellij.java.debugger.impl.xml b/java/debugger/impl/resources/intellij.java.debugger.impl.xml index 92c2ae5a3041..6f1cfc1bb77c 100644 --- a/java/debugger/impl/resources/intellij.java.debugger.impl.xml +++ b/java/debugger/impl/resources/intellij.java.debugger.impl.xml @@ -13,6 +13,7 @@ + diff --git a/java/java-backend/resources/intellij.java.backend.xml b/java/java-backend/resources/intellij.java.backend.xml index 4c18e813b66e..3f9491c1bc20 100644 --- a/java/java-backend/resources/intellij.java.backend.xml +++ b/java/java-backend/resources/intellij.java.backend.xml @@ -60,6 +60,8 @@ + + diff --git a/java/langInjection/jps/resources/intellij.java.langInjection.jps.xml b/java/langInjection/jps/resources/intellij.java.langInjection.jps.xml index e547a22cd81d..733f14b949f9 100644 --- a/java/langInjection/jps/resources/intellij.java.langInjection.jps.xml +++ b/java/langInjection/jps/resources/intellij.java.langInjection.jps.xml @@ -2,6 +2,9 @@ + + + diff --git a/java/plugin/plugin-content.yaml b/java/plugin/plugin-content.yaml index 2d6990ea08f7..2d73efabf645 100644 --- a/java/plugin/plugin-content.yaml +++ b/java/plugin/plugin-content.yaml @@ -18,29 +18,19 @@ - name: intellij.java.psi - name: intellij.java.psi.impl - name: intellij.java.frontback.impl - - name: intellij.java.debugger.impl.shared - - name: intellij.java.execution.impl.shared -- name: lib/javac2.jar - modules: - - name: intellij.java.compiler.antTasks + - name: intellij.platform.jps.build.dependencyGraph + - name: intellij.platform.jps.build.javac.rt - name: intellij.java.guiForms.compiler + - name: intellij.java.compiler.antTasks - name: intellij.java.compiler.instrumentationUtil - name: intellij.java.compiler.instrumentationUtil.java8 + - name: intellij.java.debugger.impl.shared + - name: intellij.java.execution.impl.shared - name: lib/jb-jdi.jar library: jb-jdi files: - name: $MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/jb-jdi/2/jb-jdi-2.jar reason: withProjectLibrary -- name: lib/jps-builders-6.jar - modules: - - name: intellij.platform.jps.build.javac.rt -- name: lib/jps-builders.jar - modules: - - name: intellij.platform.jps.build - libraries: - qdox-java-parser: - - name: $MAVEN_REPOSITORY$/com/thoughtworks/qdox/qdox/2/qdox-2.jar - - name: intellij.platform.jps.build.dependencyGraph - name: lib/jps-javac-extension.jar library: jps-javac-extension files: @@ -232,6 +222,12 @@ - name: lib/modules/intellij.jvm.dfa.analysis.ui.jar contentModules: - name: intellij.jvm.dfa.analysis.ui +- name: lib/modules/intellij.platform.jps.build.jar + contentModules: + - name: intellij.platform.jps.build + libraries: + qdox-java-parser: + - name: $MAVEN_REPOSITORY$/com/thoughtworks/qdox/qdox/2/qdox-2.jar - name: lib/modules/intellij.platform.uast.ide.jar contentModules: - name: intellij.platform.uast.ide diff --git a/java/plugin/resources/META-INF/plugin.xml b/java/plugin/resources/META-INF/plugin.xml index baffb7e60dea..34ab3bf2e276 100644 --- a/java/plugin/resources/META-INF/plugin.xml +++ b/java/plugin/resources/META-INF/plugin.xml @@ -12,10 +12,6 @@ - - - - @@ -37,7 +33,7 @@ - + @@ -64,7 +60,15 @@ - + + + + + + + + + diff --git a/jps/jps-builders/resources/intellij.platform.jps.build.xml b/jps/jps-builders/resources/intellij.platform.jps.build.xml new file mode 100644 index 000000000000..bf7b65ef4a25 --- /dev/null +++ b/jps/jps-builders/resources/intellij.platform.jps.build.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/JavaPluginLayout.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/JavaPluginLayout.kt index e09384b9df2e..1a5958663974 100644 --- a/platform/build-scripts/src/org/jetbrains/intellij/build/JavaPluginLayout.kt +++ b/platform/build-scripts/src/org/jetbrains/intellij/build/JavaPluginLayout.kt @@ -14,22 +14,6 @@ object JavaPluginLayout { spec.withProjectLibrary("netty-jps", "rt/netty-jps.jar") spec.withModule("intellij.platform.jps.build.launcher", "jps-launcher.jar") - for (moduleName in listOf( - "intellij.platform.jps.build", - "intellij.platform.jps.build.dependencyGraph", - )) { - spec.withModule(moduleName, "jps-builders.jar") - } - spec.withModule("intellij.platform.jps.build.javac.rt", "jps-builders-6.jar") - - for (moduleName in listOf( - "intellij.java.compiler.antTasks", - "intellij.java.guiForms.compiler", - "intellij.java.compiler.instrumentationUtil", - "intellij.java.compiler.instrumentationUtil.java8" - )) { - spec.withModule(moduleName, "javac2.jar") - } spec.withModuleLibrary("debugger-agent", "intellij.java.debugger.agent.holder", "rt") diff --git a/platform/core-impl/src/com/intellij/ide/plugins/ProductPluginInitContext.kt b/platform/core-impl/src/com/intellij/ide/plugins/ProductPluginInitContext.kt index ca4688038b7f..fec99a365010 100644 --- a/platform/core-impl/src/com/intellij/ide/plugins/ProductPluginInitContext.kt +++ b/platform/core-impl/src/com/intellij/ide/plugins/ProductPluginInitContext.kt @@ -83,13 +83,14 @@ class ProductPluginInitContext( val frontend = PluginModuleId("intellij.platform.frontend", PluginModuleId.JETBRAINS_NAMESPACE) val backend = PluginModuleId("intellij.platform.backend", PluginModuleId.JETBRAINS_NAMESPACE) val backendJps = PluginModuleId("intellij.platform.jps.build", PluginModuleId.JETBRAINS_NAMESPACE) + val backendJpsGraph = PluginModuleId("intellij.platform.jps.build.dependencyGraph", PluginModuleId.JETBRAINS_NAMESPACE) for (moduleId in listOf(frontend, backend, frontendSplit)) { val isAvailable = when (productModeId) { /** intellij.platform.backend.split is currently available in 'monolith' mode because it's used as a backend in CodeWithMe */ "monolith" -> moduleId != frontendSplit "backend" -> moduleId != frontend && moduleId != frontendSplit - "frontend" -> moduleId != backend && moduleId != backendJps + "frontend" -> moduleId != backend && moduleId != backendJps && moduleId != backendJpsGraph else -> true } val unavailabilityReason = diff --git a/platform/runtime/product/src/impl/ProductModeLoadingRules.java b/platform/runtime/product/src/impl/ProductModeLoadingRules.java index 0deb5aa9f32f..f1b573081486 100644 --- a/platform/runtime/product/src/impl/ProductModeLoadingRules.java +++ b/platform/runtime/product/src/impl/ProductModeLoadingRules.java @@ -26,7 +26,8 @@ public final class ProductModeLoadingRules { public static @NotNull List getIncompatibleRootModules(@NotNull ProductMode mode) { if (mode.equals(FRONTEND)) { return List.of(RuntimeModuleId.module("intellij.platform.backend"), - RuntimeModuleId.module("intellij.platform.jps.build")); + RuntimeModuleId.module("intellij.platform.jps.build"), + RuntimeModuleId.module("intellij.platform.jps.build.dependencyGraph")); } else if (mode.equals(MONOLITH)) { //currently we use the same modules in 'backend' and 'monolith' modes, in the future we may disable some UI-only modules in 'backend' mode