-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
73 lines (57 loc) · 1.82 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.3.60"
`maven-publish`
id("com.jfrog.bintray") version "1.8.4"
}
project.group = "com.github.vittee.kformula"
project.version = "1.0.4"
repositories {
jcenter()
mavenCentral()
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7")
testImplementation("org.jetbrains.kotlin:kotlin-reflect")
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "1.6"
}
val javaDocJar by tasks.creating(Jar::class) {
archiveClassifier.set("javadoc")
}
val sourcesJar by tasks.creating(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
publishing {
publications {
create<MavenPublication>("default") {
from(components["java"])
groupId = "com.github.vittee.kformula"
artifactId = "kformula"
artifact(sourcesJar) {
classifier = "sources"
}
}
}
}
val bintrayUsername = (properties["bintrayUsername"] as String?) ?: System.getenv("BINTRAY_USER")
val bintrayApiKey = (properties["bintrayApiKey"] as String?) ?: System.getenv("BINTRAY_APIKEY")
if (bintrayUsername != null && bintrayApiKey != null) {
bintray {
user = bintrayUsername
key = bintrayApiKey
pkg.apply {
repo = "kformula"
name = "kformula"
websiteUrl = "https://github.com/vittee/kformula"
vcsUrl = "https://github.com/vittee/kformula.git"
issueTrackerUrl = "https://github.com/vittee/kformula/issues"
setLicenses("MIT")
setPublications("default")
}
}
}