-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
68 lines (53 loc) · 1.74 KB
/
build.gradle
File metadata and controls
68 lines (53 loc) · 1.74 KB
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
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
}
allprojects {
apply plugin: 'idea'
ext {
prefix = rootProject.name.equals('LibMod') ? '' : ':LibMod'
}
}
subprojects {
apply plugin: 'java-library'
group = 'com.ampznetwork.libmod'
version = "0.1.${getCommitTimestampSeconds()}"
compileJava.options.encoding = 'UTF-8'
sourceCompatibility = 21
targetCompatibility = 21
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 != 'japi') {
api 'org.comroid:japi:+'
}
if (project.name != 'api' && !project.name.startsWith('compile'))
api project("$prefix:api")
if (project.name != 'api' && project.name != 'core' && !project.name.startsWith('compile'))
api project("$prefix:core")
// soft dependencies
compileOnly 'net.luckperms:api:5.4'
// utility
api 'org.slf4j:slf4j-api:2.0.+'
compileOnly 'org.projectlombok:lombok:+'
annotationProcessor 'org.projectlombok:lombok:+'
// tests
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
testImplementation 'org.easymock:easymock:+'
}
test {
useJUnitPlatform()
}
}