Skip to content
Draft
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 conventions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ gradlePlugin {

dependencies {
implementation("com.diffplug.spotless:spotless-plugin-gradle:7.0.2")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0")
implementation("org.jetbrains.kotlin:kotlin-allopen:1.9.0")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.3.0")
implementation("org.jetbrains.kotlin:kotlin-allopen:2.3.0")
implementation("org.springframework.boot:spring-boot-gradle-plugin:3.5.3")
implementation("com.github.johnrengelman:shadow:8.1.1")
implementation("com.google.cloud.tools:jib-gradle-plugin:3.4.0")
Expand Down
13 changes: 3 additions & 10 deletions conventions/src/main/kotlin/actionbase/BaseConventionsPlugin.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package actionbase

import actionbase.dependencies.Dependencies
import actionbase.tasks.GenerateCodeStyleTask
import com.diffplug.gradle.spotless.SpotlessExtension
import org.gradle.api.Plugin
import org.gradle.api.Project
Expand Down Expand Up @@ -97,15 +96,9 @@ class BaseConventionsPlugin : Plugin<Project> {
// Run ./gradlew spotlessApply before pushing. CI enforces via spotlessCheck.
setEnforceCheck(false)

java {
googleJavaFormat()
importOrder(*GenerateCodeStyleTask.getJavaImportsOrder())
removeUnusedImports()
target("**/*.java")
targetExclude("**/generated/**") // ✅ Exclude auto-generated folders
trimTrailingWhitespace()
endWithNewline()
}
// Java formatting disabled for Java 25 compatibility.
// google-java-format uses internal JDK APIs not accessible in Java 25.
// TODO: Re-enable when a compatible formatter is available.

kotlin {
ktlint()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.plugins.JavaPluginExtension
import org.gradle.jvm.toolchain.JavaLanguageVersion
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

import actionbase.dependencies.Dependencies
Expand Down Expand Up @@ -38,9 +39,9 @@ class KotlinConventionsPlugin : Plugin<Project> {
//
private fun configureKotlinCompiler(project: Project) {
project.tasks.withType(KotlinCompile::class.java).configureEach {
kotlinOptions {
jvmTarget = "17"
freeCompilerArgs = listOf("-Xjsr305=strict")
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
freeCompilerArgs.add("-Xjsr305=strict")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ object Versions {
const val JACKSON = "2.15.3"
const val IMMUTABLES = "2.9.3"
const val LZ4 = "1.7.1"
const val KOTLIN = "1.9.0"
const val KOTLIN = "2.3.0"
const val REACTOR = "3.6.2"
const val REACTIVE_STREAMS = "1.0.4"
const val FEIGN = "12.4"
Expand All @@ -32,7 +32,7 @@ object Versions {
const val HIKARICP = "5.0.1"
const val EXPOSED = "0.42.1"
const val H2 = "2.2.220"
const val KOTEST = "5.5.5"
const val KOTEST = "5.9.1"
const val BLOCKHOUND = "1.0.8.RELEASE"
const val RELOAD4J = "1.2.25"
const val JACKSON_SPARK = "2.12.3"
Expand Down
23 changes: 23 additions & 0 deletions engine/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import org.gradle.api.attributes.java.TargetJvmVersion
import org.gradle.jvm.toolchain.JavaLanguageVersion

import actionbase.dependencies.Dependencies

plugins {
Expand All @@ -6,6 +9,21 @@ plugins {
`java-test-fixtures`
}

// Override to Java 25 for FFI support
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(25))
}
}

// The kotlin-conventions plugin sets targetCompatibility=17, which sets org.gradle.jvm.version=17
// on all configurations. Any dependency requiring JVM 24+ needs this override.
configurations.matching { it.isCanBeResolved }.configureEach {
attributes {
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 25)
}
}

ext["jvmArgs"] = listOf("--add-opens=java.base/java.nio=ALL-UNNAMED")

tasks {
Expand Down Expand Up @@ -90,9 +108,14 @@ tasks.withType<Test>().all {
"--add-opens=java.base/java.lang=ALL-UNNAMED",
"--add-opens=java.base/java.util=ALL-UNNAMED",
"--add-opens=java.base/java.lang.reflect=ALL-UNNAMED",
"--enable-native-access=ALL-UNNAMED",
)

if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_13)) {
jvmArgs("-XX:+AllowRedefinitionToAddDeleteMethods")
}

// BlockHound uses Byte Buddy which does not officially support Java 25.
// The experimental flag allows it to run on unsupported JVM versions.
systemProperty("reactor.blockhound.shaded.net.bytebuddy.experimental", "true")
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class ActionbaseQueryExecutorPostProcessJsonObjectSpec :
.expectNextMatches { result ->
result.schema.fields.map { it.name } shouldBe listOf("id", "json_data", "extracted_name", "extracted_age")
result.rows.size shouldBe 3
result.rows[0].array shouldBe arrayOf("1", """{"name": "John", "age": 30, "city": "New York"}""", "John", 30)
result.rows[1].array shouldBe arrayOf("2", """{"name": "Jane", "age": 25, "city": "London"}""", "Jane", 25)
result.rows[0].array shouldBe arrayOf<Any?>("1", """{"name": "John", "age": 30, "city": "New York"}""", "John", 30)
result.rows[1].array shouldBe arrayOf<Any?>("2", """{"name": "Jane", "age": 25, "city": "London"}""", "Jane", 25)
result.rows[2].array shouldBe arrayOf("3", null, null, null)
true
}.verifyComplete()
Expand Down Expand Up @@ -127,8 +127,8 @@ class ActionbaseQueryExecutorPostProcessJsonObjectSpec :
.expectNextMatches { result ->
result.schema.fields.map { it.name } shouldBe listOf("id", "json_data", "extracted_name", "extracted_age")
result.rows.size shouldBe 2
result.rows[0].array shouldBe arrayOf("1", """{"name": "John", "age": 30}""", "John", 30)
result.rows[1].array shouldBe arrayOf("2", """{"name": "Jane"}""", "Jane", null)
result.rows[0].array shouldBe arrayOf<Any?>("1", """{"name": "John", "age": 30}""", "John", 30)
result.rows[1].array shouldBe arrayOf<Any?>("2", """{"name": "Jane"}""", "Jane", null)
true
}.verifyComplete()
}
Expand Down Expand Up @@ -176,8 +176,8 @@ class ActionbaseQueryExecutorPostProcessJsonObjectSpec :
it.name
} shouldBe listOf("id", "extracted_string", "extracted_integer", "extracted_float", "extracted_boolean", "extracted_null")
result.rows.size shouldBe 2
result.rows[0].array shouldBe arrayOf("1", "text", 42, 3.14, true, null)
result.rows[1].array shouldBe arrayOf("2", "another", 100, 2.718, false, null)
result.rows[0].array shouldBe arrayOf<Any?>("1", "text", 42, 3.14, true, null)
result.rows[1].array shouldBe arrayOf<Any?>("2", "another", 100, 2.718, false, null)
true
}.verifyComplete()
}
Expand Down Expand Up @@ -213,8 +213,8 @@ class ActionbaseQueryExecutorPostProcessJsonObjectSpec :
.expectNextMatches { result ->
result.schema.fields.map { it.name } shouldBe listOf("id", "json_data", "extracted_name", "extracted_age")
result.rows.size shouldBe 2
result.rows[0].array shouldBe arrayOf("1", """{"user": {"name": "John", "details": {"age": 30}}}""", "John", 30)
result.rows[1].array shouldBe arrayOf("2", """{"user": {"name": "Jane", "details": {"age": 25}}}""", "Jane", 25)
result.rows[0].array shouldBe arrayOf<Any?>("1", """{"user": {"name": "John", "details": {"age": 30}}}""", "John", 30)
result.rows[1].array shouldBe arrayOf<Any?>("2", """{"user": {"name": "Jane", "details": {"age": 25}}}""", "Jane", 25)
true
}.verifyComplete()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import org.junit.jupiter.api.extension.BeforeAllCallback
import org.junit.jupiter.api.extension.ExtensionContext
import org.junit.jupiter.api.extension.ParameterContext
import org.junit.jupiter.api.extension.ParameterResolver
import org.opentest4j.TestAbortedException

import reactor.core.publisher.Mono

Expand All @@ -26,6 +27,14 @@ class HBaseTestingClusterExtension :
}

override fun beforeAll(context: ExtensionContext) {
// Subject.getSubject(AccessControlContext) was removed in Java 18, breaking the HBase
// mini cluster's Hadoop UserGroupInformation initialization. Skip on Java 18+.
if (Runtime.version().feature() >= 18) {
throw TestAbortedException(
"HBase mini cluster requires Java 17 or earlier: " +
"Subject.getSubject(AccessControlContext) was removed in Java 18",
)
}
HBaseTestingCluster.startIfNeeded()
DefaultHBaseCluster.initialize(Mono.just(HBaseTestingCluster.asyncConnection), "ab_test", HBaseTestingCluster.hbaseConfiguration)
// Initialize DefaultStorageBackendFactory with the HBase testing cluster (idempotent)
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
11 changes: 11 additions & 0 deletions server/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import actionbase.BuildParameter
import actionbase.dependencies.Dependencies
import org.gradle.jvm.toolchain.JavaLanguageVersion

plugins {
id("actionbase.kotlin-conventions")
Expand Down Expand Up @@ -84,6 +85,16 @@ springBoot {
buildInfo()
}

tasks.named<org.springframework.boot.gradle.tasks.run.BootRun>("bootRun") {
jvmArgs("--enable-native-access=ALL-UNNAMED")
// Use Java 25 for SlateDB FFI support
javaLauncher.set(
javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(25))
}
)
}

jib {
to {
image = ghcrImage
Expand Down
Loading