forked from JetBrains/lets-plot-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
160 lines (137 loc) · 4.56 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
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
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm'
id 'maven-publish'
id "com.jfrog.bintray"
id 'org.jetbrains.dokka' version '0.10.0'
}
dokka {
outputFormat = 'html'
outputDirectory = "$projectDir/docs"
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
testCompile "junit:junit:$junit_version"
api "org.jetbrains.lets-plot:lets-plot-common:$lets_plot_version"
compileOnly "org.jetbrains.lets-plot:lets-plot-image-export:$lets_plot_version"
}
def artifactBaseName = 'lets-plot-kotlin-api'
def artifactGroupId = project.group
def artifactVersion = project.version
def task_group = 'lets plot'
task jarClasses(type: Jar, dependsOn: classes) {
group task_group
baseName artifactBaseName
version artifactVersion
from sourceSets.main.output
}
task jarSources(type: Jar) {
classifier 'sources'
group task_group
baseName artifactBaseName
version artifactVersion
from sourceSets.main.allSource
}
publishing {
publications {
letsPlotKotlinApi(MavenPublication) {
groupId artifactGroupId
artifactId artifactBaseName
version artifactVersion
artifact jarClasses
artifact jarSources
pom {
name = "Lets-Plot Kotlin API"
description = "Lets-Plot Kotlin API"
url = "https://github.com/JetBrains/lets-plot-kotlin"
licenses {
license {
name = "MIT"
url = "https://opensource.org/licenses/MIT"
}
}
developers {
developer {
id = "jetbrains"
name = "JetBrains"
email = "lets-plot@jetbrains.com"
}
}
scm {
url = "https://github.com/JetBrains/lets-plot-kotlin"
}
// Add dependency on lets-plot-common
withXml {
def deps = asNode().appendNode('dependencies')
def dep = deps.appendNode('dependency')
dep.appendNode('groupId', 'org.jetbrains.lets-plot')
dep.appendNode('artifactId', 'lets-plot-common')
dep.appendNode('version', lets_plot_version)
}
}
}
letsPlotKotlinApiKernel(MavenPublication) {
groupId artifactGroupId
artifactId "$artifactBaseName-kernel"
version artifactVersion
artifact jarClasses
artifact jarSources
pom {
name = "Lets-Plot Kotlin API (for Jupyter Kotlin Kernel)"
description = "Lets-Plot Kotlin API without fixed dependencies."
url = "https://github.com/JetBrains/lets-plot-kotlin"
licenses {
license {
name = "MIT"
url = "https://opensource.org/licenses/MIT"
}
}
developers {
developer {
id = "jetbrains"
name = "JetBrains"
email = "lets-plot@jetbrains.com"
}
}
scm {
url = "https://github.com/JetBrains/lets-plot-kotlin"
}
}
}
}
repositories {
maven {
url = uri("https://jetbrains.bintray.com/lets-plot-maven")
}
}
}
/*
* Copyright (c) 2019. JetBrains s.r.o.
* Use of this source code is governed by the MIT license that can be found in the LICENSE file.
*/
// Provide Bintray-specific Information
def bintray_user = project.buildSettings?.bintray?.user
def bintray_key = project.buildSettings?.bintray?.key
if (bintray_user != null && bintray_key != null) {
def pkg_name = 'lets-plot-kotlin-api-jars'
if (version.contains('SNAPSHOT') || version.contains('rc')) {
pkg_name = 'lets-plot-kotlin-api-jars-dev'
}
bintray {
user = bintray_user
key = bintray_key
publications = ['letsPlotKotlinApi', 'letsPlotKotlinApiKernel']
publish = true
override = true
pkg {
repo = 'lets-plot-maven'
name = pkg_name
userOrg = 'jetbrains'
licenses = ['MIT']
vcsUrl = 'https://github.com/JetBrains/lets-plot-kotlin'
version {
name = artifactVersion
}
}
}
}