From f9bdb109f4b7c86acfe10301869cb413598df2f9 Mon Sep 17 00:00:00 2001 From: Alexandr Evstigneev Date: Sat, 19 Oct 2024 14:56:04 +0400 Subject: [PATCH] Migrated to the gradle plugin 2.2-SNAPSHOT bundledModule are necessary to workaround current bugs --- build.gradle.kts | 8 +++++++- plugin/build.gradle.kts | 10 ++++++++++ plugin/coverage/build.gradle.kts | 1 + plugin/profiler/build.gradle.kts | 1 + .../java/base/PerlInstrumentationTestCase.java | 15 +++++++-------- 5 files changed, 26 insertions(+), 9 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 15883ab3d6..34440807d6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -34,7 +34,7 @@ buildscript { plugins { id("idea") id("jacoco") - id("org.jetbrains.intellij.platform") version "2.0.1" + id("org.jetbrains.intellij.platform") version "2.2.0-SNAPSHOT" id("org.jetbrains.grammarkit") version "2022.3.2.2" id("com.github.kt3k.coveralls") version "2.12.2" id("org.sonarqube") version "6.0.1.5171" @@ -200,9 +200,15 @@ allprojects { buildSearchableOptions { enabled = false } + prepareJarSearchableOptions { + enabled = false + } verifyPlugin { enabled = false } + verifyPluginProjectConfiguration { + enabled = false + } publishPlugin { enabled = false } diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index 4a3af2f54a..5b2586c0c7 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -83,6 +83,7 @@ dependencies { } + tasks { buildPlugin { archiveBaseName.set("lang.perl5") @@ -94,4 +95,13 @@ tasks { intoChild(intellijPlatform.projectName.map { projectName -> "$projectName/perl" }) .from(file("scripts")) } + + test { + dependencies { + intellijPlatform { + bundledModule("intellij.platform.coverage.agent") + bundledModule("intellij.profiler.common") + } + } + } } diff --git a/plugin/coverage/build.gradle.kts b/plugin/coverage/build.gradle.kts index 610ee21c85..40aafc18f7 100644 --- a/plugin/coverage/build.gradle.kts +++ b/plugin/coverage/build.gradle.kts @@ -26,5 +26,6 @@ dependencies { val platformVersionProvider: Provider by rootProject.extra create("IC", platformVersionProvider.get(), useInstaller = providers.gradleProperty("useInstaller").get().toBoolean()) bundledPlugins(providers.gradleProperty("coveragePlugin").get()) + bundledModule("intellij.platform.coverage.agent") } } diff --git a/plugin/profiler/build.gradle.kts b/plugin/profiler/build.gradle.kts index 3ead87c53a..5a68166018 100644 --- a/plugin/profiler/build.gradle.kts +++ b/plugin/profiler/build.gradle.kts @@ -26,6 +26,7 @@ dependencies { intellijPlatform { val platformVersionProvider: Provider by rootProject.extra create("IU", platformVersionProvider.get(), useInstaller = properties("useInstaller").get().toBoolean()) + bundledModule("intellij.profiler.common") } } diff --git a/plugin/src/testFixtures/java/base/PerlInstrumentationTestCase.java b/plugin/src/testFixtures/java/base/PerlInstrumentationTestCase.java index bb7857f04e..8ca92e07f3 100644 --- a/plugin/src/testFixtures/java/base/PerlInstrumentationTestCase.java +++ b/plugin/src/testFixtures/java/base/PerlInstrumentationTestCase.java @@ -30,14 +30,13 @@ @Category(Light.class) public abstract class PerlInstrumentationTestCase extends BasePlatformTestCase { - protected static final String PLUGIN_PATTERN_STRING = "/plugin/build/libs/plugin-.+?\\.jar!"; - // this is wrong, should be build/libs/lang\\.embedded-.+?\\.jar! - protected static final String EMBEDDED_PATTERN_STRING = "/embedded/core/build/libs/core-.+?\\.jar"; - protected static final String MOJO_PATTERN_STRING = "/mojo/core/build/libs/core-.+?\\.jar!"; - protected static final String TT2_PATTERN_STRING = "/tt2/core/build/libs/core-.+?\\.jar!"; - protected static final String MASON_FRAMEWORK_PATTERN_STRING = "/mason/framework/build/libs/lang\\.mason\\.framework-.+?\\.jar!"; - protected static final String MASON_PATTERN_STRING = "/mason/htmlmason/core/build/libs/core-.+?\\.jar!"; - protected static final String MASON2_PATTERN_STRING = "/mason/mason2/core/build/libs/core-.+?\\.jar!"; + protected static final String PLUGIN_PATTERN_STRING = "lib/plugin-.+?\\.jar!"; + protected static final String EMBEDDED_PATTERN_STRING = "lib/lang\\.embedded-.+?\\.jar"; + protected static final String MOJO_PATTERN_STRING = "lib/lang\\.mojo-.+?\\.jar!"; + protected static final String TT2_PATTERN_STRING = "lib/lang\\.tt2-.+?\\.jar!"; + protected static final String MASON_FRAMEWORK_PATTERN_STRING = "lib/lang.mason.framework-.+?\\.jar!"; + protected static final String MASON_PATTERN_STRING = "lib/lang.mason.htmlmason-.+?\\.jar!"; + protected static final String MASON2_PATTERN_STRING = "lib/lang.mason.mason2-.+?\\.jar!"; private final @NotNull Class myClass;