forked from FabricMC/fabric-sandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
54 lines (43 loc) · 1003 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
47
48
49
50
51
52
53
54
plugins {
id 'java-library'
id 'maven-publish'
}
version = "0.0.1"
group = project.maven_group
base {
archivesName = project.archives_base_name
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 17
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
evaluationDependsOn(":windows")
def archs = [
"aarch64",
"x86_64"
]
// Set to "Debug" for debug builds
def config = "Release"
def collectPackage = tasks.register("collectDlls", Sync) {
archs.forEach { arch ->
from(fileTree("windows/.build/${arch}-unknown-windows-msvc/${config.toLowerCase()}/package")) {
into "fabric-sandbox/${arch}"
}
}
into layout.buildDirectory.dir("package")
dependsOn project(":windows").tasks.named("package" + config)
}
sourceSets.main.resources.srcDir collectPackage
publishing {
publications {
create("mavenJava", MavenPublication) {
artifactId = project.archives_base_name
from components.java
}
}
repositories {
}
}