-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
130 lines (109 loc) · 3.65 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
group = 'io.github.robertomike'
version = '2.0.1'
repositories {
mavenCentral()
}
compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
ext { // this are variables
pomGroupId = group
pomVersion = version
jdkCompileVersion = 17
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
implementation 'io.github.robertomike:hefesto-hibernate:2.0.0'
api 'io.github.robertomike:hefesto-hibernate:2.0.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.0-rc1'
api 'com.fasterxml.jackson.core:jackson-databind:2.13.4'
compileOnly 'org.projectlombok:lombok:1.18.20'
annotationProcessor 'org.projectlombok:lombok:1.18.20'
testCompileOnly 'org.projectlombok:lombok:1.18.30'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.30'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
testImplementation "org.junit.jupiter:junit-jupiter-params:5.10.0"
testImplementation 'org.mockito:mockito-core:5.4.0'
testImplementation 'org.mockito:mockito-junit-jupiter:5.4.0'
testImplementation 'org.mockito:mockito-inline:5.2.0'
testImplementation 'org.apache.commons:commons-lang3:3.12.0'
}
test {
useJUnitPlatform()
}
publishing {
publications {
library(MavenPublication) {
from components.java
groupId = "${pomGroupId}"
artifactId = 'baradum'
version = "${pomVersion}"
pom {
name = 'Baradum'
description = 'This is an open-source Java library for creation of query with requests and hefesto'
url = 'https://github.com/RobertoMike/Baradum'
inceptionYear = '2024'
licenses {
license {
name = 'MIT License'
url = 'http://www.opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
name = 'Roberto Micheletti'
email = 'rmworking@hotmail.com'
organization = 'Roberto Micheletti'
organizationUrl = 'https://github.com/RobertoMike'
}
}
scm {
connection = 'scm:git:git://github.com/RobertoMike/Baradum.git'
developerConnection = 'scm:git:ssh://github.com:RobertoMike/Baradum.git'
url = 'https://github.com/RobertoMike/Baradum'
}
}
}
}
repositories {
maven {
name = "central_repository_ossrh"
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_PASSWORD")
}
metadataSources {
gradleMetadata()
}
}
}
}
javadoc {
source = sourceSets.main.allJava
classpath = configurations.compileClasspath
}
signing {
setRequired { !version.toString().endsWith("SNAPSHOT") }
sign publishing.publications.library
}
tasks.register('printVersion') {
doLast {
println project.version
}
}
java {
withJavadocJar()
withSourcesJar()
toolchain {
languageVersion.set(JavaLanguageVersion.of("${jdkCompileVersion}"))
}
}