Skip to content

Commit

Permalink
version 1.1.3 for PhpStorm 2023.2 (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danil42Russia authored Aug 24, 2023
1 parent 94c65e8 commit 5640576
Show file tree
Hide file tree
Showing 20 changed files with 94 additions and 83 deletions.
2 changes: 1 addition & 1 deletion .run/Run Plugin.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>
</component>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
<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>
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

## 1.1.2 — 21.08.2023

- Adapt code for PhpStorm 2023.2

## 1.1.2 — 14.08.2023

- Adapt code for PhpStorm 2023.1
Expand Down
42 changes: 15 additions & 27 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@ import org.jetbrains.changelog.Changelog
fun properties(key: String) = providers.gradleProperty(key)

plugins {
// Java support
id("java")
// Kotlin support
id("org.jetbrains.kotlin.jvm") version "1.8.10"
// Gradle IntelliJ Plugin
id("org.jetbrains.intellij") version "1.13.2"
// Gradle Changelog Plugin
id("org.jetbrains.changelog") version "2.0.0"
// Gradle Kover Plugin
id("org.jetbrains.kotlinx.kover") version "0.6.1"
id("java") // Java support
alias(libs.plugins.kotlin) // Kotlin support
alias(libs.plugins.gradleIntelliJPlugin) // Gradle IntelliJ Plugin
alias(libs.plugins.changelog) // Gradle Changelog Plugin
}

group = properties("pluginGroup").get()
Expand All @@ -28,30 +22,24 @@ kotlin {
jvmToolchain(17)
}

// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
dependencies {
testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
}

// Configure Gradle IntelliJ Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
intellij {
pluginName.set(properties("pluginName"))
version.set(properties("platformVersion"))
type.set(properties("platformType"))
pluginName = properties("pluginName")
version = properties("platformVersion")
type = properties("platformType")

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

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

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

tasks {
Expand All @@ -60,13 +48,13 @@ tasks {
}

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

val changelog = project.changelog // local variable for configuration cache compatibility
// Get the latest available change notes from the changelog file
changeNotes.set(properties("pluginVersion").map { pluginVersion ->
changeNotes = properties("pluginVersion").map { pluginVersion ->
with(changelog) {
renderItem(
(getOrNull(pluginVersion) ?: getUnreleased())
Expand All @@ -75,7 +63,7 @@ tasks {
Changelog.OutputType.HTML,
)
}
})
}
}

runIde {
Expand Down
25 changes: 13 additions & 12 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,31 @@ pluginName = modulite
pluginRepositoryUrl = https://github.com/VKCOM/modulite

# SemVer format -> https://semver.org
pluginVersion = 1.1.2
pluginVersion = 1.1.3

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

# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
platformType = IU
platformVersion = 2023.1
platformVersion = 2023.2

# 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
# YAML Plugin - https://plugins.jetbrains.com/plugin/13126-yaml/versions
platformPlugins = com.jetbrains.php:231.8109.199, org.jetbrains.plugins.yaml:231.8109.126
platformPlugins = com.jetbrains.php:232.8660.205, org.jetbrains.plugins.yaml:232.8660.88

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

# 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"
kotlin.stdlib.default.dependency = false
gradleVersion = 8.3

# 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
14 changes: 14 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[versions]
# libraries

# plugins
kotlin = "1.9.0"
changelog = "2.1.2"
gradleIntelliJPlugin = "1.15.0"

[libraries]

[plugins]
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
gradleIntelliJPlugin = { id = "org.jetbrains.intellij", version.ref = "gradleIntelliJPlugin" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 2 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
4 changes: 4 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.6.0"
}

rootProject.name = "modulite"
14 changes: 7 additions & 7 deletions src/test/fixtures/hints/Module/AllAllowedForModule2.php.expected
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

namespace Module\AllAllowedForModule2;

<# [internal in @module [(visible for @module2 )]] #>class Some {
/*<# [internal in @module [(visible for @module2 )]] #>*/class Some {
}

<# [internal in @module [(visible for @module2 )]] #>interface Other {
<# [internal in @module [(visible for @module2 )]] #>static function interfaceMethod();
/*<# [internal in @module [(visible for @module2 )]] #>*/interface Other {
/*<# [internal in @module [(visible for @module2 )]] #>*/static function interfaceMethod();
}

define("ALL_ALLOWED_FOR_MODULE2_NAME", 0)<# [internal in @module [(visible for @module2 )]] #>;
define("ALL_ALLOWED_FOR_MODULE2_NAME", 0)/*<# [internal in @module [(visible for @module2 )]] #>*/;

const SOME = 0<# [internal in @module []] #>, OTHER = 0<# [internal in @module [(visible for @module2 )]] #>;
const SOME = 0/*<# [internal in @module []] #>*/, OTHER = 0/*<# [internal in @module [(visible for @module2 )]] #>*/;

$AllAllowedForModule2Global = 10;

<# [internal in @module [(visible for @module2 )]] #>class TestClass extends Some implements Other {
/*<# [internal in @module [(visible for @module2 )]] #>*/class TestClass extends Some implements Other {
public const CONSTANT = 0;
public $field = 0;
public static $staticField = 0;

<# [internal in @module [(visible for @module2 )]] #>public static function interfaceMethod() {
/*<# [internal in @module [(visible for @module2 )]] #>*/public static function interfaceMethod() {
}

private function privateFunction() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

namespace Module\AllAllowedForSeveralModulites;

<# [internal in @module [(visible for specific modulites)]] #>class Some {
/*<# [internal in @module [(visible for specific modulites)]] #>*/class Some {
}

<# [internal in @module [(visible for specific modulites)]] #>interface Other {
<# [internal in @module [(visible for specific modulites)]] #>static function interfaceMethod();
/*<# [internal in @module [(visible for specific modulites)]] #>*/interface Other {
/*<# [internal in @module [(visible for specific modulites)]] #>*/static function interfaceMethod();
}

define("ALL_ALLOWED_FOR_SEVERAL_MODULITES", 0)<# [internal in @module [(visible for specific modulites)]] #>;
define("ALL_ALLOWED_FOR_SEVERAL_MODULITES", 0)/*<# [internal in @module [(visible for specific modulites)]] #>*/;

const SOME = 0<# [internal in @module [(visible for specific modulites)]] #>, OTHER = 0<# [internal in @module [(visible for specific modulites)]] #>;
const SOME = 0/*<# [internal in @module [(visible for specific modulites)]] #>*/, OTHER = 0/*<# [internal in @module [(visible for specific modulites)]] #>*/;

$AllAllowedForSeveralModulitesGlobal = 10;

<# [internal in @module [(visible for specific modulites)]] #>class TestClass extends Some implements Other {
/*<# [internal in @module [(visible for specific modulites)]] #>*/class TestClass extends Some implements Other {
public const CONSTANT = 0;
public $field = 0;
public static $staticField = 0;

<# [internal in @module [(visible for specific modulites)]] #>public static function interfaceMethod() {
/*<# [internal in @module [(visible for specific modulites)]] #>*/public static function interfaceMethod() {
}

private function privateFunction() {}
Expand Down
14 changes: 7 additions & 7 deletions src/test/fixtures/hints/Module/AllExport.php.expected
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

namespace Module\AllExport;

<# [exported from @module []] #>class Some {
/*<# [exported from @module []] #>*/class Some {
}

<# [exported from @module []] #>interface Other {
<# [exported from @module []] #>static function interfaceMethod();
/*<# [exported from @module []] #>*/interface Other {
/*<# [exported from @module []] #>*/static function interfaceMethod();
}

define("ALL_EXPORT_NAME", 0)<# [exported from @module []] #>;
define("ALL_EXPORT_NAME", 0)/*<# [exported from @module []] #>*/;

const SOME = 0<# [exported from @module []] #>, OTHER = 0<# [exported from @module []] #>;
const SOME = 0/*<# [exported from @module []] #>*/, OTHER = 0/*<# [exported from @module []] #>*/;

$AllExportGlobal = 10;

<# [exported from @module []] #>class TestClass extends Some implements Other {
/*<# [exported from @module []] #>*/class TestClass extends Some implements Other {
public const CONSTANT = 0;
public $field = 0;
public static $staticField = 0;

<# [exported from @module []] #>public static function interfaceMethod() {
/*<# [exported from @module []] #>*/public static function interfaceMethod() {
}

private function privateFunction() {}
Expand Down
14 changes: 7 additions & 7 deletions src/test/fixtures/hints/Module/AllInternal.php.expected
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

namespace Module\AllInternal;

<# [internal in @module []] #>class Some {
/*<# [internal in @module []] #>*/class Some {
}

<# [internal in @module []] #>interface Other {
<# [internal in @module []] #>static function interfaceMethod();
/*<# [internal in @module []] #>*/interface Other {
/*<# [internal in @module []] #>*/static function interfaceMethod();
}

define("ALL_INTERNAL_NAME", 0)<# [internal in @module []] #>;
define("ALL_INTERNAL_NAME", 0)/*<# [internal in @module []] #>*/;

const SOME = 0<# [internal in @module []] #>, OTHER = 0<# [internal in @module []] #>;
const SOME = 0/*<# [internal in @module []] #>*/, OTHER = 0/*<# [internal in @module []] #>*/;

$AllInternalGlobal = 10;

<# [internal in @module []] #>class TestClass extends Some implements Other {
/*<# [internal in @module []] #>*/class TestClass extends Some implements Other {
public const CONSTANT = 0;
public $field = 0;
public static $staticField = 0;

<# [internal in @module []] #>public static function interfaceMethod() {
/*<# [internal in @module []] #>*/public static function interfaceMethod() {
}

private function privateFunction() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

namespace Module\InternMethod;

<# [internal in @module []] #>class Some {
<# [internal in @module [(visible for @module2 )]] #>public static function foo() {}
/*<# [internal in @module []] #>*/class Some {
/*<# [internal in @module [(visible for @module2 )]] #>*/public static function foo() {}
}
4 changes: 2 additions & 2 deletions src/test/fixtures/hints/Module/AutoExportMethod.php.expected
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

namespace Module\AutoExportMethod;

<# [exported from @module []] #>class Some {
<# [exported from @module []] #>public static function foo() {}
/*<# [exported from @module []] #>*/class Some {
/*<# [exported from @module []] #>*/public static function foo() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Module\AutoExportMethodOfAllowedClass;

<# [internal in @module [(visible for @module2 )]] #>class TestClass {
<# [internal in @module [(visible for @module2 )]] #>public static function interfaceMethod() {
*/<# [internal in @module [(visible for @module2 )]] #>*/class TestClass {
*/<# [internal in @module [(visible for @module2 )]] #>*/public static function interfaceMethod() {
}
}
4 changes: 2 additions & 2 deletions src/test/fixtures/hints/Module/HideMethod.php.expected
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

namespace Module\HideMethod;

<# [exported from @module []] #>class Some {
<# [internal in @module []] #>public static function foo() {}
/*<# [exported from @module []] #>*/class Some {
/*<# [internal in @module []] #>*/public static function foo() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Module\HideMethod;

<# [exported from @module []] #>class Some {
<# [exported from @module []] #>public static function publicStatic() {}
/*<# [exported from @module []] #>*/class Some {
/*<# [exported from @module []] #>*/public static function publicStatic() {}

public function publicNotStatic() {}

Expand Down

0 comments on commit 5640576

Please sign in to comment.