-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
executable file
·47 lines (37 loc) · 1.24 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
def getCommitTimestampSeconds() {
// Run 'git log' command to get the timestamp of the latest commit
def result = new ByteArrayOutputStream()
exec {
commandLine 'git', 'log', '-1', '--format=%ct'
standardOutput = result
}
// Convert the timestamp to minutes
def timestampSeconds = result.toString().trim().toLong()
return timestampSeconds
}
subprojects {
apply plugin: 'java'
group = 'org.comroid.mcsd'
version = "0.2.${getCommitTimestampSeconds()}"
compileJava.options.encoding = 'UTF-8'
sourceCompatibility = 17
targetCompatibility = 17
repositories {
maven { url 'https://maven.comroid.org' }
maven { url 'https://repo.opencollab.dev/maven-releases/' }
mavenLocal()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
if (!project.name.endsWith('api'))
implementation project(':api')
if (project.name != 'japi')
if (findProject(':japi') != null)
implementation project(':japi')
else implementation 'org.comroid:japi:+'
// utility
compileOnly 'org.projectlombok:lombok:+'
annotationProcessor 'org.projectlombok:lombok:+'
}
}