-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
158 lines (136 loc) · 4.97 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.sonarqube.gradle.SonarQubePlugin
plugins {
id("org.jetbrains.kotlin.jvm") version "2.0.21" apply (false)
id("org.jetbrains.dokka") version "1.9.20" apply (false)
`maven-publish`
`java-library`
id("com.diffplug.spotless") version "6.25.0" apply false
id("org.sonarqube") version "6.0.0.5145"
id("com.github.ben-manes.versions") version "0.51.0"
}
repositories {
mavenCentral()
}
sonar {
properties {
property("sonar.projectKey", "wadoon_key-tools")
property("sonar.organization", "wadoon")
property("sonar.host.url", "https://sonarcloud.io")
}
}
subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "org.jetbrains.dokka")
apply(plugin = "maven-publish")
apply(plugin = "java-library")
//apply(plugin = "com.diffplug.spotless")
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") }
}
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:26.0.1")
plugin("org.slf4j:slf4j-api:2.0.16")
// implementation("org.key-project:key.core")
val testImplementation by configurations
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.3")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.11.3")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.11.3")
testImplementation("com.google.truth:truth:1.4.4")
testImplementation("org.slf4j:slf4j-simple:2.0.16")
}
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
}
/*configure<SpotlessExtension> { // if you are using build.gradle.kts, instead of 'spotless {' use:
// configure<com.diffplug.gradle.spotless.SpotlessExtension> {
kotlin {
// by default the target is every '.kt' and '.kts` file in the java sourcesets
//ktfmt() // has its own section below
ktlint().userData(
mapOf(
"disabled_rules" to "no-wildcard-imports",
"insert_final_newline" to "true"
)
)
// has its own section below
//diktat() // has its own section below
//prettier() // has its own section below
licenseHeaderFile("$rootDir/gradle/license_header") // '/* (C)$YEAR */' // or licenseHeaderFile
}
kotlinGradle {
//target("*.gradle.kts") // default target for kotlinGradle
//ktlint() // or ktfmt() or prettier()
}
}*/
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")
}
}
}
}
}
}