forked from MinnDevelopment/jda-reactor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
101 lines (86 loc) · 2.71 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
import com.jfrog.bintray.gradle.BintrayExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
`java-library`
`maven-publish`
kotlin("jvm") version "1.3.21"
id("com.jfrog.bintray") version "1.8.4"
}
group = "club.minnced"
version = "0.1.7"
repositories {
jcenter()
}
dependencies {
compileOnly("net.dv8tion:JDA:4.ALPHA.0_49")
api("io.projectreactor:reactor-core:3.2.5.RELEASE")
implementation(kotlin("stdlib"))
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
val jar: Jar by tasks
val javadoc: Javadoc by tasks
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
javadoc.apply {
isFailOnError = false
options.memberLevel = JavadocMemberLevel.PUBLIC
options.encoding = "UTF-8"
if (options is StandardJavadocDocletOptions) {
val opt = options as StandardJavadocDocletOptions
opt.author()
opt.links(
"https://projectreactor.io/docs/core/3.1.2.RELEASE/api/",
"https://docs.oracle.com/javase/8/docs/api/",
"https://ci.dv8tion.net/job/JDA4-Alpha/javadoc")
if (JavaVersion.current().isJava9Compatible) {
opt.addBooleanOption("html5", true)
}
}
}
val sourcesJar = task<Jar>("sourcesJar") {
from(sourceSets["main"].allSource)
classifier = "sources"
}
val javadocJar = task<Jar>("javadocJar") {
from(javadoc.destinationDir)
classifier = "javadoc"
dependsOn(javadoc)
}
publishing {
publications {
register("BintrayRelease", MavenPublication::class) {
from(components["java"])
groupId = project.group as String
artifactId = project.name
version = project.version as String
artifact(javadocJar)
artifact(sourcesJar)
}
}
}
bintray {
setPublications("BintrayRelease")
user = properties["bintrayName"] as? String ?: ""
key = properties["bintrayKey"] as? String ?: ""
pkg(delegateClosureOf<BintrayExtension.PackageConfig> {
setLicenses("Apache-2.0")
repo = "maven"
vcsUrl = "https://github.com/MinnDevelopment/jda-reactor"
githubRepo = "minndevelopment/jda-reactor"
issueTrackerUrl = "$vcsUrl/issues"
websiteUrl = vcsUrl
desc = "A collection of kotlin extensions for JDA that make use with reactor-core easier."
setLabels("reactive", "jda", "discord", "kotlin")
name = project.name
publish = true
publicDownloadNumbers = true
version(delegateClosureOf<BintrayExtension.VersionConfig> {
name = project.version as String
gpg.sign = true
})
})
}