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
4 changes: 4 additions & 0 deletions CedarJava/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 4.3.1
### Added
* Added Zig version validation for publishing artifacts [#306](https://github.com/cedar-policy/cedar-java/pull/306)

## 4.3.0
### Added
* Introduced new model classes for improved type safety and functionality:
Expand Down
23 changes: 22 additions & 1 deletion CedarJava/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,26 @@ tasks.register('installCargoZigbuild', Exec) {
commandLine 'cargo', '+' + RustVersion, 'install', 'cargo-zigbuild@0.19.7'
}

def ZigVersion = '0.11'
tasks.register('validateZigVersion') {
group = 'Build'
description = 'Validates that the correct zig version is installed'

doLast {
def output = new ByteArrayOutputStream()
exec {
commandLine 'zig', 'version'
standardOutput = output
}
def version = output.toString().trim()
println "Detected Zig version: ${version}"
if (!version.startsWith(ZigVersion)) {
throw new GradleException("Zig version must be ${ZigVersion} but found: ${version}")
}
println "Zig version validation successful"
}
}

tasks.register('compileFFI') {
dependsOn('installCargoZigbuild')
group 'Build'
Expand Down Expand Up @@ -252,13 +272,14 @@ java {
/*
Configures Maven publishing
*/
publish.dependsOn('validateZigVersion')
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId = 'com.cedarpolicy'
artifactId = 'cedar-java'
version = '4.3.0'
version = '4.3.1'

artifacts {
jar
Expand Down
2 changes: 1 addition & 1 deletion CedarJavaFFI/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description = "Java FFI for Cedar (from the cedar-policy crate)."
edition = "2021"


version = "4.3.0"
version = "4.3.1"

[dependencies]
serde = { version = "1.0", features = ["derive", "rc"] }
Expand Down
Loading