Skip to content

Commit b25a365

Browse files
committed
gradle update
1 parent d57daa3 commit b25a365

File tree

7 files changed

+303
-177
lines changed

7 files changed

+303
-177
lines changed

build.gradle

Lines changed: 0 additions & 67 deletions
This file was deleted.

build.gradle.kts

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
3+
fun properties(key: String) = project.findProperty(key).toString()
4+
5+
plugins {
6+
// Java support
7+
id("java")
8+
// Kotlin support
9+
id("org.jetbrains.kotlin.jvm") version "1.8.10"
10+
// Gradle IntelliJ Plugin
11+
id("org.jetbrains.intellij") version "1.13.3"
12+
// Gradle Changelog Plugin
13+
id("org.jetbrains.changelog") version "1.3.1"
14+
// Gradle Qodana Plugin
15+
id("org.jetbrains.qodana") version "0.1.13"
16+
}
17+
18+
group = properties("pluginGroup")
19+
version = properties("pluginVersion")
20+
21+
// Configure project's dependencies
22+
repositories {
23+
mavenCentral()
24+
}
25+
26+
dependencies {
27+
implementation("org.junit.jupiter:junit-jupiter:5.8.2")
28+
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.8.2")
29+
}
30+
31+
// Configure Gradle IntelliJ Plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
32+
intellij {
33+
pluginName.set(properties("pluginName"))
34+
version.set(properties("platformVersion"))
35+
type.set(properties("platformType"))
36+
37+
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
38+
plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty))
39+
}
40+
41+
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
42+
changelog {
43+
version.set(properties("pluginVersion"))
44+
groups.set(emptyList())
45+
}
46+
47+
// Configure Gradle Qodana Plugin - read more: https://github.com/JetBrains/gradle-qodana-plugin
48+
qodana {
49+
cachePath.set(projectDir.resolve(".qodana").canonicalPath)
50+
reportPath.set(projectDir.resolve("build/reports/inspections").canonicalPath)
51+
saveReport.set(true)
52+
showReport.set(System.getenv("QODANA_SHOW_REPORT")?.toBoolean() ?: false)
53+
}
54+
55+
tasks {
56+
// Set the JVM compatibility versions
57+
properties("javaVersion").let {
58+
withType<JavaCompile> {
59+
sourceCompatibility = it
60+
targetCompatibility = it
61+
}
62+
withType<KotlinCompile> {
63+
kotlinOptions.jvmTarget = it
64+
}
65+
}
66+
67+
wrapper {
68+
gradleVersion = properties("gradleVersion")
69+
}
70+
71+
patchPluginXml {
72+
version.set(properties("pluginVersion"))
73+
sinceBuild.set(properties("pluginSinceBuild"))
74+
untilBuild.set(properties("pluginUntilBuild"))
75+
changeNotes.set(file("src/main/resources/META-INF/change-notes.html").readText().replace("<html>", "").replace("</html>", ""))
76+
77+
// Get the latest available change notes from the changelog file
78+
// changeNotes.set(provider {
79+
// changelog.run {
80+
// getOrNull(properties("pluginVersion")) ?: getLatest()
81+
// }.toHTML()
82+
// })
83+
}
84+
85+
// Configure UI tests plugin
86+
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
87+
runIdeForUiTests {
88+
systemProperty("robot-server.port", "8082")
89+
systemProperty("ide.mac.message.dialogs.as.sheets", "false")
90+
systemProperty("jb.privacy.policy.text", "<!--999.999-->")
91+
systemProperty("jb.consents.confirmation.enabled", "false")
92+
}
93+
94+
signPlugin {
95+
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
96+
privateKey.set(System.getenv("PRIVATE_KEY"))
97+
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
98+
}
99+
100+
publishPlugin {
101+
// dependsOn("patchChangelog")
102+
token.set(System.getenv("PUBLISH_TOKEN"))
103+
// pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
104+
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
105+
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
106+
channels.set(listOf(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first()))
107+
}
108+
109+
test {
110+
// Support "setUp" like "BasePlatformTestCase::setUp" as valid test structure
111+
useJUnitPlatform {
112+
includeEngines("junit-vintage")
113+
}
114+
}
115+
}

gradle.properties

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1-
ideaVersion = IU-2021.3
2-
phpPluginVersion = 213.5744.279
3-
twigPluginVersion = 213.5744.224
1+
# IntelliJ Platform Artifacts Repositories
2+
# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
3+
4+
pluginGroup = de.espend.idea.php.toolbox
5+
pluginName = PHP Toolbox
6+
7+
# SemVer format -> https://semver.org
8+
pluginVersion = 6.2.0
9+
10+
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
11+
# for insight into build numbers and IntelliJ Platform versions.
12+
pluginSinceBuild = 223
13+
pluginUntilBuild =
14+
15+
# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
16+
platformType = IU
17+
platformVersion = 2022.3.2
18+
19+
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
20+
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
21+
platformPlugins = java,webDeployment,com.jetbrains.php:223.8617.59,com.jetbrains.twig:223.8617.59
22+
23+
# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
24+
javaVersion = 17
25+
26+
# Gradle Releases -> https://github.com/gradle/gradle/releases
27+
gradleVersion = 7.6
28+
29+
# Opt-out flag for bundling Kotlin standard library.
30+
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details.
31+
# suppress inspection "UnusedProperty"
32+
kotlin.stdlib.default.dependency = false

gradle/wrapper/gradle-wrapper.jar

618 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)