diff options
Diffstat (limited to 'z3/subprojects/solver-linux-x86-64/build.gradle.kts')
-rw-r--r-- | z3/subprojects/solver-linux-x86-64/build.gradle.kts | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/z3/subprojects/solver-linux-x86-64/build.gradle.kts b/z3/subprojects/solver-linux-x86-64/build.gradle.kts new file mode 100644 index 00000000..89c737b6 --- /dev/null +++ b/z3/subprojects/solver-linux-x86-64/build.gradle.kts | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: Apache-2.0 | ||
5 | */ | ||
6 | |||
7 | plugins { | ||
8 | id("tools.refinery.z3.gradle.java-library") | ||
9 | } | ||
10 | |||
11 | val classifier = "z3-${version}-x64-glibc-2.31" | ||
12 | val library = "z3java-linux-x86-64" | ||
13 | |||
14 | dependencies { | ||
15 | z3("Z3Prover:z3:${version}:${classifier}@zip") | ||
16 | } | ||
17 | |||
18 | val extractZ3Libs by tasks.registering(Sync::class) { | ||
19 | dependsOn(configurations.z3) | ||
20 | from({ | ||
21 | val zipFile = configurations.z3.map { it.singleFile } | ||
22 | zipTree(zipFile).matching { | ||
23 | include("${classifier}/bin/*.so") | ||
24 | includeEmptyDirs = false | ||
25 | } | ||
26 | }) | ||
27 | eachFile { | ||
28 | val pathInBin = relativePath.segments.drop(2).toTypedArray() | ||
29 | relativePath = RelativePath(true, library, *pathInBin) | ||
30 | } | ||
31 | into(layout.buildDirectory.dir("z3-extracted")) | ||
32 | } | ||
33 | |||
34 | sourceSets.main { | ||
35 | resources.srcDir(extractZ3Libs) | ||
36 | } | ||