blob: 89c737b656227b3ceca3ef8a7b7365c723c6a80d (
plain) (
blame)
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
|
/*
* SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
*
* SPDX-License-Identifier: Apache-2.0
*/
plugins {
id("tools.refinery.z3.gradle.java-library")
}
val classifier = "z3-${version}-x64-glibc-2.31"
val library = "z3java-linux-x86-64"
dependencies {
z3("Z3Prover:z3:${version}:${classifier}@zip")
}
val extractZ3Libs by tasks.registering(Sync::class) {
dependsOn(configurations.z3)
from({
val zipFile = configurations.z3.map { it.singleFile }
zipTree(zipFile).matching {
include("${classifier}/bin/*.so")
includeEmptyDirs = false
}
})
eachFile {
val pathInBin = relativePath.segments.drop(2).toTypedArray()
relativePath = RelativePath(true, library, *pathInBin)
}
into(layout.buildDirectory.dir("z3-extracted"))
}
sourceSets.main {
resources.srcDir(extractZ3Libs)
}
|