This repository has been archived by the owner on Oct 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild.gradle
77 lines (60 loc) · 1.59 KB
/
build.gradle
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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
id 'java'
id 'org.jetbrains.intellij' version '1.17.4'
id 'org.jetbrains.kotlin.jvm' version '2.0.20'
}
static def gitTag() {
def tag = ""
def proc = "git describe --tags".execute()
proc.in.eachLine { line -> tag = line }
proc.waitFor()
if (tag ==~ /v\d+\.\d+\.\d+/)
return [tag.substring(1), "default"]
def branch = ""
proc = "git rev-parse --abbrev-ref HEAD".execute()
proc.in.eachLine { line -> branch = line }
proc.waitFor()
[branch, "branch"]
}
def (String ver, String channel) = gitTag()
group 'com.ypwang.plugin'
version ver
repositories {
mavenCentral()
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version = 'LATEST-EAP-SNAPSHOT'
type = 'IU'
plugins = ['org.jetbrains.plugins.go:243.18137.10']
updateSinceUntilBuild = false
}
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}
def changeLog() {
def all = project.file('change-notes.htm').text
def count = 0
def idx = -1
// keep at most 5 recent change logs
while (count < 6) {
idx = all.indexOf("<p>", idx+1)
if (idx == -1)
return all
count++
}
return all.substring(0, idx) + """\n<a href="https://github.com/xxpxxxxp/intellij-plugin-golangci-lint/blob/master/change-notes.htm">Previous...</a>"""
}
patchPluginXml {
changeNotes = changeLog()
}
publishPlugin {
token = System.getenv("ORG_GRADLE_PROJECT_intellijPublishToken")
channels = [channel]
}
runIde {
maxHeapSize = "4g"
}