-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
150 lines (126 loc) · 4.1 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
plugins {
id 'jacoco'
id 'java-library'
id 'maven-publish'
id 'org.sonarqube' version '2.8'
id 'signing'
}
group = 'io.github.henryssondaniel.teacup.engine'
version = '1.1.5-SNAPSHOT'
sourceSets {
intTest {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
task integrationTest(type: Test) {
description = 'Runs integration tests.'
group = 'verification'
testClassesDirs = sourceSets.intTest.output.classesDirs
classpath = sourceSets.intTest.runtimeClasspath
shouldRunAfter test
}
task integrationTestReport(type: JacocoReport) {
executionData integrationTest
sourceSets sourceSets.intTest
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier = 'javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
check.dependsOn integrationTest
jacocoTestReport.dependsOn integrationTestReport
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
tasks.withType(Test) {
useJUnitPlatform()
testLogging {
showStandardStreams = true
}
}
configurations {
intTestImplementation.extendsFrom testImplementation
intTestRuntimeOnly.extendsFrom runtimeOnly
}
dependencies {
api 'io.github.henryssondaniel.teacup:core:1.2.1-SNAPSHOT'
api 'io.github.henryssondaniel.teacup:engine:1.0.2-SNAPSHOT'
api 'io.github.henryssondaniel.teacup:protocol:1.0.1-SNAPSHOT'
api 'org.junit.jupiter:junit-jupiter-engine:5.6.0-M1'
implementation 'org.junit.platform:junit-platform-launcher:1.6.0-M1'
testImplementation 'org.assertj:assertj-core:3.14.0'
testImplementation 'org.mockito:mockito-core:3.1.0'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = project.group + ':' + project.name
description = 'Run Teacup tests with the JUnit engine'
url = 'https://github.com/HenryssonDaniel/teacup-java-engine-junit'
licenses {
license {
name = 'MIT License'
url = 'http://www.opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
name = 'Daniel Henrysson'
email = 'henrysson.daniel@gmail.com'
organization = 'Daniel Henrysson AB'
organizationUrl = 'https://github.com/HenryssonDaniel'
}
}
scm {
connection = 'scm:git:git://github.com/HenryssonDaniel/teacup-java-engine-junit.git'
developerConnection = 'scm:git:ssh://github.com/HenryssonDaniel/teacup-java-engine-junit.git'
url = 'https://github.com/HenryssonDaniel/teacup-java-engine-junit'
}
}
}
}
repositories {
maven {
def repoUrl = "https://oss.sonatype.org/"
def releasesRepoUrl = repoUrl + "service/local/staging/deploy/maven2"
def snapshotsRepoUrl = repoUrl + "content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
if (project.hasProperty('ossrhUsername')) {
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
}
}
repositories {
mavenLocal()
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
signing {
sign publishing.publications.mavenJava
}
sonarqube {
properties {
property "sonar.projectKey", "HenryssonDaniel_teacup-java-engine-junit"
}
}