-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
93 lines (79 loc) · 2.52 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
import com.vanniktech.maven.publish.SonatypeHost
plugins {
id('java-library')
id('com.github.johnrengelman.shadow') version('8.1.1')
id('com.vanniktech.maven.publish') version('0.29.0')
}
group('eu.koboo')
version('3.1.10')
repositories {
mavenCentral()
}
dependencies {
// The driver itself
api("org.mongodb:mongodb-driver-sync:$mongoDriverVersion")
testImplementation("org.mongodb:mongodb-driver-sync:$mongoDriverVersion")
// Eliminate boilerplate code
compileOnly("org.projectlombok:lombok:$lombokVersion")
annotationProcessor("org.projectlombok:lombok:$lombokVersion")
testImplementation("org.projectlombok:lombok:$lombokVersion")
testAnnotationProcessor("org.projectlombok:lombok:$lombokVersion")
// Test-Suite runtime
testImplementation("org.junit.jupiter:junit-jupiter-engine:$jupiterVersion")
// SLF4j logger for test-suite
testImplementation("org.slf4j:slf4j-jdk14:$slf4jVersion")
}
test {
useJUnitPlatform()
}
compileJava {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
options.fork = true
options.encoding = 'UTF-8'
options.release.set(11)
}
tasks.register('sourcesJar', Jar) {
from sourceSets.main.allJava
archiveClassifier.set('sources')
}
tasks.register('javadocJar', Jar) {
from javadoc.destinationDir
archiveClassifier.set('javadoc')
}
artifacts {
archives(shadowJar)
archives(sourcesJar)
archives(javadocJar)
}
mavenPublishing {
coordinates(project.group.toString(), "${project.name}", project.version.toString())
pom {
name = 'En2do'
description = 'MongoDB entity to document wrapper'
inceptionYear = '2022'
url = 'https://github.com/Koboo/en2do'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'koboo'
name = 'Koboo'
email = '[email protected]'
url = 'https://github.com/Koboo/'
}
}
scm {
url = 'https://github.com/Koboo/en2do'
connection = 'scm:git:https://github.com/Koboo/en2do'
developerConnection = 'scm:git:https://github.com/Koboo/en2do'
}
}
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
signAllPublications()
}