Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrated to the gradle plugin 2.2.0 #2926

Merged
merged 3 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 32 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.intellij.platform.gradle.Constants.Tasks.INSTRUMENT_CODE
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
import org.jetbrains.intellij.platform.gradle.tasks.InstrumentCodeTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.kt3k.gradle.plugin.coveralls.CoverallsTask

Expand Down Expand Up @@ -34,7 +36,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"
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"
Expand Down Expand Up @@ -124,6 +126,8 @@ allprojects {
maxHeapSize = "2048m"
outputs.upToDateWhen { false }

ignoreFailures = false

if (project.hasProperty("overwrite")) {
systemProperty("idea.tests.overwrite.data", "true")
}
Expand Down Expand Up @@ -200,13 +204,18 @@ allprojects {
buildSearchableOptions {
enabled = false
}
prepareJarSearchableOptions {
enabled = false
}
verifyPlugin {
enabled = false
}
verifyPluginProjectConfiguration {
enabled = false
}
publishPlugin {
enabled = false
}

}
if (isPlugin) {
publishPlugin {
Expand Down Expand Up @@ -244,14 +253,29 @@ tasks {
it.tasks.named<JacocoReport>("jacocoTestReport").map { task -> task.executionData }
})

executionData(File("coverage").walkTopDown().filter { it.extension == "exec" }.toList())
val files = File("coverage").walkTopDown().filter { it.extension == "exec" }.toList()

additionalSourceDirs.setFrom(allprojects.map {
it.sourceSets.main.map { sourceSet -> sourceSet.allSource.srcDirs }
})
sourceDirectories.setFrom(allprojects.map {
println("\nFound following coverage data files:")
files.sorted().forEach { println(it) }

executionData(files)

val sourcesDirs = allprojects.map {
it.sourceSets.main.map { sourceSet -> sourceSet.allSource.srcDirs }
})
}
println("\nFound following source dirs:")
sourcesDirs.flatMap { it.get().asSequence() }.sorted().forEach { println(it) }

additionalSourceDirs.setFrom(sourcesDirs)
sourceDirectories.setFrom(sourcesDirs)

val classDirs = allprojects.map {
it.tasks.named<InstrumentCodeTask>(INSTRUMENT_CODE).map { it -> it.outputDirectory }
}
println("\nFound following class dirs:")
classDirs.map { it.get().get().toString() }.sorted().forEach { println(it) }

classDirectories.from(classDirs)

reports {
html.required.set(true) // human readable
Expand Down
21 changes: 21 additions & 0 deletions embedded/src/test/java/unit/EmbeddedPerlTestEnvironmentTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright 2015-2024 Alexandr Evstigneev
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package unit

import base.PerlTestEnvironmentTestCase

class EmbeddedPerlTestEnvironmentTest : PerlTestEnvironmentTestCase()
76 changes: 76 additions & 0 deletions embedded/src/test/resources/plugins/pluginsList.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
ByteCodeViewer
Coverage
Git4Idea
HtmlTools
JUnit
PerforceDirectPlugin
Subversion
TestNG-J
com.intellij
com.intellij.completion.ml.ranking
com.intellij.configurationScript
com.intellij.copyright
com.intellij.dev
com.intellij.gradle
com.intellij.ja
com.intellij.java
com.intellij.java-i18n
com.intellij.java.ide
com.intellij.ko
com.intellij.llmInstaller
com.intellij.marketplace
com.intellij.marketplace.ml
com.intellij.ml.inline.completion
com.intellij.modules.json
com.intellij.platform.ide.provisioner
com.intellij.platform.images
com.intellij.plugins.eclipsekeymap
com.intellij.plugins.netbeanskeymap
com.intellij.plugins.visualstudiokeymap
com.intellij.properties
com.intellij.searcheverywhere.ml
com.intellij.settingsSync
com.intellij.tasks
com.intellij.tracing.ide
com.intellij.turboComplete
com.intellij.zh
com.jetbrains.codeWithMe
com.jetbrains.performancePlugin
com.jetbrains.performancePlugin.async
com.jetbrains.sh
com.jetbrains.station
com.perl5
com.perl5.lang.embedded
hg4idea
intellij.indexing.shared.core
intellij.platform.ijent.impl
intellij.webp
org.editorconfig.editorconfigjetbrains
org.intellij.groovy
org.intellij.intelliLang
org.intellij.plugins.markdown
org.intellij.qodana
org.jetbrains.debugger.streams
org.jetbrains.idea.eclipse
org.jetbrains.idea.gradle.dsl
org.jetbrains.idea.maven
org.jetbrains.idea.maven.model
org.jetbrains.idea.maven.server.api
org.jetbrains.idea.reposearch
org.jetbrains.java.decompiler
org.jetbrains.kotlin
org.jetbrains.plugins.emojipicker
org.jetbrains.plugins.github
org.jetbrains.plugins.gitlab
org.jetbrains.plugins.gradle
org.jetbrains.plugins.gradle.analysis
org.jetbrains.plugins.gradle.dependency.updater
org.jetbrains.plugins.gradle.maven
org.jetbrains.plugins.javaFX
org.jetbrains.plugins.terminal
org.jetbrains.plugins.textmate
org.jetbrains.plugins.yaml
org.jetbrains.security.package-checker
org.toml.lang
tanvd.grazi
training
23 changes: 23 additions & 0 deletions mason/htmlmason/src/test/java/unit/HtmlMasonTestEnvironmentTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2015-2024 Alexandr Evstigneev
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package unit

import base.PerlTestEnvironmentTestCase

class HtmlMasonTestEnvironmentTest : PerlTestEnvironmentTestCase() {
override fun getTestLibPath(): String = TEST_LIB_PATH_FROM_NESTED
}
77 changes: 77 additions & 0 deletions mason/htmlmason/src/test/resources/plugins/pluginsList.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
ByteCodeViewer
Coverage
Git4Idea
HtmlTools
JUnit
PerforceDirectPlugin
Subversion
TestNG-J
com.intellij
com.intellij.completion.ml.ranking
com.intellij.configurationScript
com.intellij.copyright
com.intellij.dev
com.intellij.gradle
com.intellij.ja
com.intellij.java
com.intellij.java-i18n
com.intellij.java.ide
com.intellij.ko
com.intellij.llmInstaller
com.intellij.marketplace
com.intellij.marketplace.ml
com.intellij.ml.inline.completion
com.intellij.modules.json
com.intellij.platform.ide.provisioner
com.intellij.platform.images
com.intellij.plugins.eclipsekeymap
com.intellij.plugins.netbeanskeymap
com.intellij.plugins.visualstudiokeymap
com.intellij.properties
com.intellij.searcheverywhere.ml
com.intellij.settingsSync
com.intellij.tasks
com.intellij.tracing.ide
com.intellij.turboComplete
com.intellij.zh
com.jetbrains.codeWithMe
com.jetbrains.performancePlugin
com.jetbrains.performancePlugin.async
com.jetbrains.sh
com.jetbrains.station
com.perl5
com.perl5.lang.mason.framework
com.perl5.lang.mason.htmlmason
hg4idea
intellij.indexing.shared.core
intellij.platform.ijent.impl
intellij.webp
org.editorconfig.editorconfigjetbrains
org.intellij.groovy
org.intellij.intelliLang
org.intellij.plugins.markdown
org.intellij.qodana
org.jetbrains.debugger.streams
org.jetbrains.idea.eclipse
org.jetbrains.idea.gradle.dsl
org.jetbrains.idea.maven
org.jetbrains.idea.maven.model
org.jetbrains.idea.maven.server.api
org.jetbrains.idea.reposearch
org.jetbrains.java.decompiler
org.jetbrains.kotlin
org.jetbrains.plugins.emojipicker
org.jetbrains.plugins.github
org.jetbrains.plugins.gitlab
org.jetbrains.plugins.gradle
org.jetbrains.plugins.gradle.analysis
org.jetbrains.plugins.gradle.dependency.updater
org.jetbrains.plugins.gradle.maven
org.jetbrains.plugins.javaFX
org.jetbrains.plugins.terminal
org.jetbrains.plugins.textmate
org.jetbrains.plugins.yaml
org.jetbrains.security.package-checker
org.toml.lang
tanvd.grazi
training
23 changes: 23 additions & 0 deletions mason/mason2/src/test/java/unit/Mason2TestEnvironmentTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2015-2024 Alexandr Evstigneev
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package unit

import base.PerlTestEnvironmentTestCase

class Mason2TestEnvironmentTest : PerlTestEnvironmentTestCase() {
override fun getTestLibPath(): String = TEST_LIB_PATH_FROM_NESTED
}
77 changes: 77 additions & 0 deletions mason/mason2/src/test/resources/plugins/pluginsList.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
ByteCodeViewer
Coverage
Git4Idea
HtmlTools
JUnit
PerforceDirectPlugin
Subversion
TestNG-J
com.intellij
com.intellij.completion.ml.ranking
com.intellij.configurationScript
com.intellij.copyright
com.intellij.dev
com.intellij.gradle
com.intellij.ja
com.intellij.java
com.intellij.java-i18n
com.intellij.java.ide
com.intellij.ko
com.intellij.llmInstaller
com.intellij.marketplace
com.intellij.marketplace.ml
com.intellij.ml.inline.completion
com.intellij.modules.json
com.intellij.platform.ide.provisioner
com.intellij.platform.images
com.intellij.plugins.eclipsekeymap
com.intellij.plugins.netbeanskeymap
com.intellij.plugins.visualstudiokeymap
com.intellij.properties
com.intellij.searcheverywhere.ml
com.intellij.settingsSync
com.intellij.tasks
com.intellij.tracing.ide
com.intellij.turboComplete
com.intellij.zh
com.jetbrains.codeWithMe
com.jetbrains.performancePlugin
com.jetbrains.performancePlugin.async
com.jetbrains.sh
com.jetbrains.station
com.perl5
com.perl5.lang.mason.framework
com.perl5.lang.mason.mason2
hg4idea
intellij.indexing.shared.core
intellij.platform.ijent.impl
intellij.webp
org.editorconfig.editorconfigjetbrains
org.intellij.groovy
org.intellij.intelliLang
org.intellij.plugins.markdown
org.intellij.qodana
org.jetbrains.debugger.streams
org.jetbrains.idea.eclipse
org.jetbrains.idea.gradle.dsl
org.jetbrains.idea.maven
org.jetbrains.idea.maven.model
org.jetbrains.idea.maven.server.api
org.jetbrains.idea.reposearch
org.jetbrains.java.decompiler
org.jetbrains.kotlin
org.jetbrains.plugins.emojipicker
org.jetbrains.plugins.github
org.jetbrains.plugins.gitlab
org.jetbrains.plugins.gradle
org.jetbrains.plugins.gradle.analysis
org.jetbrains.plugins.gradle.dependency.updater
org.jetbrains.plugins.gradle.maven
org.jetbrains.plugins.javaFX
org.jetbrains.plugins.terminal
org.jetbrains.plugins.textmate
org.jetbrains.plugins.yaml
org.jetbrains.security.package-checker
org.toml.lang
tanvd.grazi
training
Loading
Loading