-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
131 lines (113 loc) · 3.96 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
plugins {
id 'io.micronaut.minimal.library' version '3.7.10'
id 'java-library'
id 'maven-publish'
id 'signing'
}
static isSnapshotRelease(versionString) {
versionString.endsWith('SNAPSHOT')
}
ext {
moduleName = 'net.jqwik.micronaut'
jqwikMicronautVersion = '1.0.0'
jqwikVersion = '1.7.4'
isSnapshotRelease = isSnapshotRelease(jqwikMicronautVersion)
}
group = moduleName
version = jqwikMicronautVersion
description = "Jqwik Micronaut support module"
repositories {
mavenCentral()
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
api("net.jqwik:jqwik:${jqwikVersion}")
implementation('io.micronaut.test:micronaut-test-core:3.9.2')
implementation("io.micronaut:micronaut-context:${micronautVersion}")
implementation('org.mockito:mockito-core:5.4.0')
testImplementation('io.micronaut.data:micronaut-data-hibernate-jpa:3.10.0')
testImplementation("io.micronaut:micronaut-http-client:${micronautVersion}")
testImplementation("io.micronaut:micronaut-http-server-netty:${micronautVersion}")
testImplementation('org.assertj:assertj-core:3.24.2')
testImplementation('org.slf4j:slf4j-simple:2.0.7')
testImplementation('com.google.code.findbugs:jsr305:3.0.2')
testRuntimeOnly('com.h2database:h2:2.2.220')
testRuntimeOnly('io.micronaut.configuration:micronaut-jdbc-tomcat:2.2.6')
}
jar {
archiveBaseName.set('jqwik-micronaut')
archiveVersion.set("${jqwikMicronautVersion}")
manifest {
attributes('Automatic-Module-Name': "${moduleName}")
}
}
java {
withJavadocJar()
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
compileTestJava {
options.compilerArgs += '-parameters'
options.encoding = 'UTF-8'
}
test {
useJUnitPlatform {
includeEngines 'jqwik'
}
}
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 {
jqwikMicronaut(MavenPublication) {
groupId = 'net.jqwik'
artifactId = 'jqwik-micronaut'
from components.java
pom {
groupId = 'net.jqwik'
name = 'jqwik-micronaut'
description = "Jqwik Micronaut support module"
url = 'https://github.com/jqwik-team/jqwik-micronaut'
licenses {
license {
name = 'Eclipse Public License - v 2.0'
url = 'http://www.eclipse.org/legal/epl-v20.html'
}
}
developers {
developer {
id = 'Nahuel92'
name = 'Nahuel Rodríguez'
}
}
scm {
connection = 'scm:git:git://github.com/jqwik-team/jqwik-micronaut.git'
developerConnection = 'scm:git:git://github.com/jqwik-team/jqwik-micronaut.git'
url = 'https://github.com/jqwik-team/jqwik-micronaut'
}
}
}
}
}
signing {
if (!isSnapshotRelease) {
sign publishing.publications.jqwikMicronaut
}
}
wrapper {
gradleVersion = "8.2" // upgrade with: ./gradlew wrapper
}