forked from outfoxx/typescriptpoet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
127 lines (90 loc) · 1.86 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
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
jacoco
kotlin("jvm") version "1.9.22"
id("org.jmailen.kotlinter") version "4.3.0"
id("convention.publication")
}
val releaseVersion: String by project
val isSnapshot = releaseVersion.endsWith("SNAPSHOT")
group = "de.voize"
version = releaseVersion
description = "A Kotlin/Java API for generating .ts source files."
//
// DEPENDENCIES
//
// Versions
val guavaVersion = "22.0"
val junitJupiterVersion = "5.6.2"
val hamcrestVersion = "1.3"
repositories {
mavenCentral()
}
dependencies {
//
// LANGUAGES
//
// kotlin
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-reflect")
//
// MISCELLANEOUS
//
implementation("com.google.guava:guava:$guavaVersion")
//
// TESTING
//
// junit
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
testImplementation("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")
testImplementation("org.hamcrest:hamcrest-all:$hamcrestVersion")
}
//
// COMPILE
//
val javaVersion = JavaVersion.VERSION_1_8
java {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
withSourcesJar()
}
tasks {
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "$javaVersion"
}
}
}
//
// TEST
//
jacoco {
toolVersion = "0.8.11"
}
tasks {
test {
useJUnitPlatform()
finalizedBy(jacocoTestReport)
jacoco {}
}
jacocoTestReport {
dependsOn(test)
}
}
//
// PUBLISHING
//
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
pom {
name.set("TypeScript Poet")
description.set("TypeScriptPoet is a Kotlin and Java API for generating .ts source files.")
}
}
}
}
tasks.withType<Sign>().configureEach {
onlyIf { !isSnapshot }
}