Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/gradle/org.junit.jupiter-junit-ju…
Browse files Browse the repository at this point in the history
…piter-5.11.4
  • Loading branch information
134130 authored Jan 16, 2025
2 parents 548cb1f + dc478b5 commit f700263
Show file tree
Hide file tree
Showing 85 changed files with 3,643 additions and 944 deletions.
85 changes: 48 additions & 37 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
changelog: ${{ steps.properties.outputs.changelog }}
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@main
Expand Down Expand Up @@ -108,6 +109,13 @@ jobs:
runs-on: ubuntu-latest
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
large-packages: false

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4
Expand Down Expand Up @@ -178,6 +186,46 @@ jobs:
with:
cache-default-branch-only: true

detekt:
permission:
contents: read
security-events: write
runs-on: ubuntu-latest
steps:
# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
large-packages: false

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

# Set up Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17

# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true

- name: Run Detekt
run: ./gradlew detektMain detektTest detektReportMergeSarif --continue

- name: Upload Detekt Report
uses: github/codeql-action/upload-sarif@v3
if: success() || failure()
with:
sarif_file: 'build/reports/detekt/merge.sarif.json'


# Run plugin structure verification along with IntelliJ Plugin Verifier
verify:
name: Verify plugin
Expand Down Expand Up @@ -227,40 +275,3 @@ jobs:
with:
name: pluginVerifier-result
path: ${{ github.workspace }}/build/reports/pluginVerifier

# Prepare a draft release for GitHub Releases page for the manual verification
# If accepted and published, release workflow would be triggered
releaseDraft:
name: Release draft
if: github.event_name != 'pull_request'
needs: [ build, test, inspectCode, verify ]
runs-on: ubuntu-latest
permissions:
contents: write
steps:

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

# Remove old release drafts by using the curl request for the available releases with a draft flag
- name: Remove Old Release Drafts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/{owner}/{repo}/releases \
--jq '.[] | select(.draft == true) | .id' \
| xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{}
# Create a new release draft which is not publicly visible and requires manual acceptance
- name: Create Release Draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "v${{ needs.build.outputs.version }}" \
--draft \
--title "v${{ needs.build.outputs.version }}" \
--notes "$(cat << 'EOM'
${{ needs.build.outputs.changelog }}
EOM
)"
1 change: 0 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 58 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,57 @@

## [Unreleased]

## [3.3.0] - 2025-01-16

### Added

- Run Mise task as a run configuration.
- Unit tests for Mise code completion.

### Fixed

- Code completion is not working on `depends` single string.
- Mise task with quoted string cannot escape the quotes.

## [3.2.6] - 2025-01-01

### Fixed

- Jackson Deserialization failing on Unknown properties

## [3.2.5] - 2024-12-28

### Fixed

- Mise executable customization is not working
- Address new version of `mise tasks --json` output

## [3.2.4] - 2024-12-28

### Fixed

- Error report submitter cannot report an error when the error is too long.
- Mise Tools name is not showing correctly.
- Escape long-running tasks running on EDT.

### Added

- Add a mise cli version to the error report.

## [3.2.3] - 2024-12-26

### Fixed

- Fix environment variables are not loaded onto Gradle Task when triggered on Gradle Tool Window.

## [3.2.2] - 2024-12-25

### Fixed

- Fix runConfiguration cannot be saved
- Fix runConfiguration cannot load envvars when it doesn't have working directory.
- When the working directory is not set, it will use the project's base directory.

## [3.2.1] - 2024-12-16

### Added
Expand Down Expand Up @@ -151,7 +202,13 @@

- Support JDK integration from mise tools.

[Unreleased]: https://github.com/134130/intellij-mise/compare/v3.2.1...HEAD
[Unreleased]: https://github.com/134130/intellij-mise/compare/v3.3.0...HEAD
[3.3.0]: https://github.com/134130/intellij-mise/compare/v3.2.6...v3.3.0
[3.2.6]: https://github.com/134130/intellij-mise/compare/v3.2.5...v3.2.6
[3.2.5]: https://github.com/134130/intellij-mise/compare/v3.2.4...v3.2.5
[3.2.4]: https://github.com/134130/intellij-mise/compare/v3.2.3...v3.2.4
[3.2.3]: https://github.com/134130/intellij-mise/compare/v3.2.2...v3.2.3
[3.2.2]: https://github.com/134130/intellij-mise/compare/v3.2.1...v3.2.2
[3.2.1]: https://github.com/134130/intellij-mise/compare/v3.2.0...v3.2.1
[3.2.0]: https://github.com/134130/intellij-mise/compare/v3.1.0...v3.2.0
[3.1.0]: https://github.com/134130/intellij-mise/compare/v3.0.0...v3.1.0
Expand Down
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
# Contributing to the IntelliJ Mise Plugin

Thank you for your interest in contributing to the IntelliJ Mise Plugin!

## Running other IDEs for testing

As this plugin targets multiple IDEs, when developing you'll want to test against a specific IDE.

You can get a list of available tasks for running the plugin in different IDEs by running the following command:

