forked from wadoon/key-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
121 lines (104 loc) · 3.65 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.jetbrains.kotlin.jvm") version "1.5.31" apply (false)
id("org.jetbrains.dokka") version "1.6.10" apply (false)
`maven-publish`
`java-library`
}
repositories {
mavenCentral()
}
subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "org.jetbrains.dokka")
apply(plugin = "maven-publish")
apply(plugin = "java-library")
val plugin by configurations.creating
configurations {
implementation.get().extendsFrom(plugin)
}
repositories {
mavenCentral()
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven") }
maven("https://git.key-project.org/api/v4/projects/35/packages/maven")
}
dependencies {
val implementation by configurations
val plugin by configurations
plugin(platform("org.jetbrains.kotlin:kotlin-bom"))
plugin("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
plugin("com.github.ajalt:clikt:2.8.0")
plugin("org.jetbrains:annotations:23.0.0")
plugin("org.slf4j:slf4j-api:1.7.33")
// implementation("org.key_project:key.core")
val testImplementation by configurations
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.8.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
testImplementation("com.google.truth:truth:1.1.3")
testImplementation("org.slf4j:slf4j-simple:1.7.33")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "11"
}
}
tasks.withType<JavaCompile> {
options.release.set(11)
}
tasks.withType<Test> {
useJUnitPlatform()
reports.html.required.set(false)
reports.junitXml.required.set(true)
testLogging {
events("passed", "skipped", "failed")
showExceptions = true
}
}
java {
withJavadocJar()
withSourcesJar()
}
tasks.withType<Javadoc>() {
isFailOnError = false
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
url.set("http://github.com/wadoon/key-tools")
licenses {
license {
name.set("GPLv2+")
url.set("https://www.gnu.org/licenses/old-licenses/gpl-2.0.html")
}
}
developers {
developer {
id.set("weigl")
name.set("Alexander Weigl ")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:https://github.com/wadoon/key-tools.git")
developerConnection.set("scm:git:[email protected]:wadoon/key-tools.git")
url.set("http://github.com/wadoon/key-tools")
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/wadoon/key-tools")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
}
}