-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
86 lines (72 loc) · 2.06 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.gradle.api.tasks.bundling.Jar
plugins {
kotlin("jvm") version "1.3.21"
`maven-publish`
id("com.jfrog.bintray") version "1.8.4"
}
group = "org.chisou.arch"
version = "1.3.1"
val artifactName = project.name
val artifactGroup = project.group.toString()
val artifactVersion = project.version.toString()
val vcsUrl = "https://github.com/chisou/kotlin-kli"
val slf4jVersion = "1.7.26"
val kotlintestVersion = "2.0.7"
val kluentVersion = "1.49"
val junitRunnerVersion = "3.3.1"
repositories {
mavenCentral()
jcenter()
mavenLocal()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(kotlin("reflect"))
implementation("org.slf4j:slf4j-api:$slf4jVersion")
testImplementation("io.kotlintest:kotlintest:$kotlintestVersion")
testImplementation("org.amshove.kluent:kluent:$kluentVersion")
testImplementation("org.chisou.test:slf4j-mockito:1.2")
testRuntime("io.kotlintest:kotlintest-runner-junit5:$junitRunnerVersion")
}
val sourcesJar by tasks.registering(Jar::class) {
classifier = "sources"
from(sourceSets["main"].allSource)
}
val testSourcesJar by tasks.registering(Jar::class) {
classifier = "testSources"
from(sourceSets["test"].allSource)
}
publishing {
publications {
create<MavenPublication>(artifactName) {
groupId = artifactGroup
artifactId = artifactName
version = artifactVersion
from(components["java"])
artifact(sourcesJar.get())
artifact(testSourcesJar.get())
}
}
}
bintray {
user = System.getenv("BINTRAY_USER")
key = System.getenv("BINTRAY_KEY")
publish = true
setPublications(artifactName)
with(pkg){
repo = "maven"
name = artifactName
vcsUrl = vcsUrl
setLicenses("Apache-2.0")
with(version) {
name = artifactVersion
}
}
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
val test by tasks.getting(Test::class) {
useJUnitPlatform { }
}