forked from viartemev/requestmapper
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
73 lines (60 loc) · 2.26 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
val env: MutableMap<String, String> = System.getenv()
val dir: String = projectDir.parentFile.absolutePath
fun properties(key: String) = providers.gradleProperty(key)
plugins {
// Java support
id("java")
alias(libs.plugins.kotlin)
alias(libs.plugins.gradleIntelliJPlugin)
}
group = properties("pluginGroup").get()
version = properties("pluginVersion").get()
repositories {
mavenCentral()
// IntelliJ Platform Gradle Plugin Repositories Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-repositories-extension.html
intellijPlatform {
defaultRepositories()
}
}
dependencies {
intellijPlatform {
create(properties("platformType"), properties("platformVersion"))
// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
bundledPlugins(properties("platformBundledPlugins").map { it.split(',') })
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace.
plugins(properties("platformPlugins").map { it.split(',') })
instrumentationTools()
zipSigner()
}
}
intellijPlatform {
pluginConfiguration {
name = properties("pluginName").get()
version = project.version.toString()
ideaVersion {
sinceBuild = properties("pluginSinceBuild").get()
}
}
sandboxContainer = layout.projectDirectory.dir("idea-sandbox")
buildSearchableOptions = false
signing {
certificateChainFile.set(File(env.getOrDefault("CERTIFICATE_CHAIN", "$dir/pluginCert/chain.crt")))
privateKeyFile.set(File(env.getOrDefault("PRIVATE_KEY", "$dir/pluginCert/private.pem")))
password.set(File(env.getOrDefault("PRIVATE_KEY_PASSWORD", "$dir/pluginCert/password.txt")).readText(Charsets.UTF_8))
}
publishing {
token.set(env["PUBLISH_TOKEN"])
channels.set(listOf(env["PUBLISH_CHANNEL"] ?: "default"))
}
}
kotlin {
jvmToolchain(properties("javaVersion").get().toInt())
}
tasks {
runIde {
systemProperties["idea.is.internal"] = true
}
wrapper {
gradleVersion = properties("gradleVersion").get()
}
}