Skip to content

Commit 2401c70

Browse files
committed
Migrate to new intellij plugin version and to Kotlin script for gradle build.gradle.kts.
1 parent ed1c2b5 commit 2401c70

File tree

3 files changed

+101
-38
lines changed

3 files changed

+101
-38
lines changed

src/ServiceStackIDEA/build.gradle

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

src/ServiceStackIDEA/build.gradle.kts

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
import io.gitlab.arturbosch.detekt.Detekt
2+
import org.jetbrains.changelog.markdownToHTML
3+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
4+
import java.io.FileInputStream
5+
import java.util.*
6+
7+
fun properties(key: String) = project.findProperty(key).toString()
8+
9+
plugins {
10+
id("org.jetbrains.kotlin.jvm") version "1.5.10"
11+
// gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
12+
id("org.jetbrains.intellij") version "1.0"
13+
// gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
14+
id("org.jetbrains.changelog") version "1.1.2"
15+
// detekt linter - read more: https://detekt.github.io/detekt/gradle.html
16+
id("io.gitlab.arturbosch.detekt") version "1.17.1"
17+
// ktlint linter - read more: https://github.com/JLLeitschuh/ktlint-gradle
18+
id("org.jlleitschuh.gradle.ktlint") version "10.0.0"
19+
}
20+
version = properties("pluginVersion")
21+
// Configure project's dependencies
22+
repositories {
23+
mavenCentral()
24+
}
25+
dependencies {
26+
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.17.1")
27+
}
28+
29+
intellij {
30+
version.set("2019.2")
31+
pluginName.set("ServiceStackIDEA")
32+
plugins.set(listOf("maven","java"))
33+
}
34+
35+
var pubNightly: String? = System.getenv("SERVICESTACKIDEA_PUBLISH_NIGHTLY")
36+
var buildNum: String? = System.getenv("BUILD_NUMBER")
37+
38+
39+
if(pubNightly != null && buildNum != null) {
40+
// Append build number to version for a new nightly build version to be published.
41+
version = "${version}.$buildNum"
42+
}
43+
44+
var jbToken: String? = ""
45+
46+
if (properties("jetbrains.plugins.user").isEmpty()) {
47+
val props = Properties()
48+
val fis = FileInputStream("local.properties")
49+
props.load(fis)
50+
}
51+
jbToken = properties("jetbrains.plugins.token")
52+
53+
tasks {
54+
55+
runPluginVerifier {
56+
ideVersions.set(listOf(
57+
"WS-2019.2",
58+
"WS-2020.2.4",
59+
"IIU-2020.1.1",
60+
"IIU-2021.1"
61+
))
62+
}
63+
64+
publishPlugin {
65+
token.set(jbToken)
66+
channels.set(listOf("beta"))
67+
}
68+
69+
patchPluginXml {
70+
version.set(properties("pluginVersion"))
71+
sinceBuild.set(properties("pluginSinceBuild"))
72+
untilBuild.set(properties("pluginUntilBuild"))
73+
}
74+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# IntelliJ Platform Artifacts Repositories
2+
# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
3+
4+
pluginGroup = org.jetbrains.plugins.template
5+
pluginName = IntelliJ Platform Plugin Template
6+
pluginVersion = 1.0.43
7+
8+
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
9+
# for insight into build numbers and IntelliJ Platform versions.
10+
pluginSinceBuild = 192
11+
pluginUntilBuild = 211.*
12+
13+
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
14+
# See https://jb.gg/intellij-platform-builds-list for available build versions.
15+
pluginVerifierIdeVersions = WS-2019.2, WS-2020.2.4, WS-2020.3.4, WS-2021.1.1
16+
17+
platformType = IC
18+
platformVersion = 2020.2.4
19+
platformDownloadSources = true
20+
21+
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
22+
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
23+
platformPlugins =
24+
25+
# Opt-out flag for bundling Kotlin standard library.
26+
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details.
27+
kotlin.stdlib.default.dependency = false

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy