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: 2 additions & 2 deletions .github/workflows/configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ jobs:
JAVA_VERSION: '21'
JAVA_DISTRIBUTION: 'corretto'
KOTLIN_VERSION: '2.4.0'
DOKKA_VERSION: '1.9.20' # keep in sync with bindings-jvm/build.gradle.kts
DOKKA_VERSION: '2.2.0' # keep in sync with bindings-jvm/build.gradle.kts
KTLINT_VERSION: '1.8.0'
GRADLE_VERSION: '8.14'
GRADLE_VERSION: '9.6.1'
JNA_VERSION: '5.19.1' # keep in sync with bindings-jvm/build.sh
GSON_VERSION: '2.14.0' # keep in sync with bindings-jvm/build.sh
WASM_PACK_VERSION: '0.15.0'
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,7 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
11 changes: 4 additions & 7 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 12 additions & 24 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resolver = "2"
name = "cloudformation-validate"

[workspace.package]
version = "1.5.0"
version = "1.6.0"
edition = "2024"
license = "Apache-2.0"
description = "AWS CloudFormation Validate"
Expand Down
50 changes: 39 additions & 11 deletions src/bindings-jvm/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,40 @@
# CloudFormation Validate JVM Bindings
# CloudFormation Validate for JVM

JVM bindings for [`cloudformation-validate`](https://github.com/aws-cloudformation/cloudformation-validate)
via [UniFFI](https://mozilla.github.io/uniffi-rs/). Compiles the full validation pipeline into a native shared library
with auto-generated Kotlin bindings, packaged as a JAR with bundled natives.
Validate AWS CloudFormation templates from Kotlin or Java and catch schema violations, security risks, and
best-practice findings before deployment — in your editor, build, or CI.

All types live in `software.amazon.cloudformation.validate`.
- **Offline** — all rules and resource schemas are bundled.
- **Fast** — sub-second validation per template.
- **Self-contained** — native libraries for all supported platforms are included.

For a complete, runnable example, see
[examples](https://github.com/aws-cloudformation/cloudformation-validate/tree/main/src/bindings-jvm/examples).
All types live in the `software.amazon.cloudformation.validate` package.

## Engine
## Installation

`RegoEngine` and `CelEngine` both implement the `Engine` interface. They are interchangeable — both produce identical
diagnostics for the same template and config.
Available on [Maven Central](https://central.sonatype.com/artifact/software.amazon.cloudformation/cloudformation-validate)
as `software.amazon.cloudformation:cloudformation-validate`. Both snippets below resolve the latest published version;
substitute a specific version to pin one.

Gradle:

```groovy
implementation 'software.amazon.cloudformation:cloudformation-validate:latest.release'
```

Maven:

```xml
<dependency>
<groupId>software.amazon.cloudformation</groupId>
<artifactId>cloudformation-validate</artifactId>
<version>[0,)</version>
</dependency>
```

## Quick start

```kotlin
import software.amazon.cloudformation.validate.*
import software.amazon.cloudformation.validate.RegoEngine
import java.io.File

val engine = RegoEngine()
Expand All @@ -26,6 +45,15 @@ for (d in report.diagnostics) {
}
```

Each diagnostic identifies the rule, severity, affected resource and property, and source location — see
[StandardDiagnostic](#standarddiagnostic). A complete, runnable project is in
[examples](https://github.com/aws-cloudformation/cloudformation-validate/tree/main/src/bindings-jvm/examples).

## Engine

`RegoEngine` and `CelEngine` both implement the `Engine` interface and are interchangeable — they produce identical
diagnostics for the same template and config.

### `Engine` interface

```kotlin
Expand Down
Loading
Loading