-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
132 lines (110 loc) · 3.42 KB
/
build.gradle
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
plugins {
id "org.sonarqube" version "2.8"
}
repositories {
mavenCentral()
}
version = '0.2.2-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'jacoco'
apply plugin: 'idea'
java {
withJavadocJar()
withSourcesJar()
}
jacocoTestReport {
reports {
xml.enabled true
}
}
tasks['publish'].dependsOn(build)
// In this section you declare the dependencies for your production and test code
dependencies {
implementation("org.junit.platform:junit-platform-launcher:1.6.0")
testImplementation(
"org.junit.jupiter:junit-jupiter:5.6.0",
"org.junit-pioneer:junit-pioneer:0.5.1",
"org.mockito:mockito-junit-jupiter:3.2.4",
"org.assertj:assertj-core:3.14.0",
"org.jetbrains:annotations:16.0.2"
)
}
compileTestJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
options.compilerArgs += '-parameters'
options.encoding = 'UTF-8'
}
test {
useJUnitPlatform()
systemProperties = [
"hue.username": "8GFTbkftIvDT0SWSyV4LliHJICB870JVRr5TkTk1"
//optional:
//"hue.ip" : "192.168.178.49",
//"hue.timeout" : 2500,
//"hue.listener.lamps": [1, 2, 3]
]
}
publishing {
repositories {
maven {
//HINT password is here ~/.gradle/gradle.properties
def ossrhUsername = project.hasProperty('ossrhUsername') ? project.ossrhUsername : ''
def ossrhPassword = project.hasProperty('ossrhPassword') ? project.ossrhPassword : ''
credentials {
username = ossrhUsername
password = ossrhPassword
}
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = isSnapshotRelease() ? snapshotsRepoUrl : releasesRepoUrl
}
}
publications {
mavenJava(MavenPublication) {
groupId = 'de.klosebrothers.hue'
artifactId = 'hue4junit'
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = 'hue4junit'
groupId = 'de.klosebrothers.hue'
description = 'JUnit5 TestExecutionListener for Philips hue lights'
url = 'https://github.com/mklose/hue4junit'
licenses {
license {
name = 'Eclipse Public License - v 2.0'
url = 'http://www.eclipse.org/legal/epl-v20.html'
}
}
developers {
developer {
id = 'mklose'
name = 'Martin Klose'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:[email protected]:mklose/hue4junit.git'
developerConnection = 'scm:git:[email protected]:mklose/hue4junit.git'
url = 'https://github.com/mklose/hue4junit'
}
}
}
}
}
boolean isSnapshotRelease() {
version.endsWith('SNAPSHOT')
}
signing {
if (!isSnapshotRelease()) {
sign publishing.publications.mavenJava
}
}
wrapper {
gradleVersion = '6.1.1'
}