-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
46 lines (37 loc) · 1017 Bytes
/
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
import java.nio.file.Files
import java.nio.file.StandardCopyOption
plugins {
id 'java'
id 'application'
id "com.github.johnrengelman.shadow" version "7.1.2"
}
ext {
mGroup = "com.github.orbyfied.ctm"
mVersion = "0.3.0R1"
}
group rootProject.mGroup
version rootProject.mVersion
dependencies {
implementation(project(":util"))
implementation(project(":logging"))
implementation(project(":argument"))
}
final java.nio.file.Path projectDirPath = projectDir.toPath();
static void copyf(java.nio.file.Path from, java.nio.file.Path to) {
if (!from.toFile().isDirectory()) {
Files.copy(from, to, StandardCopyOption.REPLACE_EXISTING);
return
}
to.resolve(from.toFile().getName()).toFile().mkdirs();
for (File f : from.toFile().listFiles()) {
copyf(f.toPath(), to.resolve(f.getName()));
}
}
mainClassName = "com.github.orbyfied.ctm.Main"
jar {
manifest {
attributes(
'Main-Class': mainClassName
)
}
}