From 2999ccd2c05a51e64244a164108499e7aa542aa5 Mon Sep 17 00:00:00 2001 From: Valentyn Sobol Date: Thu, 25 Sep 2025 12:59:17 +0300 Subject: [PATCH 1/2] Fix JDK --- .github/workflows/build-and-run-tests.yml | 6 +++--- .github/workflows/release.yml | 6 +++--- README.md | 6 +++--- buildSrc/src/main/kotlin/io.ksmt.ksmt-base.gradle.kts | 2 +- docs/getting-started.md | 6 +++--- examples/build.gradle.kts | 6 +++--- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 24ab5e460..c05669975 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -22,11 +22,11 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up JDK 17 + - name: Set up JDK 8 uses: actions/setup-java@v4 with: - java-version: 17 - distribution: 'zulu' + java-version: 8 + distribution: 'temurin' cache: gradle - name: Setup gradle diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 34f41d8e8..230dc1a7c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,11 +12,11 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up JDK 17 + - name: Set up JDK 8 uses: actions/setup-java@v4 with: - java-version: 17 - distribution: 'zulu' + java-version: 8 + distribution: 'temurin' cache: gradle - name: Setup gradle diff --git a/README.md b/README.md index def034d79..21ef361cd 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Get the most out of SMT solving with KSMT features: * Streamlined [solver delivery](#ksmt-distribution) with no need for building a solver or implementing JVM bindings [![KSMT: build](https://github.com/UnitTestBot/ksmt/actions/workflows/build-and-run-tests.yml/badge.svg)](https://github.com/UnitTestBot/ksmt/actions/workflows/build-and-run-tests.yml) -[![Maven Central](https://img.shields.io/maven-central/v/io.ksmt/ksmt-core)](https://central.sonatype.com/artifact/io.ksmt/ksmt-core/0.6.1) +[![Maven Central](https://img.shields.io/maven-central/v/io.ksmt/ksmt-core)](https://central.sonatype.com/artifact/io.ksmt/ksmt-core/0.6.2) [![javadoc](https://javadoc.io/badge2/io.ksmt/ksmt-core/javadoc.svg)](https://javadoc.io/doc/io.ksmt/ksmt-core) ## Get started @@ -20,9 +20,9 @@ To start using KSMT, install it via [Gradle](https://gradle.org/): ```kotlin // core -implementation("io.ksmt:ksmt-core:0.6.1") +implementation("io.ksmt:ksmt-core:0.6.2") // z3 solver -implementation("io.ksmt:ksmt-z3:0.6.1") +implementation("io.ksmt:ksmt-z3:0.6.2") ``` Find basic instructions in the [Getting started](docs/getting-started.md) guide and try it out with the diff --git a/buildSrc/src/main/kotlin/io.ksmt.ksmt-base.gradle.kts b/buildSrc/src/main/kotlin/io.ksmt.ksmt-base.gradle.kts index bde92ba04..958dee5a3 100644 --- a/buildSrc/src/main/kotlin/io.ksmt.ksmt-base.gradle.kts +++ b/buildSrc/src/main/kotlin/io.ksmt.ksmt-base.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "io.ksmt" -version = "0.6.1" +version = "0.6.2" repositories { mavenCentral() diff --git a/docs/getting-started.md b/docs/getting-started.md index 1fb83866e..d573eb76f 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -34,7 +34,7 @@ repositories { ```kotlin dependencies { // core - implementation("io.ksmt:ksmt-core:0.6.1") + implementation("io.ksmt:ksmt-core:0.6.2") } ``` @@ -43,9 +43,9 @@ dependencies { ```kotlin dependencies { // z3 - implementation("io.ksmt:ksmt-z3:0.6.1") + implementation("io.ksmt:ksmt-z3:0.6.2") // bitwuzla - implementation("io.ksmt:ksmt-bitwuzla:0.6.1") + implementation("io.ksmt:ksmt-bitwuzla:0.6.2") } ``` diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 12fed7b59..c37772b01 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -9,11 +9,11 @@ repositories { dependencies { // core - implementation("io.ksmt:ksmt-core:0.6.1") + implementation("io.ksmt:ksmt-core:0.6.2") // z3 solver - implementation("io.ksmt:ksmt-z3:0.6.1") + implementation("io.ksmt:ksmt-z3:0.6.2") // Runner and portfolio solver - implementation("io.ksmt:ksmt-runner:0.6.1") + implementation("io.ksmt:ksmt-runner:0.6.2") } java { From 01971db58fd7537bfa2192c20d1dd8a4c20370d8 Mon Sep 17 00:00:00 2001 From: Valentyn Sobol Date: Thu, 25 Sep 2025 13:30:05 +0300 Subject: [PATCH 2/2] Fix shadow --- .github/workflows/build-and-run-tests.yml | 4 ++-- ksmt-cvc5/ksmt-cvc5-core/build.gradle.kts | 18 ++++++++++-------- ksmt-yices/ksmt-yices-core/build.gradle.kts | 18 ++++++++++-------- ksmt-z3/ksmt-z3-core/build.gradle.kts | 18 ++++++++++-------- 4 files changed, 32 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index c05669975..9df103bba 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -22,10 +22,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up JDK 8 + - name: Set up JDK 17 uses: actions/setup-java@v4 with: - java-version: 8 + java-version: 17 distribution: 'temurin' cache: gradle diff --git a/ksmt-cvc5/ksmt-cvc5-core/build.gradle.kts b/ksmt-cvc5/ksmt-cvc5-core/build.gradle.kts index dd7f549a9..23694b387 100644 --- a/ksmt-cvc5/ksmt-cvc5-core/build.gradle.kts +++ b/ksmt-cvc5/ksmt-cvc5-core/build.gradle.kts @@ -2,7 +2,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { id("io.ksmt.ksmt-base") - id("com.gradleup.shadow") version "9.0.0-beta13" + id("com.gradleup.shadow") version "9.0.0-beta13" apply false } val distDir = projectDir.parentFile.resolve("dist") @@ -21,21 +21,23 @@ dependencies { testImplementation(project(":ksmt-cvc5:ksmt-cvc5-native")) } -tasks.withType { - archiveClassifier.set("") +val publishJar = tasks.register("publish-jar") { + dependsOn(tasks.named("jar")) + + archiveClassifier.set("pub") dependencies { include(dependency(files(cvc5Jar))) } - val implementation = project.configurations["implementation"].dependencies.toSet() - val runtimeOnly = project.configurations["runtimeOnly"].dependencies.toSet() - val dependencies = (implementation + runtimeOnly) - project.configurations.shadow.get().dependencies.addAll(dependencies) + + configurations = listOf(project.configurations.runtimeClasspath.get()) + + with(tasks.jar.get() as CopySpec) } publishing { publications { create("maven") { - project.shadow.component(this) + artifact(publishJar.get()) addKsmtPom() generateMavenMetadata(project) diff --git a/ksmt-yices/ksmt-yices-core/build.gradle.kts b/ksmt-yices/ksmt-yices-core/build.gradle.kts index f919137c8..aff3acbb8 100644 --- a/ksmt-yices/ksmt-yices-core/build.gradle.kts +++ b/ksmt-yices/ksmt-yices-core/build.gradle.kts @@ -2,7 +2,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { id("io.ksmt.ksmt-base") - id("com.gradleup.shadow") version "9.0.0-beta13" + id("com.gradleup.shadow") version "9.0.0-beta13" apply false `java-test-fixtures` } @@ -21,21 +21,23 @@ dependencies { testImplementation(project(":ksmt-yices:ksmt-yices-native")) } -tasks.withType { - archiveClassifier.set("") +val publishJar = tasks.register("publish-jar") { + dependsOn(tasks.named("jar")) + + archiveClassifier.set("pub") dependencies { exclude { true } } - val implementation = project.configurations["implementation"].dependencies.toSet() - val runtimeOnly = project.configurations["runtimeOnly"].dependencies.toSet() - val dependencies = (implementation + runtimeOnly) - project.configurations.shadow.get().dependencies.addAll(dependencies) + + configurations = listOf(project.configurations.runtimeClasspath.get()) + + with(tasks.jar.get() as CopySpec) } publishing { publications { create("maven") { - project.shadow.component(this) + artifact(publishJar.get()) addKsmtPom() generateMavenMetadata(project) diff --git a/ksmt-z3/ksmt-z3-core/build.gradle.kts b/ksmt-z3/ksmt-z3-core/build.gradle.kts index 31b313d6b..6b45310fd 100644 --- a/ksmt-z3/ksmt-z3-core/build.gradle.kts +++ b/ksmt-z3/ksmt-z3-core/build.gradle.kts @@ -2,7 +2,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { id("io.ksmt.ksmt-base") - id("com.gradleup.shadow") version "9.0.0-beta13" + id("com.gradleup.shadow") version "9.0.0-beta13" apply false } repositories { @@ -23,21 +23,23 @@ dependencies { testImplementation(project(":ksmt-z3:ksmt-z3-native")) } -tasks.withType { - archiveClassifier.set("") +val publishJar = tasks.register("publish-jar") { + dependsOn(tasks.named("jar")) + + archiveClassifier.set("pub") dependencies { include(dependency(z3JavaJar.outputFiles)) } - val implementation = project.configurations["implementation"].dependencies.toSet() - val runtimeOnly = project.configurations["runtimeOnly"].dependencies.toSet() - val dependencies = (implementation + runtimeOnly) - project.configurations.shadow.get().dependencies.addAll(dependencies) + + configurations = listOf(project.configurations.runtimeClasspath.get()) + + with(tasks.jar.get() as CopySpec) } publishing { publications { create("maven") { - project.shadow.component(this) + artifact(publishJar.get()) addKsmtPom() generateMavenMetadata(project)