Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Drjacky/Avocado
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.3.3
Choose a base ref
...
head repository: Drjacky/Avocado
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Dec 1, 2023

  1. Bump JetBrains/qodana-action from 2023.2.6 to 2023.2.8

    Bumps [JetBrains/qodana-action](https://github.com/jetbrains/qodana-action) from 2023.2.6 to 2023.2.8.
    - [Release notes](https://github.com/jetbrains/qodana-action/releases)
    - [Commits](JetBrains/qodana-action@v2023.2.6...v2023.2.8)
    
    ---
    updated-dependencies:
    - dependency-name: JetBrains/qodana-action
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and hsz committed Dec 1, 2023
    Copy the full SHA
    0a3cd45 View commit details
  2. Bump org.jetbrains:annotations from 24.0.1 to 24.1.0

    Bumps [org.jetbrains:annotations](https://github.com/JetBrains/java-annotations) from 24.0.1 to 24.1.0.
    - [Release notes](https://github.com/JetBrains/java-annotations/releases)
    - [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md)
    - [Commits](JetBrains/java-annotations@24.0.1...24.1.0)
    
    ---
    updated-dependencies:
    - dependency-name: org.jetbrains:annotations
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and hsz committed Dec 1, 2023
    Copy the full SHA
    2c42f56 View commit details
  3. Bump org.jetbrains.kotlinx.kover from 0.7.3 to 0.7.5

    Bumps [org.jetbrains.kotlinx.kover](https://github.com/Kotlin/kotlinx-kover) from 0.7.3 to 0.7.5.
    - [Release notes](https://github.com/Kotlin/kotlinx-kover/releases)
    - [Changelog](https://github.com/Kotlin/kotlinx-kover/blob/main/CHANGELOG.md)
    - [Commits](Kotlin/kotlinx-kover@v0.7.3...v0.7.5)
    
    ---
    updated-dependencies:
    - dependency-name: org.jetbrains.kotlinx.kover
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and hsz committed Dec 1, 2023
    Copy the full SHA
    65c21fc View commit details
  4. Bump org.jetbrains.kotlin.jvm from 1.9.10 to 1.9.21

    Bumps [org.jetbrains.kotlin.jvm](https://github.com/JetBrains/kotlin) from 1.9.10 to 1.9.21.
    - [Release notes](https://github.com/JetBrains/kotlin/releases)
    - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
    - [Commits](JetBrains/kotlin@v1.9.10...v1.9.21)
    
    ---
    updated-dependencies:
    - dependency-name: org.jetbrains.kotlin.jvm
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and hsz committed Dec 1, 2023
    Copy the full SHA
    35de479 View commit details
  5. Upgrade Gradle Wrapper to 8.5

    hsz committed Dec 1, 2023
    Copy the full SHA
    530a899 View commit details
  6. CHANGELOG.md update

    hsz committed Dec 1, 2023
    Copy the full SHA
    4002d5c View commit details
  7. Bump actions/setup-java from 3 to 4

    Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4.
    - [Release notes](https://github.com/actions/setup-java/releases)
    - [Commits](actions/setup-java@v3...v4)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-java
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and hsz committed Dec 1, 2023
    Copy the full SHA
    434219f View commit details
  8. Copy the full SHA
    1b379c9 View commit details
  9. 1.11.3

    hsz committed Dec 1, 2023
    Copy the full SHA
    60e61e2 View commit details
  10. gradle.properties sync

    hsz committed Dec 1, 2023
    Copy the full SHA
    8129b8c View commit details

Commits on Feb 1, 2024

  1. Changelog update - v1.11.3

    actions-user authored and hsz committed Feb 1, 2024
    Copy the full SHA
    79e96a1 View commit details
  2. Remove Gradle Kotlin DSL Lazy Property Assignment because it's defaul…

    …t now
    kotlinisland authored and hsz committed Feb 1, 2024
    Copy the full SHA
    521bc65 View commit details
  3. Changelog update - v1.11.3

    actions-user authored and hsz committed Feb 1, 2024
    Copy the full SHA
    8d42508 View commit details
  4. Remove Gradle Kotlin DSL Lazy Property Assignment from the main `grad…

    …le.properties` file
    hsz committed Feb 1, 2024
    Copy the full SHA
    0186f69 View commit details
  5. CHANGELOG update

    hsz committed Feb 1, 2024
    Copy the full SHA
    fc3f3f4 View commit details
  6. Fix create draft release (#427)

    * Fix bash variable access in Create Release Draft step.
    
    * Fix channels assignment in publishPlugin task.
    
    * Remove Gradle Kotlin DSL Lazy Property Assignment because it's default now
    
    * Changelog update - v1.11.3
    
    * Remove Gradle Kotlin DSL Lazy Property Assignment from the main `gradle.properties` file
    
    * CHANGELOG update
    
    * Adjust obtaining the value for `publishPlugin.channels` property.
    
    * CHANGELOG update
    
    ---------
    
    Co-authored-by: kotlinisland <asdf>
    Co-authored-by: GitHub Action <action@github.com>
    Co-authored-by: Jakub Chrzanowski <jakub.chrzanowski@jetbrains.com>
    3 people authored Feb 1, 2024
    Copy the full SHA
    b3cb370 View commit details

Commits on Feb 2, 2024

  1. Update build.yml

    Reducing number of concurrent builds
    achmyr authored Feb 2, 2024
    Copy the full SHA
    0471a99 View commit details

Commits on Feb 20, 2024

  1. Remove Gradle Kotlin DSL Lazy Property Assignment because it's defaul…

    …t now
    kotlinisland authored and hsz committed Feb 20, 2024
    Copy the full SHA
    91c3282 View commit details
  2. Remove Gradle Kotlin DSL Lazy Property Assignment from the main `grad…

    …le.properties` file
    hsz committed Feb 20, 2024
    Copy the full SHA
    3d18989 View commit details
  3. CHANGELOG update

    hsz committed Feb 20, 2024
    Copy the full SHA
    9f4051c View commit details
  4. Fix create draft release (#427)

    * Fix bash variable access in Create Release Draft step.
    
    * Fix channels assignment in publishPlugin task.
    
    * Remove Gradle Kotlin DSL Lazy Property Assignment because it's default now
    
    * Changelog update - v1.11.3
    
    * Remove Gradle Kotlin DSL Lazy Property Assignment from the main `gradle.properties` file
    
    * CHANGELOG update
    
    * Adjust obtaining the value for `publishPlugin.channels` property.
    
    * CHANGELOG update
    
    ---------
    
    Co-authored-by: kotlinisland <asdf>
    Co-authored-by: GitHub Action <action@github.com>
    Co-authored-by: Jakub Chrzanowski <jakub.chrzanowski@jetbrains.com>
    3 people committed Feb 20, 2024
    Copy the full SHA
    de86d6b View commit details
  5. CHANGELOG update

    hsz committed Feb 20, 2024
    Copy the full SHA
    367a435 View commit details
  6. Merge branch 'next' into main

    hsz authored Feb 20, 2024
    Copy the full SHA
    adad639 View commit details
  7. Merge pull request #431 from achmyr/main

    Reducing number of concurrent builds
    hsz authored Feb 20, 2024
    Copy the full SHA
    88d26a0 View commit details
  8. GitHub Actions: Replace gradle/gradle-build-action@v2 with gradle/act…

    …ions/setup-gradle@v3
    sadv1r authored and hsz committed Feb 20, 2024
    Copy the full SHA
    76d15e3 View commit details
  9. CHANGELOG update

    hsz committed Feb 20, 2024
    Copy the full SHA
    d3258ce View commit details
  10. Copy the full SHA
    a51bde0 View commit details
  11. Copy the full SHA
    b9b2639 View commit details
  12. Upgrade Gradle Wrapper to 8.6

    hsz committed Feb 20, 2024
    Copy the full SHA
    9a177f9 View commit details
  13. Copy the full SHA
    7c0690c View commit details
  14. 1.12.0

    hsz committed Feb 20, 2024
    Copy the full SHA
    9cb309f View commit details
  15. Merge pull request #436 from JetBrains/next

    1.12.0
    hsz authored Feb 20, 2024
    Copy the full SHA
    427dc4e View commit details
  16. Changelog update - v1.12.0

    actions-user authored and hsz committed Feb 20, 2024
    Copy the full SHA
    c25c79d View commit details

Commits on Mar 8, 2024

  1. Bump org.gradle.toolchains.foojay-resolver-convention

    Bumps org.gradle.toolchains.foojay-resolver-convention from 0.7.0 to 0.8.0.
    
    ---
    updated-dependencies:
    - dependency-name: org.gradle.toolchains.foojay-resolver-convention
      dependency-type: direct:production
      update-type: version-update:semver-minor
    KotlinIsland authored and hsz committed Mar 8, 2024
    Copy the full SHA
    5a275e4 View commit details
  2. Release workflow: remove Java (#443)

    * Release workflow: remove Java
    
    It is not required in this workflow anyway.
    
    * CHANGELOG.md update
    
    ---------
    
    Co-authored-by: Jakub Chrzanowski <jakub.chrzanowski@jetbrains.com>
    ForNeVeR and hsz authored Mar 8, 2024
    Copy the full SHA
    b5aaa3f View commit details
  3. Plugin publication: fix the channel selector (#444)

    * Plugin publication: fix the channel selector
    
    Before this patch, publisher was always using the channel corresponding
    to the first number in the plugin version for release builds. This is
    because by default, Kotlin's substringAfter will return the whole input
    string if it's unable to find the needle.
    
    * Bump org.gradle.toolchains.foojay-resolver-convention
    
    Bumps org.gradle.toolchains.foojay-resolver-convention from 0.7.0 to 0.8.0.
    
    ---
    updated-dependencies:
    - dependency-name: org.gradle.toolchains.foojay-resolver-convention
      dependency-type: direct:production
      update-type: version-update:semver-minor
    
    * Release workflow: remove Java (#443)
    
    * Release workflow: remove Java
    
    It is not required in this workflow anyway.
    
    * CHANGELOG.md update
    
    ---------
    
    Co-authored-by: Jakub Chrzanowski <jakub.chrzanowski@jetbrains.com>
    
    * CHANGELOG.md update
    
    ---------
    
    Co-authored-by: KotlinIsland <65446343+kotlinisland@users.noreply.github.com>
    Co-authored-by: Jakub Chrzanowski <jakub.chrzanowski@jetbrains.com>
    3 people authored Mar 8, 2024
    Copy the full SHA
    2f824e0 View commit details
  4. Plugin publication: fix the channel selector (#444)

    * Plugin publication: fix the channel selector
    
    Before this patch, publisher was always using the channel corresponding
    to the first number in the plugin version for release builds. This is
    because by default, Kotlin's substringAfter will return the whole input
    string if it's unable to find the needle.
    
    * Bump org.gradle.toolchains.foojay-resolver-convention
    
    Bumps org.gradle.toolchains.foojay-resolver-convention from 0.7.0 to 0.8.0.
    
    ---
    updated-dependencies:
    - dependency-name: org.gradle.toolchains.foojay-resolver-convention
      dependency-type: direct:production
      update-type: version-update:semver-minor
    
    * Release workflow: remove Java (#443)
    
    * Release workflow: remove Java
    
    It is not required in this workflow anyway.
    
    * CHANGELOG.md update
    
    ---------
    
    Co-authored-by: Jakub Chrzanowski <jakub.chrzanowski@jetbrains.com>
    
    * CHANGELOG.md update
    
    ---------
    
    Co-authored-by: KotlinIsland <65446343+kotlinisland@users.noreply.github.com>
    Co-authored-by: Jakub Chrzanowski <jakub.chrzanowski@jetbrains.com>
    3 people committed Mar 8, 2024
    Copy the full SHA
    fc1085c View commit details
  5. Copy the full SHA
    ac57f20 View commit details
  6. Merge branch 'main' into next

    hsz authored Mar 8, 2024
    Copy the full SHA
    281eacf View commit details
  7. Copy the full SHA
    8ddc338 View commit details
  8. Copy the full SHA
    2504c56 View commit details
  9. Copy the full SHA
    b7f5f2a View commit details
  10. Copy the full SHA
    e6736ae View commit details
  11. Replace the whole IntelliJ Platform Plugin Template with the new pr…

    …oject name when running the GitHub Actions Cleanup workflow #442
    hsz committed Mar 8, 2024
    Copy the full SHA
    de5d2e9 View commit details
  12. 1.13.0

    hsz committed Mar 8, 2024
    Copy the full SHA
    164d4ea View commit details
  13. Merge pull request #448 from JetBrains/next

    1.13.0
    hsz authored Mar 8, 2024
    Copy the full SHA
    fdf009d View commit details
  14. Copy the full SHA
    db8f493 View commit details
  15. Copy the full SHA
    81206eb View commit details

Commits on Mar 11, 2024

  1. Copy the full SHA
    3715e34 View commit details
  2. Merge pull request #450 from JetBrains/changelog-update-v1.13.0

    Changelog update - `v1.13.0`
    hsz authored Mar 11, 2024
    Copy the full SHA
    ae35708 View commit details
56 changes: 24 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -20,6 +20,10 @@ on:
# Trigger the workflow on any pull request
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:

# Prepare environment and build the plugin
@@ -32,13 +36,13 @@ jobs:
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
steps:

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

# Validate wrapper
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.1.0
uses: gradle/actions/wrapper-validation@v3

# Set up Java environment for the next steps
- name: Setup Java
@@ -49,9 +53,7 @@ jobs:

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

# Set environment variables
- name: Export Properties
@@ -69,8 +71,6 @@ jobs:
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
# Build plugin
- name: Build plugin
run: ./gradlew buildPlugin
@@ -88,7 +88,7 @@ jobs:
# Store already-built plugin as an artifact for downloading
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/distributions/content/*/*
@@ -100,7 +100,7 @@ jobs:
runs-on: ubuntu-latest
steps:

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

@@ -113,9 +113,7 @@ jobs:

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

# Run tests
- name: Run Tests
@@ -124,14 +122,14 @@ jobs:
# Collect Tests Result of failed tests
- name: Collect Tests Result
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: tests-result
path: ${{ github.workspace }}/build/reports/tests

# Upload the Kover report to CodeCov
- name: Upload Code Coverage Report
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ${{ github.workspace }}/build/reports/kover/report.xml

@@ -153,9 +151,12 @@ jobs:
tool-cache: false
large-packages: false

# Check out current repository
# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
fetch-depth: 0 # a full history is required for pull request analysis

# Set up Java environment for the next steps
- name: Setup Java
@@ -166,7 +167,7 @@ jobs:

# Run Qodana inspections
- name: Qodana - Code Inspection
uses: JetBrains/qodana-action@v2023.2.8
uses: JetBrains/qodana-action@v2024.2
with:
cache-default-branch-only: true

@@ -184,7 +185,7 @@ jobs:
tool-cache: false
large-packages: false

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

@@ -197,25 +198,23 @@ jobs:

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

# Cache Plugin Verifier IDEs
- name: Setup Plugin Verifier IDEs Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides
key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}

# Run Verify Plugin task and IntelliJ Plugin Verifier tool
- name: Run Plugin Verification tasks
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
run: ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}

# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pluginVerifier-result
path: ${{ github.workspace }}/build/reports/pluginVerifier
@@ -231,17 +230,10 @@ jobs:
contents: write
steps:

# Check out current repository
# 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

# Remove old release drafts by using the curl request for the available releases with a draft flag
- name: Remove Old Release Drafts
env:
@@ -256,7 +248,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create v${{ needs.build.outputs.version }} \
gh release create "v${{ needs.build.outputs.version }}" \
--draft \
--title "v${{ needs.build.outputs.version }}" \
--notes "$(cat << 'EOM'
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ jobs:
pull-requests: write
steps:

# Check out current repository
# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4
with:
@@ -33,9 +33,7 @@ jobs:

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

# Set environment variables
- name: Export Properties
@@ -51,7 +49,7 @@ jobs:
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
# Update Unreleased section with the current release note
# Update the Unreleased section with the current release note
- name: Patch Changelog
if: ${{ steps.properties.outputs.changelog != '' }}
env:
8 changes: 3 additions & 5 deletions .github/workflows/run-ui-tests.yml
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ jobs:

steps:

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

@@ -44,17 +44,15 @@ jobs:

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

# Run IDEA prepared for UI testing
- name: Run IDE
run: ${{ matrix.runIde }}

# Wait for IDEA to be started
- name: Health Check
uses: jtalk/url-health-check-action@v3
uses: jtalk/url-health-check-action@v4
with:
url: http://127.0.0.1:8082
max-attempts: 15
1 change: 1 addition & 0 deletions .run/Run Plugin Tests.run.xml
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>true</RunAsTest>
<method v="2" />
</configuration>
</component>
7 changes: 3 additions & 4 deletions .run/Run Plugin Verification.run.xml
Original file line number Diff line number Diff line change
@@ -11,16 +11,15 @@
</option>
<option name="taskNames">
<list>
<option value="runPluginVerifier" />
<option value="verifyPlugin" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2">
<option name="Gradle.BeforeRunTask" enabled="true" tasks="clean" externalProjectPath="$PROJECT_DIR$" vmOptions="" scriptParameters="" />
</method>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
3 changes: 2 additions & 1 deletion .run/Run Plugin.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Plugin" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<log_file alias="IDE logs" path="$PROJECT_DIR$/build/idea-sandbox/*/log/idea.log" show_all="true" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
@@ -19,6 +19,7 @@
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
8 changes: 1 addition & 7 deletions .run/Run Qodana.run.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Qodana" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="env">
<map>
<entry key="QODANA_SHOW_REPORT" value="true" />
</map>
</option>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
@@ -15,8 +10,7 @@
</option>
<option name="taskNames">
<list>
<option value="cleanInspections" />
<option value="runInspections" />
<option value="qodanaScan" />
</list>
</option>
<option name="vmOptions" />
1 change: 1 addition & 0 deletions .run/Run Tests.run.xml
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>true</RunAsTest>
<method v="2" />
</configuration>
</component>
32 changes: 28 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,27 @@

## [Unreleased]

## [3.5.7] - 2024-10-27

### Fixed

- Support the latest IntelliJ IDEA

## [3.5.6] - 2024-10-05

### Fixed

- Let the IDE decide where to put the Avocado item in the right-click [#118](https://github.com/Drjacky/Avocado/issues/118)

## [3.5.5] - 2024-05-19

### Added

- Have the Avocado in the Commit Changes dialog [#115](https://github.com/Drjacky/Avocado/issues/115)
- Support IntelliJ IDEA 2024.1.1
- Have the Avocado on drawable(-*) folder(s) [#117](https://github.com/Drjacky/Avocado/issues/117)
- Add Crash Reporting

## [3.3.3] - 2024-01-30

### Added
@@ -42,8 +63,11 @@
- Right-click on the content of the vector xml file in the IDE Editor
- Try to install the node in case of absent based on the OS type

[Unreleased]: https://github.com/Drjacky/Avocado/compare/v3.3.3...HEAD
[3.3.3]: https://github.com/Drjacky/Avocado/commits/v3.3.3
[3.2.2]: https://github.com/Drjacky/Avocado/commits/v3.2.2
[2.0.1]: https://github.com/Drjacky/Avocado/commits/v2.0.1
[Unreleased]: https://github.com/Drjacky/Avocado/compare/v3.5.7...HEAD
[3.5.7]: https://github.com/Drjacky/Avocado/compare/v3.5.6...v3.5.7
[3.5.6]: https://github.com/Drjacky/Avocado/compare/v3.5.5...v3.5.6
[3.5.5]: https://github.com/Drjacky/Avocado/compare/v3.3.3...v3.5.5
[3.3.3]: https://github.com/Drjacky/Avocado/compare/v3.2.2...v3.3.3
[3.2.2]: https://github.com/Drjacky/Avocado/compare/v2.0.1...v3.2.2
[2.0.1]: https://github.com/Drjacky/Avocado/compare/v1.0.0...v2.0.1
[1.0.0]: https://github.com/Drjacky/Avocado/commits/v1.0.0
49 changes: 29 additions & 20 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ plugins {
alias(libs.plugins.changelog) // Gradle Changelog Plugin
alias(libs.plugins.qodana) // Gradle Qodana Plugin
alias(libs.plugins.kover) // Gradle Kover Plugin
id("io.sentry.jvm.gradle") version "4.6.0"
}

group = properties("pluginGroup").get()
@@ -26,13 +27,9 @@ dependencies {
// implementation(libs.annotations)
}

// Set the JVM language level used to build the project. Use Java 11 for 2020.3+, and Java 17 for 2022.2+.
// Set the JVM language level used to build the project.
kotlin {
@Suppress("UnstableApiUsage")
jvmToolchain {
languageVersion = JavaLanguageVersion.of(17)
vendor = JvmVendorSpec.JETBRAINS
}
jvmToolchain(17)
}

// Configure Gradle IntelliJ Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
@@ -51,23 +48,27 @@ changelog {
repositoryUrl = properties("pluginRepositoryUrl")
}

// Configure Gradle Qodana Plugin - read more: https://github.com/JetBrains/gradle-qodana-plugin
qodana {
cachePath = provider { file(".qodana").canonicalPath }
reportPath = provider { file("build/reports/inspections").canonicalPath }
saveReport = true
showReport = environment("QODANA_SHOW_REPORT").map { it.toBoolean() }.getOrElse(false)
}

// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration
koverReport {
defaults {
xml {
onCheck = true
kover {
reports {
total {
xml {
onCheck = true
}
}
}
}

sentry {
includeSourceContext = true

org = "drjacky"
projectName = "avocado"
authToken = System.getenv("SENTRY_AUTH_TOKEN_AVOCADO")
includeProguardMapping = true
autoUploadProguardMapping = true
}

tasks {
wrapper {
gradleVersion = properties("gradleVersion").get()
@@ -76,7 +77,7 @@ tasks {
patchPluginXml {
version = properties("pluginVersion")
sinceBuild = properties("pluginSinceBuild")
untilBuild = properties("pluginUntilBuild")
untilBuild = provider { null }

// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
pluginDescription = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map {
@@ -126,6 +127,14 @@ tasks {
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
channels = properties("pluginVersion").map { listOf(it.split('-').getOrElse(1) { "default" }.split('.').first()) }
channels = properties("pluginVersion").map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) }
}
}

tasks.withType<JavaExec> {
systemProperty("pluginVersion", project.findProperty("pluginVersion") as String)
}

tasks.withType<Test> {
systemProperty("pluginVersion", project.findProperty("pluginVersion") as String)
}
11 changes: 4 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -4,22 +4,22 @@ pluginGroup = com.github.drjacky.avocado
pluginName = Avocado
pluginRepositoryUrl = https://github.com/Drjacky/Avocado
# SemVer format -> https://semver.org
pluginVersion = 3.3.3
pluginVersion = 3.5.7

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 223
pluginUntilBuild = 233.*
# pluginUntilBuild = 241.*

# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformType = IC
platformVersion = 2022.3.3
platformVersion = 2024.1.1

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins =

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 8.4
gradleVersion = 8.10.2

# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
kotlin.stdlib.default.dependency = false
@@ -29,6 +29,3 @@ org.gradle.configuration-cache = true

# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html
org.gradle.caching = true

# Enable Gradle Kotlin DSL Lazy Property Assignment -> https://docs.gradle.org/current/userguide/kotlin_dsl.html#kotdsl:assignment
systemProp.org.gradle.unsafe.kotlin.assignment = true
12 changes: 6 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -3,11 +3,11 @@
annotations = "24.1.0"

# plugins
kotlin = "1.9.21"
changelog = "2.2.0"
gradleIntelliJPlugin = "1.16.1"
qodana = "0.1.13"
kover = "0.7.5"
kotlin = "1.9.25"
changelog = "2.2.1"
gradleIntelliJPlugin = "1.17.2"
qodana = "2024.2.3"
kover = "0.8.3"

[libraries]
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }
@@ -17,4 +17,4 @@ changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
gradleIntelliJPlugin = { id = "org.jetbrains.intellij", version.ref = "gradleIntelliJPlugin" }
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" }
qodana = { id = "org.jetbrains.qodana", version.ref = "qodana" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
24 changes: 13 additions & 11 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

@@ -89,4 +91,4 @@ exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
:omega
4 changes: 2 additions & 2 deletions qodana.yml
Original file line number Diff line number Diff line change
@@ -2,11 +2,11 @@
# https://www.jetbrains.com/help/qodana/qodana-yaml.html

version: 1.0
linter: jetbrains/qodana-jvm-community:latest
linter: jetbrains/qodana-jvm-community:2024.2
projectJDK: "17"
profile:
name: qodana.recommended
exclude:
- name: All
paths:
- .qodana
- .qodana
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

rootProject.name = "Avocado"
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.github.drjacky.avocado

import com.github.drjacky.avocado.log.SentryIntegration
import com.intellij.openapi.components.ApplicationComponent
import org.jetbrains.annotations.NotNull

class MyApplicationComponent : ApplicationComponent {

override fun initComponent() {
SentryIntegration.initSentry()
}

override fun disposeComponent() {
}

@NotNull
override fun getComponentName(): String {
return super.getComponentName()
}
}
Original file line number Diff line number Diff line change
@@ -8,15 +8,17 @@
import com.intellij.openapi.progress.Task
import com.intellij.openapi.progress.impl.BackgroundableProcessIndicator
import com.intellij.openapi.project.Project
import com.intellij.openapi.vcs.changes.VcsDirtyScopeManager
import com.intellij.openapi.vfs.VfsUtil
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.vcsUtil.VcsFileUtil
import com.intellij.vcsUtil.VcsUtil
import io.sentry.Sentry
import java.io.*
import java.net.URL
import javax.swing.SwingUtilities
import kotlin.io.path.createTempFile

class AvocadoSizeItRightClickAction : AnAction() {

Check notice on line 21 in src/main/kotlin/com/github/drjacky/avocado/actions/AvocadoSizeItRightClickAction.kt

GitHub Actions / Qodana Community for JVM

Package name does not match containing directory

Package directive does not match the file location

override fun actionPerformed(e: AnActionEvent) {
val project: Project? = e.project
@@ -39,6 +41,14 @@
if (!files.isNullOrEmpty()) {
if (isXmlFileInDrawableFolder(files)) {
processFilesWithAvocado(project, avocadoScriptPath, executableName, files)
} else if (isDrawableFolder(files)) {
val folder = files[0]
val filePaths = mutableListOf<VirtualFile>()

folder.children.forEach { child ->
filePaths.add(child)
}
processFilesWithAvocado(project, avocadoScriptPath, executableName, filePaths.toTypedArray())
} else {
println("Right-clicked on file, but not in the expected folder or not xml")
}
@@ -59,7 +69,7 @@
executableName: String,
files: Array<VirtualFile>
) {
val task = object : Task.Backgroundable(project, "Avocado-Size It", true) {

Check warning on line 72 in src/main/kotlin/com/github/drjacky/avocado/actions/AvocadoSizeItRightClickAction.kt

GitHub Actions / Qodana Community for JVM

Incorrect string capitalization

String 'Avocado-Size It' is not properly capitalized. It should have sentence capitalization
override fun run(indicator: ProgressIndicator) {
val executableFile = createTempExecutableFile(avocadoScriptPath, executableName)
if (executableFile.exists()) {
@@ -111,6 +121,13 @@
} ?: false
}

private fun isDrawableFolder(virtualFiles: Array<VirtualFile>?): Boolean {
return virtualFiles?.all { virtualFile ->
val parentFolder = virtualFile.parent
virtualFile.isDirectory && (virtualFile.name == "drawable" || virtualFile.name.startsWith("drawable-")) && parentFolder?.name == "res"
} ?: false
}

private fun avocadoSizeIt(executableFilePath: String, file: VirtualFile): Boolean {
val fullPath = file.path
try {
@@ -140,19 +157,24 @@
return true
} catch (e: IOException) {
e.printStackTrace()
Sentry.captureException(e)
} catch (e: InterruptedException) {
e.printStackTrace()
Sentry.captureException(e)
}

return false
}

private fun refreshFiles(files: List<VirtualFile>, project: Project) {
val task = object : Task.Backgroundable(project, "", false) {
val task = object : Task.Backgroundable(project, "Refresh file(s)", false) {
override fun run(indicator: ProgressIndicator) {
ApplicationManager.getApplication().invokeAndWait {
VfsUtil.markDirtyAndRefresh(true, false, true, *files.toTypedArray())
VcsFileUtil.markFilesDirty(project, files)

val dirtyScopeManager = VcsDirtyScopeManager.getInstance(project)
val filePaths = files.map { VcsUtil.getFilePath(it) }
dirtyScopeManager.filePathsDirty(filePaths, null)
}
}
}
@@ -165,7 +187,8 @@
super.update(e)
SwingUtilities.invokeLater {
val files = e.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY)
e.presentation.isEnabledAndVisible = isXmlFileInDrawableFolder(files)
e.presentation.isEnabledAndVisible =
files != null && isXmlFileInDrawableFolder(files) || isDrawableFolder(files)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package com.github.drjacky.avocado.log

import com.intellij.diagnostic.IdeaReportingEvent
import com.intellij.ide.DataManager
import com.intellij.idea.IdeaLogger
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.diagnostic.ErrorReportSubmitter
import com.intellij.openapi.diagnostic.IdeaLoggingEvent
import com.intellij.openapi.diagnostic.SubmittedReportInfo
import com.intellij.openapi.progress.ProgressIndicator
import com.intellij.openapi.progress.Task.Backgroundable
import com.intellij.openapi.ui.Messages
import com.intellij.util.Consumer
import io.sentry.Sentry
import io.sentry.SentryEvent
import io.sentry.SentryLevel
import java.awt.Component


class SentryErrorReporter : ErrorReportSubmitter() {

override fun getPrivacyNoticeText(): String =
"To help me fix this problem, you can send a crash report. This report will contain " +
"information on the crash, including your device model, system version, the plugin’s version and " +
"build number. By sending this report you hereby agree to this policy."


override fun getReportActionText(): String = "Report to Author"

override fun submit(
events: Array<out IdeaLoggingEvent>,
additionalInfo: String?,
parentComponent: Component,
consumer: Consumer<in SubmittedReportInfo>
): Boolean {
val context = DataManager.getInstance().getDataContext(parentComponent)
val project = CommonDataKeys.PROJECT.getData(context)

object : Backgroundable(project, "Sending Error Report") {

Check warning on line 40 in src/main/kotlin/com/github/drjacky/avocado/log/SentryErrorReporter.kt

GitHub Actions / Qodana Community for JVM

Incorrect string capitalization

String 'Sending Error Report' is not properly capitalized. It should have sentence capitalization
override fun run(indicator: ProgressIndicator) {
val event = SentryEvent()
event.level = SentryLevel.ERROR

events.filterIsInstance<IdeaReportingEvent>().forEach {
Sentry.setExtra("last_action", IdeaLogger.ourLastActionId)
Sentry.setExtra("additional_info", it.data.additionalInfo)
it.data.message?.let { message -> Sentry.setExtra("message", message) }

val exception = it.data.throwable
// val original: Throwable? = (events[0].data as AbstractMessage?)?.throwable
Sentry.captureException(exception)
}

ApplicationManager.getApplication().invokeLater {
Messages.showInfoMessage(
parentComponent,
"Thank you for submitting your report!",
"Error Report"
)
consumer.consume(SubmittedReportInfo(SubmittedReportInfo.SubmissionStatus.NEW_ISSUE))
}
}
}.queue()
return true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.github.drjacky.avocado.log

import com.intellij.openapi.application.ex.ApplicationInfoEx
import io.sentry.Sentry
import io.sentry.SentryLevel

object SentryIntegration {

fun initSentry() {
// synchronized(SentryIntegration.javaClass) {
val pluginVersion = System.getProperty("pluginVersion")

Sentry.init { options ->
options.dsn =
"https://f72444f4b2395b4da3731fba282f7898@o4507282921816064.ingest.de.sentry.io/4507282932498512"
options.environment = "production"
options.tracesSampleRate = 1.0
options.release = pluginVersion
options.isDebug = true
options.shutdownTimeoutMillis = 5000
options.setDiagnosticLevel(SentryLevel.ERROR)
options.setTag("ide", ApplicationInfoEx.getInstance().fullApplicationName);

Check warning on line 22 in src/main/kotlin/com/github/drjacky/avocado/log/SentryIntegration.kt

GitHub Actions / Qodana Community for JVM

Redundant semicolon

Redundant semicolon
}
// }
}
}
19 changes: 14 additions & 5 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -9,18 +9,27 @@

<resource-bundle>messages.MyBundle</resource-bundle>

<extensions defaultExtensionNs="com.intellij"/>
<application-components>
<component>
<implementation-class>com.github.drjacky.avocado.MyApplicationComponent</implementation-class>
</component>
</application-components>

<extensions defaultExtensionNs="com.intellij">
<errorHandler implementation="com.github.drjacky.avocado.log.SentryErrorReporter"/>
</extensions>

<actions>
<action id="AvocadoSizeItRightClickAction"
class="AvocadoSizeItRightClickAction"
text="Avocado-Size It"
description="Optimizes Android VectorDrawable (VD) and AnimatedVectorDrawable (AVD) xml files"
icon="/META-INF/icon.svg">
<add-to-group group-id="EditorPopupMenu" anchor="first"/>
<add-to-group group-id="PopupMenuActions" anchor="first"/>
<add-to-group group-id="ProjectViewPopupMenu" anchor="first"/>
<add-to-group group-id="ChangesViewPopupMenu" anchor="last" />
<add-to-group group-id="EditorPopupMenu"/>
<add-to-group group-id="PopupMenuActions"/>
<add-to-group group-id="ProjectViewPopupMenu"/>
<add-to-group group-id="ChangesViewPopupMenu"/>
<add-to-group group-id="Vcs.MessageActionGroup"/>
</action>
</actions>