-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
90 lines (72 loc) · 2.62 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
import java.time.Instant
static int getCommitTimestampMinutes() {
def result = new StringBuilder()
var proc = 'git log -1 --format=%ct'.execute()
proc.consumeProcessOutputStream(result)
proc.waitFor()
long seconds
if (result.toString().isBlank())
seconds = (long) (Instant.now().toEpochMilli() / 1000)
else seconds = result.toString().trim().toLong()
return (int) seconds / 600
}
apply plugin: 'java-library'
apply plugin: 'maven-publish'
group 'org.comroid'
version '2.2'//.' + getCommitTimestampMinutes()
configurations.compileClasspath.resolutionStrategy.activateDependencyLocking()
repositories {
mavenLocal()
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url 'https://www.jitpack.io' }
}
dependencies {
// annotations
api 'org.jetbrains:annotations:24.1.0'
// soft dependencies
compileOnly 'org.slf4j:slf4j-api:1.+'
implementation 'org.apache.logging.log4j:log4j-api:2.23.1'
compileOnly 'org.yaml:snakeyaml:+'
compileOnly 'com.fasterxml.jackson.core:jackson-databind:2.+'
compileOnly 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.+'
compileOnly 'antlr:antlr:2.7.7'
compileOnly 'com.rabbitmq:amqp-client:5.18.0'
compileOnly 'jakarta.persistence:jakarta.persistence-api:3.+'
compileOnly 'org.apache.tomcat:tomcat-annotations-api:10.+'
compileOnly 'net.dv8tion:JDA:5.+'
compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT'
compileOnly 'net.kyori:adventure-api:4.11.+'
compileOnly 'net.kyori:adventure-platform-bungeecord:4.3.3'
// lombok
api 'org.projectlombok:lombok:1.18.30'
annotationProcessor 'org.projectlombok:lombok:+'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
testImplementation 'org.easymock:easymock:+'
}
publishing {
repositories.mavenLocal()
publications {
maven(MavenPublication) {
from components.java
pom {
name = project.name
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "burdoto"
name = "Kaleidox"
email = "contact@kaleidox.de"
}
}
}
}
}
}
jar.finalizedBy publishToMavenLocal