Skip to content

Commit

Permalink
Increase dependency versions. Support 232.*
Browse files Browse the repository at this point in the history
  • Loading branch information
Mervap committed Jun 26, 2023
1 parent 170acab commit 74a5702
Show file tree
Hide file tree
Showing 11 changed files with 88 additions and 48 deletions.
43 changes: 25 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,18 @@ jobs:
version: ${{ steps.properties.outputs.version }}
changelog: ${{ steps.properties.outputs.changelog }}
steps:
# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
- name: Check out
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3

- name: Download Lama Cache
uses: actions/cache@v2
uses: actions/cache@v3
id: opam-cache
with:
path: |
Expand Down Expand Up @@ -101,10 +108,10 @@ jobs:
limactl copy default:~/opam_cache.tar.xz ~/opam_cache.tar.xz
- name: Gradle Wrapper Validation
uses: gradle/[email protected].4
uses: gradle/[email protected].6

- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: liberica
java-version: 17
Expand All @@ -118,14 +125,14 @@ jobs:
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')"
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)"
CHANGELOG="${CHANGELOG//'%'/'%25'}"
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
echo "::set-output name=version::$VERSION"
echo "::set-output name=name::$NAME"
echo "::set-output name=changelog::$CHANGELOG"
echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier"
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "name=$NAME" >> $GITHUB_OUTPUT
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
Expand All @@ -134,13 +141,13 @@ jobs:

- name: Collect Tests Result
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: tests-result
path: ${{ github.workspace }}/build/reports/tests

- name: Setup Plugin Verifier IDEs Cache
uses: actions/cache@v2.1.7
uses: actions/cache@v3
with:
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides
key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
Expand All @@ -150,14 +157,14 @@ jobs:

- name: Collect Plugin Verifier Result
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: pluginVerifier-result
path: ${{ github.workspace }}/build/reports/pluginVerifier

- name: Qodana - Code Inspection
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: JetBrains/qodana-action@v4.2.5
uses: JetBrains/qodana-action@v2023.1.5

- name: Prepare Plugin Artifact
id: artifact
Expand All @@ -168,11 +175,11 @@ jobs:
FILENAME=`ls *.zip`
unzip "$FILENAME" -d content
echo "::set-output name=filename::${FILENAME:0:-4}"
echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
- name: Upload artifact
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v3
with:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/distributions/content/*/*
Expand All @@ -184,7 +191,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3

- name: Remove Old Release Drafts
env:
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3
with:
ref: ${{ github.event.release.tag_name }}

- name: Setup JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: liberica
java-version: 17
Expand All @@ -30,11 +30,9 @@ jobs:
EOM
)"
CHANGELOG="${CHANGELOG//'%'/'%25'}"
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
echo "::set-output name=changelog::$CHANGELOG"
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Patch Changelog
if: ${{ steps.properties.outputs.changelog != '' }}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# LamaPlugin Changelog

## [Unreleased]
- Support 2023.2 EAP

## [0.2.5] - 2022-12-26

Expand Down
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ fun properties(key: String) = project.findProperty(key).toString()

plugins {
id("java")
id("org.jetbrains.kotlin.jvm") version "1.7.22"
id("org.jetbrains.intellij") version "1.11.0"
id("org.jetbrains.changelog") version "2.0.0"
id("org.jetbrains.qodana") version "0.1.13"
alias(libs.plugins.kotlin)
alias(libs.plugins.gradleIntelliJPlugin)
alias(libs.plugins.changelog)
alias(libs.plugins.qodana)
}

group = properties("pluginGroup")
Expand Down
23 changes: 15 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,31 @@
pluginGroup=org.jetbrains.lama
pluginName=Lama
pluginRepositoryUrl = https://github.com/Mervap/LamaPlugin
pluginVersion=0.2.5
pluginVersion=0.2.6
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild=222
pluginUntilBuild=231.*
pluginUntilBuild=232.*

# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformType=IC
platformVersion=2022.2
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins =

gradleVersion=7.5.1
# Opt-out flag for bundling Kotlin standard library.
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details.
# suppress inspection "UnusedProperty"
gradleVersion=8.1.1
# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
kotlin.stdlib.default.dependency=false

# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
org.gradle.unsafe.configuration-cache = true
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

# Temporary workaround for Kotlin Compiler OutOfMemoryError -> https://jb.gg/intellij-platform-kotlin-oom
kotlin.incremental.useClasspathSnapshot=false
20 changes: 20 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[versions]
# libraries
annotations = "24.0.1"

# plugins
dokka = "1.8.10"
kotlin = "1.8.21"
changelog = "2.1.0"
gradleIntelliJPlugin = "1.14.1"
qodana = "0.1.13"

[libraries]
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }

[plugins]
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
gradleIntelliJPlugin = { id = "org.jetbrains.intellij", version.ref = "gradleIntelliJPlugin" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
qodana = { id = "org.jetbrains.qodana", version.ref = "qodana" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
19 changes: 12 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,13 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -143,12 +140,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down
6 changes: 3 additions & 3 deletions src/main/kotlin/org/jetbrains/lama/editor/LamaContextType.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.jetbrains.lama.editor

import com.intellij.codeInsight.template.FileTypeBasedContextType
import com.intellij.psi.PsiFile
import com.intellij.codeInsight.template.TemplateActionContext
import org.jetbrains.lama.psi.LamaFileType
import org.jetbrains.lama.psi.LamaLanguage

class LamaContextType : FileTypeBasedContextType("Lama", "&Lama", LamaFileType) {
override fun isInContext(file: PsiFile, offset: Int): Boolean {
return file.language.isKindOf(LamaLanguage)
override fun isInContext(templateActionContext: TemplateActionContext): Boolean {
return templateActionContext.file.language.isKindOf(LamaLanguage)
}
}

0 comments on commit 74a5702

Please sign in to comment.