-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathbuild.gradle.kts
160 lines (143 loc) · 4.02 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
id("maven-publish")
id("signing")
alias(builds.plugins.publish.shadow)
}
allprojects {
apply(plugin = "java")
repositories {
mavenCentral()
}
}
subprojects {
apply(plugin = "kotlin")
val javaVersion = "11"
java {
val jdkVersion = JavaVersion.toVersion(javaVersion)
sourceCompatibility = jdkVersion
targetCompatibility = jdkVersion
withSourcesJar()
withJavadocJar()
}
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.fromTarget(javaVersion))
}
}
}
group = "org.jetbrains.intellij"
val buildNumber = System.getenv("BUILD_NUMBER") ?: "SNAPSHOT"
version = "2.0.$buildNumber"
dependencies {
implementation(project("cli"))
implementation(project("rest"))
}
tasks {
jar {
manifest {
attributes("Main-Class" to "org.jetbrains.intellij.pluginRepository.Client")
}
}
}
artifacts {
archives(tasks.shadowJar)
}
publishing {
publications {
fun MavenPublication.configurePom() {
pom {
name.set("Plugin Repository Rest Client")
description.set("The client and command line interface for JetBrains Marketplace.")
url.set("https://github.com/JetBrains/plugin-repository-rest-client")
licenses {
license {
name.set("The Apache Software License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("AlexanderPrendota")
name.set("Alexander Prendota")
organization.set("JetBrains")
}
developer {
id.set("zolotov")
name.set("Alexander Zolotov")
organization.set("JetBrains")
}
developer {
id.set("serejke")
name.set("Sergey Patrikeev")
organization.set("JetBrains")
}
developer {
id.set("chashnikov")
name.set("Nikolay Chashnikov")
organization.set("JetBrains")
}
developer {
id.set("satamas")
name.set("Semyon Atamas")
organization.set("JetBrains")
}
developer {
id.set("chrkv")
name.set("Ivan Chirkov")
organization.set("JetBrains")
}
developer {
id.set("kesarevs")
name.set("Sergei Kesarev")
organization.set("JetBrains")
}
developer {
id.set("yole")
name.set("Dmitry Jemerov")
organization.set("JetBrains")
}
developer {
id.set("VladRassokhin")
name.set("Vladislav Rassokhin")
organization.set("JetBrains")
}
developer {
id.set("hsz")
name.set("Jakub Chrzanowski")
organization.set("JetBrains")
}
developer {
id.set("LChernigovskaya")
name.set("Lidiya Chernigovskaya")
organization.set("JetBrains")
}
}
scm {
connection.set("scm:git:git://github.com/JetBrains/plugin-repository-rest-client.git")
developerConnection.set("scm:git:ssh://github.com/JetBrains/plugin-repository-rest-client.git")
url.set("https://github.com/JetBrains/plugin-repository-rest-client")
}
}
}
create<MavenPublication>("plugin-repository-rest-client") {
groupId = project.group.toString()
artifactId = "plugin-repository-rest-client"
version = project.version.toString()
from(project(":services:plugin-repository-rest-client:rest").components["java"])
artifact(tasks.shadowJar) {
classifier = "all"
}
configurePom()
}
}
}
signing {
isRequired = buildNumber != "SNAPSHOT"
val signingKey: String? by project
val signingPassword: String? by project
if(isRequired) {
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications["plugin-repository-rest-client"])
}
}