-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
154 lines (133 loc) · 4.03 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
151
152
153
154
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
static isSnapshotRelease(versionString) {
versionString.endsWith('SNAPSHOT')
}
ext {
moduleName = 'net.jqwik.spring'
junitPlatformVersion = '1.10.1'
opentest4jVersion = '1.2.0'
junitPlatformVersion = '1.10.1'
junitJupiterVersion = '5.10.1'
// springVersion = '5.2.15.RELEASE'
// springVersion = '5.3.31'
// springVersion = '6.0.14'
springVersion = '6.1.0'
// springBootVersion = '2.6.15'
// springBootVersion = '2.7.17'
// springBootVersion = '3.0.12'
// springBootVersion = '3.1.5'
springBootVersion = '3.2.0'
assertJVersion = '3.24.2'
mockitoVersion = '4.11.0'
jqwikVersion = '1.8.2'
jqwikSpringVersion = '0.13.0-SNAPSHOT'
isSnapshotRelease = isSnapshotRelease(jqwikSpringVersion)
}
repositories {
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
group = moduleName
version = jqwikSpringVersion
jar {
archiveBaseName.set('jqwik-spring')
archiveVersion.set("${jqwikSpringVersion}")
manifest {
attributes('Automatic-Module-Name': "${moduleName}")
}
}
java {
withJavadocJar()
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
compileTestJava {
options.compilerArgs += '-parameters'
options.encoding = 'UTF-8'
}
test {
useJUnitPlatform {
includeEngines 'jqwik'
}
include '/net/jqwik/spring/**/*Properties.class'
include '/net/jqwik/spring/**/*Example.class'
include '/net/jqwik/spring/**/*Examples.class'
include '/net/jqwik/spring/**/*Test.class'
include '/net/jqwik/spring/**/*Tests.class'
// testLogging.showStandardStreams = true
}
dependencies {
api("org.opentest4j:opentest4j:${opentest4jVersion}")
api("net.jqwik:jqwik:${jqwikVersion}")
compileOnly("org.springframework:spring-test:${springVersion}")
compileOnly("org.springframework:spring-context:${springVersion}")
compileOnly("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
testImplementation("org.assertj:assertj-core:${assertJVersion}")
testImplementation("org.mockito:mockito-core:${mockitoVersion}")
testImplementation("org.mockito:mockito-junit-jupiter:${mockitoVersion}")
testImplementation("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:${junitPlatformVersion}")
}
publishing {
repositories {
maven {
// hint: password is in ~/.gradle/gradle.properties
def ossrhUsername = project.hasProperty('ossrhUsername') ? project.ossrhUsername : ''
def ossrhPassword = project.hasProperty('ossrhPassword') ? project.ossrhPassword : ''
credentials {
username = ossrhUsername
password = ossrhPassword
}
// change URLs to point to your repos, e.g. http://my.org/repo
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = isSnapshotRelease ? snapshotsRepoUrl : releasesRepoUrl
}
}
publications {
jqwikSpring(MavenPublication) {
groupId = 'net.jqwik'
artifactId = 'jqwik-spring'
from components.java
pom {
groupId = 'net.jqwik'
name = 'jqwik-spring'
description = "Jqwik Spring support module"
url = 'https://github.org/jlink/jqwik-spring'
licenses {
license {
name = 'Eclipse Public License - v 2.0'
url = 'http://www.eclipse.org/legal/epl-v20.html'
}
}
developers {
developer {
id = 'jlink'
name = 'Johannes Link'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/jlink/jqwik-spring.git'
developerConnection = 'scm:git:git://github.com/jlink/jqwik-spring.git'
url = 'https://github.com/jlink/jqwik-spring'
}
}
}
}
}
signing {
if (!isSnapshotRelease) {
sign publishing.publications.jqwikSpring
}
}
wrapper {
gradleVersion = '8.4'
}