-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
144 lines (123 loc) · 4.35 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'jacoco'
id "com.adarshr.test-logger" version "3.2.0"
id 'org.springframework.boot' version '3.3.3'
id 'io.spring.dependency-management' version '1.1.0'
}
group = 'io.github.drednote'
version = findProperty("tag_version") ?: 'master-SNAPSHOT'
sourceCompatibility = '17'
bootJar.enabled = false
jar {
enabled = true
archiveClassifier = ''
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
api 'org.telegram:telegrambots-longpolling:7.10.0'
api 'org.telegram:telegrambots-client:7.10.0'
api 'com.esotericsoftware:kryo:4.0.3'
api 'org.springframework.boot:spring-boot-starter-web'
api 'com.github.vladimir-bukhtoyarov:bucket4j-core:7.6.0'
api 'com.github.ben-manes.caffeine:caffeine'
api 'org.apache.httpcomponents.client5:httpclient5'
// data
compileOnly 'org.springframework.boot:spring-boot-starter-webflux'
compileOnly 'org.springframework.boot:spring-boot-starter-data-jpa'
compileOnly 'org.springframework.boot:spring-boot-starter-data-mongodb'
compileOnly 'org.springframework.statemachine:spring-statemachine-core:4.0.0'
compileOnly 'org.springframework.statemachine:spring-statemachine-data-jpa:4.0.0'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
testImplementation 'org.springframework.boot:spring-boot-starter-validation'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa'
testImplementation 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
}
tasks.register('sourceJar', Jar) {
from sourceSets.main.allJava
}
tasks.named('compileJava') {
inputs.files(tasks.named('processResources'))
}
signing {
if (!version.toString().endsWith("SNAPSHOT")) {
useGpgCmd()
sign publishing.publications
}
}
publishing {
repositories {
maven {
if (version.toString().endsWith("SNAPSHOT")) {
allowInsecureProtocol true
url = NEXUS_UPLOAD_REPO
} else {
url = MAVEN_RELEASE_REPO
}
credentials {
username = System.getenv("OSSRH_USERNAME") ?: System.getProperty("OSSRH_USERNAME")
password = System.getenv("OSSRH_PASSWORD") ?: System.getProperty("OSSRH_PASSWORD")
}
}
}
publications {
register('mavenJava', MavenPublication) {
groupId group
artifactId archivesBaseName
version version
from components.java
artifact sourceJar {
classifier "sources"
}
pom {
packaging = jar
name = "Spring Boot Starter Telegram"
url = "https://github.com/drednote/spring-boot-starter-telegram"
description = "A library designed to simplify the setup of Telegram bots using " +
"`Spring Boot` and `org.telegram:telegrambots` as the core dependency"
licenses {
license {
name = "MIT License"
url = "https://github.com/Drednote/spring-boot-starter-telegram/blob/master/LICENSE"
}
}
scm {
connection = "scm:https://github.com/drednote/spring-boot-starter-telegram.git"
developerConnection = "scm:git@github.com:drednote/spring-boot-starter-telegram.git"
url = "https://github.com/drednote/spring-boot-starter-telegram"
}
developers {
developer {
name = "Ivan Galushko"
email = "galushko.ivan8@gmail.com"
}
}
}
}
}
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
jacocoTestReport {
dependsOn test
reports {
xml.enabled true
csv.enabled false
html.outputLocation = layout.buildDirectory.dir('reports/jacoco/test/html')
}
}
}