Skip to content

Commit 5251903

Browse files
committed
Updated Z3
1 parent 72bcfeb commit 5251903

1 file changed

Lines changed: 10 additions & 23 deletions

File tree

ksmt-z3/ksmt-z3-native/build.gradle.kts

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,11 @@ plugins {
44
id("io.ksmt.ksmt-base")
55
}
66

7-
val distDir = projectDir.parentFile.resolve("dist")
8-
97
repositories {
108
mavenCentral()
11-
flatDir { dirs(distDir) }
129
}
1310

1411
val compileConfig by configurations.creating
15-
val z3NativeLinuxX64 by configurations.creating
1612

1713
val `windows-x64` by sourceSets.creating
1814
val `linux-x64` by sourceSets.creating
@@ -21,30 +17,28 @@ val `mac-arm` by sourceSets.creating
2117
val `windows-arm` by sourceSets.creating
2218
val `linux-arm` by sourceSets.creating
2319

24-
val z3Version = "4.15.3"
20+
val z3Version = "4.16.0"
2521

2622
val winDllPath = listOf("**/vcruntime140.dll", "**/vcruntime140_1.dll", "**/libz3.dll", "**/libz3java.dll")
2723
val linuxSoPath = listOf("**/libz3.so", "**/libz3java.so")
2824
val macDylibPath = listOf("**/libz3.dylib", "**/libz3java.dylib")
2925

3026
val z3Binaries = listOf(
31-
Triple(`windows-x64`, mkZ3ReleaseDownloadTask(z3Version, "x64-win", winDllPath), null),
32-
Triple(`linux-x64`, null, z3NativeLinuxX64),
33-
Triple(`mac-x64`, mkZ3ReleaseDownloadTask(z3Version, "x64-osx-13.7.6", macDylibPath), null),
34-
Triple(`mac-arm`, mkZ3ReleaseDownloadTask(z3Version, "arm64-osx-13.7.6", macDylibPath), null),
35-
Triple(`linux-arm`, mkZ3ReleaseDownloadTask(z3Version, "arm64-glibc-2.34", linuxSoPath), null),
27+
Pair(`windows-x64`, mkZ3ReleaseDownloadTask(z3Version, "x64-win", winDllPath)),
28+
Pair(`linux-x64`, mkZ3ReleaseDownloadTask(z3Version, "x64-glibc-2.39", linuxSoPath)),
29+
Pair(`mac-x64`, mkZ3ReleaseDownloadTask(z3Version, "x64-osx-15.7.3", macDylibPath)),
30+
Pair(`mac-arm`, mkZ3ReleaseDownloadTask(z3Version, "arm64-osx-15.7.3", macDylibPath)),
31+
Pair(`linux-arm`, mkZ3ReleaseDownloadTask(z3Version, "arm64-glibc-2.38", linuxSoPath)),
3632
)
3733

3834
z3Binaries.forEach { it.first.compileClasspath = compileConfig }
3935

4036
dependencies {
4137
compileConfig(project(":ksmt-core"))
4238
compileConfig(project(":ksmt-z3:ksmt-z3-core"))
43-
44-
z3NativeLinuxX64("z3", "z3-native-linux-x86-64", z3Version, ext = "zip")
4539
}
4640

47-
z3Binaries.forEach { (sourceSet, z3BinaryTask, nativeConfig) ->
41+
z3Binaries.forEach { (sourceSet, z3BinaryTask) ->
4842
val name = sourceSet.name
4943
val artifactName = "ksmt-z3-native-$name"
5044
val systemArch = name.replace('-', '/')
@@ -57,14 +51,10 @@ z3Binaries.forEach { (sourceSet, z3BinaryTask, nativeConfig) ->
5751
archiveBaseName.set(artifactName)
5852
from(sourceSet.output)
5953

60-
z3BinaryTask?.let {
54+
z3BinaryTask.let {
6155
dependsOn(it)
6256
from(it.outputFiles) { into("lib/$systemArch/z3") }
6357
}
64-
65-
nativeConfig?.let {
66-
copyArtifactsIntoJar(it, this, "lib/$systemArch/z3")
67-
}
6858
}
6959

7060
publishing.publications {
@@ -81,17 +71,14 @@ z3Binaries.forEach { (sourceSet, z3BinaryTask, nativeConfig) ->
8171
}
8272

8373
tasks.getByName<Jar>("jar") {
84-
z3Binaries.forEach { (sourceSet, z3BinaryTask, nativeConfig) ->
74+
z3Binaries.forEach { (sourceSet, z3BinaryTask) ->
8575
from(sourceSet.output)
8676

8777
val systemArch = sourceSet.name.replace('-', '/')
88-
z3BinaryTask?.let {
78+
z3BinaryTask.let {
8979
dependsOn(it)
9080
from(it.outputFiles) { into("lib/$systemArch/z3") }
9181
}
92-
nativeConfig?.let {
93-
copyArtifactsIntoJar(it, this, "lib/$systemArch/z3")
94-
}
9582
}
9683
}
9784

0 commit comments

Comments
 (0)