```shell
./gradlew tasks --group='intellij platform' | grep -E '^run'
```

> [!NOTE]
> In many cases, Intellij Ultimates supports other products via plugins. Maybe you just need `runIntellijIdeaUltimate`
After that, you can run the desired IDE by running the following command:

```shell
./gradlew prepareSandbox_runIntellijIdeaUltimate # only for the first time
./gradlew runIntellijIdeaUltimate
```

> [!NOTE]
> If you want to use breakpoints for debugging, you can just run the gradle task with IDEA's debug option

> [!TIP]
> If you want to test other version of IDEs, you can change the version field in the [build.gradle.kts](./build.gradle.kts) file.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ from Mise config files. see: **[mise-en-place](https://mise.jdx.dev)**
Download the [latest release](https://github.com/134130/intellij-mise/releases/latest) and install it manually using
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>

## Ecosystem

- See [mise-vscode](https://github.com/hverlin/mise-vscode/) if you are looking for a similar plugin for VSCode
- [Mise documentation](https://mise.jdx.dev/)

---
Plugin based on the [IntelliJ Platform Plugin Template][template].
Expand Down
48 changes: 46 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask
import io.gitlab.arturbosch.detekt.report.ReportMergeTask
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.intellij.platform.gradle.Constants.Constraints
Expand All @@ -13,6 +16,7 @@ plugins {
alias(libs.plugins.changelog) // Gradle Changelog Plugin
alias(libs.plugins.qodana) // Gradle Qodana Plugin
alias(libs.plugins.kover) // Gradle Kover Plugin
alias(libs.plugins.detekt) // Gradle Detekt Plugin
}

group = providers.gradleProperty("pluginGroup").get()
Expand All @@ -35,11 +39,9 @@ dependencies {
pluginModule(implementation(project(":mise-products-idea")))
pluginModule(implementation(project(":mise-products-nodejs")))
pluginModule(implementation(project(":mise-products-rider")))
pluginModule(implementation(project(":mise-products-toml")))

plugins(listOf())

instrumentationTools()
pluginVerifier()
zipSigner()
testFramework(TestFrameworkType.Platform)
Expand Down Expand Up @@ -139,6 +141,48 @@ tasks {
}
}

val detektReportMergeSarif by tasks.registering(ReportMergeTask::class) {
output = layout.buildDirectory.file("reports/detekt/merge.sarif.json")
}

allprojects {
apply(plugin = "io.gitlab.arturbosch.detekt")

detekt {
buildUponDefaultConfig = true
baseline = file("$rootDir/config/detekt/baseline.xml")
}

dependencies {
detekt("io.gitlab.arturbosch.detekt:detekt-cli:${rootProject.libs.versions.detekt.get()}")
detekt("io.gitlab.arturbosch.detekt:detekt-formatting:${rootProject.libs.versions.detekt.get()}")
detekt(project(":mise-core"))
detekt(project(":mise-products-goland"))
detekt(project(":mise-products-gradle"))
detekt(project(":mise-products-idea"))
detekt(project(":mise-products-nodejs"))
detekt(project(":mise-products-rider"))
}

tasks.withType<Detekt>().configureEach {
enabled = false
jvmTarget = "17"
reports {
xml.required = true
html.required = true
sarif.required = true
md.required = true
}
basePath = rootDir.absolutePath
}
detektReportMergeSarif {
input.from(tasks.withType<Detekt>().map { it.reports.sarif.outputLocation })
}
tasks.withType<DetektCreateBaselineTask>().configureEach {
jvmTarget = "17"
}
}

val runIdeForUnitTests by intellijPlatformTesting.runIde.registering {
task {
jvmArgumentProviders +=
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginGroup = com.github.l34130.mise
pluginName = Mise
pluginRepositoryUrl = https://github.com/134130/intellij-mise
# SemVer format -> https://semver.org
pluginVersion=3.2.1
pluginVersion=3.3.0

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild=233
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ gradleIdeaExt = "1.1.9"
kotlin = "2.1.0"
kover = "0.9.0"
qodana = "2024.2.6"
detekt = "1.23.7"

[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
Expand All @@ -18,3 +19,4 @@ gradleIdeaExt = { id = "org.jetbrains.gradle.plugin.idea-ext", version.ref = "gr
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
qodana = { id = "org.jetbrains.qodana", version.ref = "qodana" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
6 changes: 4 additions & 2 deletions modules/core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
import org.jetbrains.intellij.platform.gradle.TestFrameworkType

fun properties(key: String) = project.findProperty(key).toString()

Expand All @@ -8,16 +9,17 @@ plugins {
}

dependencies {
testImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
testImplementation(libs.junit)

intellijPlatform {
create(IntelliJPlatformType.IntellijIdeaCommunity, properties("platformVersion"), false)

bundledPlugin("com.intellij.java")
bundledPlugin("org.jetbrains.plugins.terminal")
bundledPlugin("org.toml.lang")

jetbrainsRuntime()

instrumentationTools()
testFramework(TestFrameworkType.Platform)
}
}

This file was deleted.

Loading

0 comments on commit f700263

Please sign in to comment.