-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle.kts
109 lines (92 loc) · 3.01 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
import com.vanniktech.maven.publish.SonatypeHost
plugins {
kotlin("jvm") version "2.0.20"
id("org.jetbrains.kotlinx.kover") version "0.8.3"
id("org.cadixdev.licenser") version "0.6.1"
id("com.vanniktech.maven.publish") version "0.31.0"
id("org.cyclonedx.bom") version "2.2.0" apply false
}
subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "org.jetbrains.kotlinx.kover")
apply(plugin = "maven-publish")
apply(plugin = "org.cadixdev.licenser")
apply(plugin = "com.vanniktech.maven.publish")
apply(plugin = "org.cyclonedx.bom")
group = "org.eclipse.thingweb"
version = "0.1.0-SNAPSHOT"
license {
header(rootProject.file("LICENSE"))
include("**/*.java")
include("**/*.kt")
include("**/*.yaml")
exclude("**/*.properties")
}
dependencies {
testImplementation(kotlin("test"))
testImplementation ("org.jetbrains.kotlinx:kotlinx-coroutines-test")
testImplementation("io.mockk:mockk:1.13.13")
}
tasks.register<Jar>("sourcesJar") {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
dependsOn("classes")
}
tasks.register<Jar>("javadocJar") {
archiveClassifier.set("javadoc")
from(tasks.javadoc)
dependsOn("javadoc")
}
artifacts {
add("archives", tasks["sourcesJar"])
add("archives", tasks["javadocJar"])
}
mavenPublishing {
publishToMavenCentral(SonatypeHost.DEFAULT, automaticRelease = true)
signAllPublications()
pom {
name = "kotlin-wot"
description = "A Framework for implementing Web of Things in Kotlin."
url = "https://github.com/eclipse-thingweb/kotlin-wot"
licenses {
license {
name = "Apache-2.0"
distribution = "repo"
url = "https://github.com/eclipse-thingweb/kotlin-wot/blob/master/LICENSES/Apache-2.0.txt"
}
}
developers {
developer {
id = "robwin"
name = "Robert Winkler"
email = "[email protected]"
}
}
scm {
url = "https://github.com/eclipse-thingweb/kotlin-wot.git"
}
}
}
tasks.test {
useJUnitPlatform()
// Configure proxy only if the required properties are set
val proxyHost = System.getProperty("http.proxyHost")
val proxyPort = System.getProperty("http.proxyPort")
if (!proxyHost.isNullOrEmpty() && !proxyPort.isNullOrEmpty()) {
systemProperty("http.proxyHost", proxyHost)
systemProperty("http.proxyPort", proxyPort)
}
}
kotlin {
jvmToolchain(21)
}
}
allprojects {
repositories {
mavenLocal()
mavenCentral()
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
}
}