Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-and-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ jobs:
name: Run tests
strategy:
matrix:
os: [ ubuntu-20.04, windows-latest, macos-latest ]
os: [ ubuntu-22.04, windows-latest, macos-latest ]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Set up JDK 1.8
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 8
java-version: 17
distribution: 'zulu'
cache: gradle

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 1.8
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 8
java-version: 17
distribution: 'zulu'
cache: gradle

Expand All @@ -29,7 +29,6 @@ jobs:
publishAllPublicationsToReleaseDirRepository
--no-daemon
-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=2G
-PmavenDeployUrl=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
-PmavenDeployUser=${{ secrets.MAVEN_CENTRAL_USER }}
-PmavenDeployPassword=${{ secrets.MAVEN_CENTRAL_PASSWORD }}
-PmavenSignGpgKey="${{ secrets.MAVEN_SIGN_GPG_KEY }}"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/run-long-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ jobs:
key: test-data-${{ env.TEST_DATA_REVISION }}-${{ matrix.os }}
path: ksmt-test/testData/testData.zip

- name: Set up JDK 1.8
- name: Set up JDK 17
if: steps.test-data-cache.outputs.cache-hit != 'true'
uses: actions/setup-java@v4
with:
java-version: 8
java-version: 17
distribution: 'zulu'
cache: gradle

Expand Down Expand Up @@ -131,10 +131,10 @@ jobs:
echo "Test data is not available"
exit 1

- name: Set up JDK 1.8
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 8
java-version: 17
distribution: 'zulu'
cache: gradle

Expand Down Expand Up @@ -185,10 +185,10 @@ jobs:
with:
path: reports

- name: Set up JDK 1.8
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 8
java-version: 17
distribution: 'zulu'

