-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
54 lines (44 loc) · 1.23 KB
/
build.gradle
File metadata and controls
54 lines (44 loc) · 1.23 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
plugins {
id "java"
id "idea"
}
wrapper {
gradleVersion = "8.1.1"
}
sourceSets.main.java.srcDirs = []
sourceSets.main.resources.srcDirs = []
subprojects { Project project ->
project.plugins.apply("java")
project.plugins.apply("idea")
project.sourceSets.main.java.srcDirs = ["src"]
project.sourceSets.main.resources.srcDirs = ["resources"]
project.ext {
copyPaths = ["$rootProject.projectDir/artifacts"]
mindustryVersion = "v143.1"
}
project.repositories {
mavenCentral()
maven { url "https://www.jitpack.io" }
}
project.tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
sourceCompatibility = JavaVersion.VERSION_20
targetCompatibility = JavaVersion.VERSION_20
}
project.tasks.jar {
from {
configurations.runtimeClasspath.collect { File file ->
file.isDirectory() ? file : zipTree(file)
}
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
doLast {
copy {
from { archiveFile.get() }
(copyPaths as ArrayList<String>).each { p ->
into(p)
}
}
}
}
}