Skip to content

Commit

Permalink
version 1.3.3 for PhpStorm 2022.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Danil42Russia committed Dec 14, 2022
1 parent ee13f9e commit 1d88fad
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 195 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

# Validate wrapper
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.0.4
uses: gradle/wrapper-validation-action@v1.0.5

# Setup Java 11 environment for the next steps
- name: Setup Java
Expand Down
68 changes: 35 additions & 33 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
import io.gitlab.arturbosch.detekt.Detekt
import org.apache.tools.ant.filters.ReplaceTokens
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.changelog.Changelog

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

plugins {
// Java support
id("java")
// Kotlin support
id("org.jetbrains.kotlin.jvm") version "1.7.10"
id("org.jetbrains.kotlin.jvm") version "1.7.21"
// gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
id("org.jetbrains.intellij") version "1.8.0"
id("org.jetbrains.intellij") version "1.10.0"
// gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
id("org.jetbrains.changelog") version "1.3.1"
id("org.jetbrains.changelog") version "2.0.0"
// kotlinx serialization - read more: https://github.com/Kotlin/kotlinx.serialization
kotlin("plugin.serialization") version "1.5.31"
// detekt linter - read more: https://github.com/detekt/detekt
id("io.gitlab.arturbosch.detekt") version "1.21.0"
id("io.gitlab.arturbosch.detekt") version "1.22.0"
// diktat linter - read more: https://github.com/saveourtool/diktat
id("org.cqfn.diktat.diktat-gradle-plugin") version "1.2.3"
id("org.cqfn.diktat.diktat-gradle-plugin") version "1.2.4.2"
// Gradle Kover Plugin
id("org.jetbrains.kotlinx.kover") version "0.6.1"
}

group = properties("pluginGroup")
Expand All @@ -28,32 +29,39 @@ version = properties("pluginVersion")
repositories {
mavenCentral()
}

// Set the JVM language level used to build project. Use Java 11 for 2020.3+, and Java 17 for 2022.2+.
kotlin {
jvmToolchain(17)
}

dependencies {
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.21.0")
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.22.0")

implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3")
implementation("org.jetbrains:markdown:0.2.4")
implementation("io.sentry:sentry:6.1.0")
}

// Configure gradle-intellij-plugin plugin.
// Read more: https://github.com/JetBrains/gradle-intellij-plugin
// Configure Gradle IntelliJ Plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
intellij {
pluginName.set(properties("pluginName"))
version.set(properties("platformVersion"))
type.set(properties("platformType"))
downloadSources.set(properties("platformDownloadSources").toBoolean())
updateSinceUntilBuild.set(true)

// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty))
}

// Configure gradle-changelog-plugin plugin.
// Read more: https://github.com/JetBrains/gradle-changelog-plugin
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
changelog {
version.set(properties("pluginVersion"))
groups.set(emptyList())
repositoryUrl.set(properties("pluginRepositoryUrl"))
}

// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration
kover.xmlReport {
onCheck.set(true)
}

// Configure detekt plugin.
Expand Down Expand Up @@ -81,33 +89,27 @@ tasks {
}
}

properties("javaVersion").let {
withType<JavaCompile> {
sourceCompatibility = it
targetCompatibility = it
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = it
}
withType<Detekt> {
jvmTarget = it
}
}

wrapper {
gradleVersion = properties("gradleVersion")
}

runIde {
maxHeapSize = "2g"
}

patchPluginXml {
version.set(properties("pluginVersion"))
sinceBuild.set(properties("pluginSinceBuild"))
untilBuild.set(properties("pluginUntilBuild"))

// Get the latest available change notes from the changelog file
changeNotes.set(provider { changelog.getLatest().toHTML() })
changeNotes.set(provider {
with(changelog) {
renderItem(
getOrNull(properties("pluginVersion")) ?: getLatest(),
Changelog.OutputType.HTML,
)
}
})
}

runIde {
maxHeapSize = "2g"
}
}
43 changes: 23 additions & 20 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html

pluginGroup=com.vk
pluginName=admstorm
pluginVersion=1.3.2
pluginRepositoryUrl = https://github.com/VKCOM/admstorm

# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
platformType=IU
platformDownloadSources=true
platformVersion=2022.2.1
# SemVer format -> https://semver.org
pluginVersion=1.3.3

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild=222
pluginUntilBuild=222.*
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild=223
pluginUntilBuild=223.*

# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
javaVersion=11
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformType = IU
platformVersion = 2022.3

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion=7.5.1
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
# PHP Plugin - https://plugins.jetbrains.com/plugin/6610-php/versions
# Terminal Plugin - https://plugins.jetbrains.com/plugin/13123-terminal/versions
platformPlugins=com.jetbrains.php:223.7571.212, Git4Idea, org.jetbrains.plugins.terminal:223.7571.125, org.jetbrains.plugins.remote-run

# https://plugins.jetbrains.com/plugin/6610-php/versions
# https://plugins.jetbrains.com/plugin/13123-terminal/versions
platformPlugins=com.jetbrains.php:222.3739.61, com.intellij.css, JavaScript, git4idea, org.jetbrains.plugins.terminal:222.3739.67, org.jetbrains.plugins.remote-run
# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 7.6

# Opt-out flag for bundling Kotlin standard library.
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details.
# Opt-out flag for bundling Kotlin standard library -> https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library
# suppress inspection "UnusedProperty"
kotlin.code.style=official
kotlin.stdlib.default.dependency=false
kotlin.stdlib.default.dependency = false

# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
org.gradle.unsafe.configuration-cache = true
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-7.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 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,10 +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##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# 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"'
Expand Down Expand Up @@ -143,12 +143,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
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

This file was deleted.

5 changes: 0 additions & 5 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
<depends>com.intellij.modules.platform</depends>
<depends>org.jetbrains.plugins.remote-run</depends>
<depends>org.jetbrains.plugins.terminal</depends>
<depends>com.intellij.css</depends>
<depends>com.jetbrains.php</depends>
<depends>JavaScript</depends>
<depends>Git4Idea</depends>

<projectListeners>
Expand Down Expand Up @@ -144,9 +142,6 @@
enabledByDefault="true" level="WARNING"
implementationClass="com.vk.admstorm.inspections.WrongFileNameBenchmarkInspection"/>

<psi.referenceContributor
implementation="com.vk.admstorm.psi.references.JiraReferenceContributor"/>

<errorHandler implementation="com.vk.admstorm.diagnostic.SentryErrorReporter"/>

<!-- <toolWindow id="Service List" icon="icons/services.svg" anchor="right" doNotActivateOnStart="true"-->
Expand Down

0 comments on commit 1d88fad

Please sign in to comment.