-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
98 lines (86 loc) · 2.58 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
import com.jfrog.bintray.gradle.BintrayExtension
import com.jfrog.bintray.gradle.tasks.BintrayUploadTask
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.4.0"
maven
`maven-publish`
//application
//id("com.github.johnrengelman.shadow") version "6.0.0"
id("com.jfrog.bintray") version "1.8.5"
id("org.jetbrains.dokka") version "0.10.1"
}
group = "io.github.cafeteriaguild"
version = "0.3"
repositories {
mavenCentral()
jcenter()
repositories {
maven {
setUrl("https://dl.bintray.com/adriantodt/maven")
}
}
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
//api(kotlin("scripting-jsr223"))
//api(kotlin("scripting-jsr223-embeddable"))
//implementation("it.unimi.dsi:fastutil:8.3.1")
api("io.github.cafeteriaguild:Lin:0.4.1")
implementation("com.github.adriantodt:tartar:1.5.3")
implementation("pw.aru.libs:eventpipes:1.5")
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_10
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "10"
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
}
val sourceJar by tasks.creating(Jar::class) {
dependsOn(tasks["classes"])
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
}
val dokka by tasks.getting(DokkaTask::class) {
outputFormat = "html"
outputDirectory = "$buildDir/javadoc"
//configuration {
// perPackageOption {
// prefix = "com.github.adriantodt.tartar.impl"
// suppress = true
// }
//}
}
val javadocJar by tasks.creating(Jar::class) {
dependsOn(dokka)
archiveClassifier.set("javadoc")
from(dokka.outputDirectory)
}
publishing {
publications.create("mavenJava", MavenPublication::class.java) {
groupId = project.group.toString()
artifactId = project.name
version = project.version.toString()
from(components["kotlin"])
artifact(sourceJar)
artifact(javadocJar)
}
}
fun findProperty(s: String) = project.findProperty(s) as String?
bintray {
user = findProperty("bintrayUsername")
key = findProperty("bintrayApiKey")
publish = true
setPublications("mavenJava")
pkg(delegateClosureOf<BintrayExtension.PackageConfig> {
repo = "maven"
name = project.name
setLicenses("MIT")
vcsUrl = "https://github.com/CafeteriaGuild/CoffeeComputersCore.git"
})
}
tasks.withType<BintrayUploadTask> {
dependsOn("build", "publishToMavenLocal")
}