mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
* build: Add xtask automation for binding version management Introduces a dedicated xtask crate that keeps language binding versions in sync with the core regorus crate, following the workflow pattern used by rust-analyzer, gitoxide, and ripgrep. Key features: - Git-based change detection: compares binding source files against a base ref (merge-base with origin/main by default) plus unstaged/ untracked files to identify which bindings have been modified - SemVer-aware bumping: binding edits trigger a minor version increment (e.g. 0.5.1 → 0.6.0) under pre-1.0 semantics, signaling potential breaking changes; clean bindings simply align to the root version - Multi-language support: updates Cargo manifests (Rust FFI, Java, Python, WASM, Ruby), Maven pom.xml (Java), Ruby version constants, and C# project files in a single pass - CI integration: --check mode fails fast when manifests are out of sync, ensuring pre-commit and release-plz workflows catch stale versions before merge Integration points: - release-plz.toml: runs cargo xtask bindings --base-ref origin/main after bumping the root crate, so binding versions are updated atomically during the release process - scripts/pre-commit: invokes cargo xtask bindings --check to block commits that would leave bindings out of sync - .cargo/config.toml: defines cargo xtask alias for convenience Documentation includes inline examples showing how version bumps behave when bindings are ahead/behind the root, and notes that the minor field acts as the major version under SemVer 0.y.z initial development phase. Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com> * build: refresh xtask tooling, workflows, and locks - cargo xtask bindings: keep the binding version-sync pipeline intact - cargo xtask update-deps: new helper to regenerate workspace/binding Cargo.lock files - workflows: auto-detect the Java jar version in CI and temporarily disable the Ruby workflow - lock files: refresh root + binding snapshots after the dependency sweep Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com> --------- Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
139 lines
3.9 KiB
XML
139 lines
3.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
Copyright (c) Microsoft Corporation.
|
|
Licensed under the MIT License.
|
|
-->
|
|
|
|
<project>
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<groupId>com.microsoft.regorus</groupId>
|
|
<artifactId>regorus-java</artifactId>
|
|
<version>0.6.0</version>
|
|
|
|
<name>Regorus Java</name>
|
|
<description>Java bindings for Regorus - a fast, lightweight Rego interpreter written in Rust</description>
|
|
<url>https://github.com/microsoft/regorus/bindings/java</url>
|
|
|
|
<licenses>
|
|
<license>
|
|
<name>MIT License</name>
|
|
<url>https://opensource.org/blog/license/mit</url>
|
|
</license>
|
|
</licenses>
|
|
|
|
<properties>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<maven.compiler.source>1.8</maven.compiler.source>
|
|
<maven.compiler.target>1.8</maven.compiler.target>
|
|
</properties>
|
|
|
|
<distributionManagement>
|
|
<repository>
|
|
<id>ossrh</id>
|
|
<name>Central Repository OSSRH</name>
|
|
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
|
</repository>
|
|
</distributionManagement>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<version>3.8.1</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.code.gson</groupId>
|
|
<artifactId>gson</artifactId>
|
|
<version>2.10.1</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<resources>
|
|
<resource>
|
|
<!--
|
|
Include native/ folder in built JAR.
|
|
During CI build we build native libraries for various platforms
|
|
and put them into native/ folder.
|
|
See `.github/publish-java.yml`.
|
|
-->
|
|
<directory>${project.basedir}/native</directory>
|
|
</resource>
|
|
</resources>
|
|
|
|
<plugins>
|
|
<plugin>
|
|
<artifactId>exec-maven-plugin</artifactId>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<version>3.1.0</version>
|
|
<executions>
|
|
<execution>
|
|
<!-- Build a debug release for tests -->
|
|
<id>build-native-lib-for-test</id>
|
|
<phase>test-compile</phase>
|
|
<goals>
|
|
<goal>exec</goal>
|
|
</goals>
|
|
<configuration>
|
|
<executable>python3</executable>
|
|
<arguments>
|
|
<argument>${project.basedir}/tools/testbuild.py</argument>
|
|
</arguments>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<version>3.2.5</version>
|
|
<configuration>
|
|
<!-- Add debug build to Java path, so it's discoverable by JVM. This is only for tests. -->
|
|
<argLine>-Djava.library.path=${project.basedir}/target/debug:${java.library.path}</argLine>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<!-- Build javadoc JAR, this is required by Maven Central. -->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-javadoc-plugin</artifactId>
|
|
<version>3.6.3</version>
|
|
<executions>
|
|
<execution>
|
|
<id>attach-javadoc</id>
|
|
<goals>
|
|
<goal>jar</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!-- Build sources JAR, this is required by Maven Central. -->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-source-plugin</artifactId>
|
|
<version>3.3.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>attach-sources</id>
|
|
<goals>
|
|
<goal>jar</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<reporting>
|
|
<plugins>
|
|
<plugin>
|
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</reporting>
|
|
</project>
|