-
-
Notifications
You must be signed in to change notification settings - Fork 140
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
95 lines (77 loc) · 2.19 KB
/
build.gradle.kts
File metadata and controls
95 lines (77 loc) · 2.19 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import java.io.ByteArrayOutputStream
plugins {
id("java")
id("idea")
id("org.jetbrains.intellij.platform") version "2.2.1"
}
group = "com.cmmoran"
// Native versioning: Get version from Git tags or fallback to 'unspecified'
fun getProjectVersion(): String {
return try {
val stdout = ByteArrayOutputStream()
exec {
commandLine("git", "describe", "--tags", "--always", "--dirty")
standardOutput = stdout
}
stdout.toString().trim().replaceFirst("^v".toRegex(), "")
} catch (_: Exception) {
"0.0.1-SNAPSHOT"
}
}
version = getProjectVersion()
// Helper to access 'jetbrains' extra property in a type-safe way
val jetbrains: Map<String, String> by extra
allprojects {
apply(plugin = "java")
// Use toolchains to ensure the correct JDK is used for compilation
extensions.configure<JavaPluginExtension> {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
repositories {
mavenCentral()
}
project.version = rootProject.version
extra["jetbrains"] = mapOf(
"version" to "2025.1.1",
"pycharm" to "PythonCore:242.21829.142",
"rubymine" to "org.jetbrains.plugins.ruby:242.21829.142",
"goland" to "org.jetbrains.plugins.go:242.21829.142",
"scala" to "org.intellij.scala:2024.2.25"
)
}
repositories {
intellijPlatform {
defaultRepositories()
}
}
intellijPlatform {
projectName.set("envfile")
buildSearchableOptions.set(false)
pluginConfiguration {
name.set("envfile")
ideaVersion {
sinceBuild.set("253")
untilBuild.set("999")
}
}
pluginVerification {
ides {
ide("IC", jetbrains["version"]!!)
}
}
}
dependencies {
intellijPlatform {
intellijIdeaCommunity(jetbrains["version"]!!)
bundledPlugin("com.intellij.java")
}
implementation(project(":envfile-products-idea"))
implementation(project(":envfile-products-pycharm"))
implementation(project(":envfile-products-rubymine"))
implementation(project(":envfile-products-goland"))
}
tasks.wrapper {
gradleVersion = "8.5"
}