- name: Setup gradle
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.5.29)
[![Maven Central](https://img.shields.io/maven-central/v/io.ksmt/ksmt-core)](https://central.sonatype.com/artifact/io.ksmt/ksmt-core/0.5.30)
[![javadoc](https://javadoc.io/badge2/io.ksmt/ksmt-core/javadoc.svg)](https://javadoc.io/doc/io.ksmt/ksmt-core)

## Get started
Expand All @@ -20,9 +20,9 @@ To start using KSMT, install it via [Gradle](https://gradle.org/):

```kotlin
// core
implementation("io.ksmt:ksmt-core:0.5.29")
implementation("io.ksmt:ksmt-core:0.5.30")
// z3 solver
implementation("io.ksmt:ksmt-z3:0.5.29")
implementation("io.ksmt:ksmt-z3:0.5.30")
```

Find basic instructions in the [Getting started](docs/getting-started.md) guide and try it out with the
Expand Down
19 changes: 19 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
plugins {
id("com.gradleup.nmcp.aggregation") version "0.1.3"
}

val mavenDeployUser = project.stringProperty("mavenDeployUser")
if (mavenDeployUser != null) {
val mavenDeployPassword = project.stringProperty("mavenDeployPassword") ?: ""

nmcpAggregation {
centralPortal {
username.set(mavenDeployUser)
password.set(mavenDeployPassword)
publishingType.set("USER_MANAGED")
}

// Publish all projects that apply the 'maven-publish' plugin
publishAllProjectsProbablyBreakingProjectIsolation()
}
}
4 changes: 4 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ dependencies {
implementation("de.undercouch.download:de.undercouch.download.gradle.plugin:5.1.0")
}

tasks.withType<JavaCompile> {
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString()
}
10 changes: 8 additions & 2 deletions buildSrc/src/main/kotlin/Publications.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import gradle.kotlin.dsl.accessors._87b80c14bf1c4d505c7a71d7741e0994.publishing
import gradle.kotlin.dsl.accessors._87b80c14bf1c4d505c7a71d7741e0994.signing
import gradle.kotlin.dsl.accessors._a772fae24f61b6fdfe5e797ccdf7ddf5.publishing
import gradle.kotlin.dsl.accessors._a772fae24f61b6fdfe5e797ccdf7ddf5.signing
import groovy.util.Node
import org.gradle.api.Project
import org.gradle.api.artifacts.Dependency
Expand Down Expand Up @@ -50,6 +50,12 @@ fun MavenPublication.addKsmtPom() {
}
}

fun MavenPublication.generateMavenMetadata(project: Project) {
project.tasks.getByName("generateMetadataFileForMavenPublication") {
mustRunAfter(project.tasks.named("jar"))
}
}

fun MavenPublication.signKsmtPublication(project: Project) = with(project) {
signing {
val gpgKey = project.stringProperty("mavenSignGpgKey")?.removeSurrounding("\"")
Expand Down
19 changes: 5 additions & 14 deletions buildSrc/src/main/kotlin/io.ksmt.ksmt-base.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
}

group = "io.ksmt"
version = "0.5.29"
version = "0.5.30"

repositories {
mavenCentral()
Expand All @@ -31,6 +31,10 @@ detekt {
config = files(rootDir.resolve("detekt.yml"))
}

tasks.withType<JavaCompile> {
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString()
}
Expand All @@ -56,18 +60,5 @@ publishing {
name = "releaseDir"
url = uri(layout.buildDirectory.dir("release"))
}

val mavenDeployUrl = project.stringProperty("mavenDeployUrl")
if (mavenDeployUrl != null) {
maven {
name = "central"
url = uri(mavenDeployUrl)

credentials {
username = project.stringProperty("mavenDeployUser") ?: ""
password = project.stringProperty("mavenDeployPassword") ?: ""
}
}
}
}
}
6 changes: 3 additions & 3 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repositories {
```kotlin
dependencies {
// core
implementation("io.ksmt:ksmt-core:0.5.29")
implementation("io.ksmt:ksmt-core:0.5.30")
}
```

Expand All @@ -43,9 +43,9 @@ dependencies {
```kotlin
dependencies {
// z3
implementation("io.ksmt:ksmt-z3:0.5.29")
implementation("io.ksmt:ksmt-z3:0.5.30")
// bitwuzla
implementation("io.ksmt:ksmt-bitwuzla:0.5.29")
implementation("io.ksmt:ksmt-bitwuzla:0.5.30")
}
```

Expand Down
6 changes: 3 additions & 3 deletions examples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ repositories {

dependencies {
// core
implementation("io.ksmt:ksmt-core:0.5.29")
implementation("io.ksmt:ksmt-core:0.5.30")
// z3 solver
implementation("io.ksmt:ksmt-z3:0.5.29")
implementation("io.ksmt:ksmt-z3:0.5.30")
// Runner and portfolio solver
implementation("io.ksmt:ksmt-runner:0.5.29")
implementation("io.ksmt:ksmt-runner:0.5.30")
}

java {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 2 additions & 1 deletion ksmt-cvc5/ksmt-cvc5-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id("io.ksmt.ksmt-base")
id("com.github.johnrengelman.shadow") version "7.1.2"
id("com.gradleup.shadow") version "9.0.0-beta13"
}

val distDir = projectDir.parentFile.resolve("dist")
Expand Down Expand Up @@ -38,6 +38,7 @@ publishing {
project.shadow.component(this)

addKsmtPom()
generateMavenMetadata(project)
addSourcesAndJavadoc(project)
signKsmtPublication(project)
}
Expand Down
6 changes: 6 additions & 0 deletions ksmt-cvc5/ksmt-cvc5-native/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import gratatouille.capitalizeFirstLetter

plugins {
id("io.ksmt.ksmt-base")
}
Expand Down Expand Up @@ -42,6 +44,10 @@ cvc5Binaries.entries.forEach { (sourceSet, nativeConfig) ->
val artifactName = "ksmt-cvc5-native-$name"
val systemArch = name.replace('-', '/')

tasks.getByName("compile${name.capitalizeFirstLetter()}Kotlin") {
mustRunAfter(project(":ksmt-cvc5:ksmt-cvc5-core").tasks.named("jar"))
}

val jarTask = tasks.register<Jar>("$name-jar") {
archiveBaseName.set(artifactName)
from(sourceSet.output)
Expand Down
2 changes: 1 addition & 1 deletion ksmt-runner/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id("io.ksmt.ksmt-base")
id("com.jetbrains.rdgen") version "2022.3.2"
id("com.jetbrains.rdgen") version "2025.1.1"
}

repositories {
Expand Down
3 changes: 2 additions & 1 deletion ksmt-yices/ksmt-yices-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id("io.ksmt.ksmt-base")
id("com.github.johnrengelman.shadow") version "7.1.2"
id("com.gradleup.shadow") version "9.0.0-beta13"
`java-test-fixtures`
}

Expand Down Expand Up @@ -38,6 +38,7 @@ publishing {
project.shadow.component(this)

addKsmtPom()
generateMavenMetadata(project)
addSourcesAndJavadoc(project)
signKsmtPublication(project)
}
Expand Down
6 changes: 6 additions & 0 deletions ksmt-yices/ksmt-yices-native/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import gratatouille.capitalizeFirstLetter

plugins {
id("io.ksmt.ksmt-base")
}
Expand Down Expand Up @@ -40,6 +42,10 @@ yicesBinaries.entries.forEach { (sourceSet, nativeConfig) ->
val artifactName = "ksmt-yices-native-$name"
val systemArch = name.replace('-', '/')

tasks.getByName("compile${name.capitalizeFirstLetter()}Kotlin") {
mustRunAfter(project(":ksmt-yices:ksmt-yices-core").tasks.named("jar"))
}

val jarTask = tasks.register<Jar>("$name-jar") {
archiveBaseName.set(artifactName)
from(sourceSet.output)
Expand Down
3 changes: 2 additions & 1 deletion ksmt-z3/ksmt-z3-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id("io.ksmt.ksmt-base")
id("com.github.johnrengelman.shadow") version "7.1.2"
id("com.gradleup.shadow") version "9.0.0-beta13"
}

repositories {
Expand Down Expand Up @@ -40,6 +40,7 @@ publishing {
project.shadow.component(this)

addKsmtPom()
generateMavenMetadata(project)
addSourcesAndJavadoc(project)
signKsmtPublication(project)
}
Expand Down
6 changes: 6 additions & 0 deletions ksmt-z3/ksmt-z3-native/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import gratatouille.capitalizeFirstLetter

plugins {
id("io.ksmt.ksmt-base")
}
Expand Down Expand Up @@ -47,6 +49,10 @@ z3Binaries.forEach { (sourceSet, z3BinaryTask, nativeConfig) ->
val artifactName = "ksmt-z3-native-$name"
val systemArch = name.replace('-', '/')

tasks.getByName("compile${name.capitalizeFirstLetter()}Kotlin") {
mustRunAfter(project(":ksmt-z3:ksmt-z3-core").tasks.named("jar"))
}

val jarTask = tasks.register<Jar>("$name-jar") {
archiveBaseName.set(artifactName)
from(sourceSet.output)
Expand Down
5 changes: 5 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ include("ksmt-test")
include("ksmt-symfpu")

pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
}

resolutionStrategy {
eachPlugin {
if (requested.id.name == "rdgen") {
Expand Down
Loading