-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
89 lines (69 loc) · 1.77 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
import java.util.concurrent.TimeUnit
plugins {
id 'java-library'
id 'org.springframework.boot' version '3.0.5'
id 'io.spring.dependency-management' version '1.1.0'
}
ext {
buildId = TimeUnit.MILLISECONDS.toMinutes(System.currentTimeMillis())
}
task tcBuildId {
doLast {
println "##teamcity[buildNumber '$buildId']"
}
}
tasks.named('jar').configure { dependsOn tcBuildId }
group = 'org.comroid'
version = '0.1' + '.' + buildId
sourceCompatibility = '17'
apply from: 'gradle/vars.gradle'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
maven { url = 'https://maven.comroid.org' }
mavenCentral()
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
try {
archiveClassifier.set 'sources'
} catch (MissingPropertyException ignored) {
classifier = "sources"
}
}
task javadocJar(type: Jar) {
dependsOn 'javadoc'
from javadoc.destinationDir
try {
archiveClassifier.set 'javadoc'
} catch (MissingPropertyException ignored) {
classifier = "javadoc"
}
}
tasks.withType(Jar).configureEach {
it.duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
dependencies {
if (findProject(':api') != null)
api project(':api')
else api 'org.comroid:api:1.+'
// rest
implementation 'org.springframework.boot:spring-boot-starter-web'
// pushover
//implementation 'com.github.ilpersi:pushover-client:1.1.1'
// config
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
// util
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
// spring test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
tasks.named('test') {
useJUnitPlatform()
}
apply from: 'gradle/publishing.gradle'