-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.gradle.kts
99 lines (89 loc) · 3.03 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
plugins {
id("java-library")
id("maven-publish")
id("jacoco") // Code coverage
alias(libs.plugins.sonarqube) // SonarQube
}
group = "com.redhat.devtools.intellij"
version = providers.gradleProperty("projectVersion").get() // Plugin version
repositories {
mavenLocal()
mavenCentral()
maven {
url = uri("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies")
}
}
dependencies {
implementation(libs.kotlin.reflect)
api(libs.junit.jupiter.api)
api(libs.remote.robot)
api(libs.remote.fixtures)
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
withSourcesJar()
withJavadocJar()
}
tasks {
wrapper {
gradleVersion = providers.gradleProperty("gradleVersion").get()
}
test {
useJUnitPlatform()
}
jacocoTestReport {
executionData.setFrom(fileTree(layout.buildDirectory).include("/jacoco/*.exec"))
//classDirectories.setFrom(instrumentCode)
reports {
xml.required = true
}
}
sonar {
properties {
property("sonar.projectKey", "redhat-developer_intellij-common-ui-test-library")
property("sonar.organization", "redhat-developer")
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.junit.reportsPath", layout.buildDirectory.dir("test-results").get().asFile.absolutePath)
property("sonar.gradle.skipCompile", "true")
}
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
name.set("IntelliJ common UI test library")
description.set("Common utilities for IntelliJ UI testing")
url.set("https://github.com/redhat-developer/intellij-common-ui-test-library")
licenses {
license {
name.set("Eclipse Public License 2.0")
url.set("https://www.eclipse.org/legal/epl-v20.html")
}
}
developers {
developer {
name.set("Red Hat Developer")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:git://github.com/redhat-developer/intellij-common-ui-test-library.git")
developerConnection.set("scm:git:ssh://[email protected]:redhat-developer/intellij-common-ui-test-library.git")
url.set("https://github.com/redhat-developer/intellij-common-ui-test-library/")
}
}
}
}
repositories {
maven {
val baseUrl = layout.buildDirectory.dir("repository/").get()
val releasesRepoUrl = baseUrl.dir("releases")
val snapshotsRepoUrl = baseUrl.dir("snapshots")
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
}
}
}