Skip to content
Open
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
17 changes: 14 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ plugins {
}

java {
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to say - just specify the toolchain - but Copilot notes that it's best to specify both the toolchain and the source target compatibility. So do this, and we'll eventually do this in all our repositories:

java {
    toolchain {
      languageVersion = JavaLanguageVersion.of(17)
    }
  }

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

}

repositories {
Expand Down Expand Up @@ -81,7 +81,18 @@ dependencies {
exclude module: "logback-classic"
}

testImplementation 'com.marklogic:marklogic-junit5:1.5.0'
testImplementation('com.marklogic:marklogic-junit5:1.5.0') {
// Use the Java Client declared above.
exclude module: "marklogic-client-api"

// Use the Spring dependencies from ml-app-deployer 6 to avoid vulnerabilities in Spring 5.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely prefer this because it's explicit.

exclude group: "org.springframework"
}

// Add back all required Spring 6 modules for tests, since junit5 and test code need more than just spring-test
testImplementation "org.springframework:spring-test:6.2.11"
testImplementation "org.springframework:spring-context:6.2.11"
testImplementation "org.springframework:spring-beans:6.2.11"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need this, spring-context will bring it in.


testImplementation "org.apache.kafka:connect-json:${kafkaVersion}"
testImplementation kafkaConnectRuntime
Expand Down