Skip to content

Commit 4537348

Browse files
committed
Remove Java 8 requirement from sample function app
This removes the previous requirement for the sample-signup-app to target Java 8. It was required due to a now non-existent limitation in the Pulsar functions client. It also removes the previous requirement for the sample-signup-app to use Pulsar client version `4.0.5`. It was required due to a limmitation in the Pulsar version `4.0.6` which has since been addressed in Pulsar `4.0.6+`. Therefore, the Pulsar version used in now derived from the Gradle platform. Signed-off-by: onobc <chris.bono@gmail.com>
1 parent 3adf85a commit 4537348

File tree

1 file changed

+6
-7
lines changed
  • spring-pulsar-sample-apps/sample-pulsar-functions/sample-signup-function

1 file changed

+6
-7
lines changed

spring-pulsar-sample-apps/sample-pulsar-functions/sample-signup-function/build.gradle

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,17 @@ plugins {
55
group = 'org.springframework.pulsar.sample'
66
description = 'Sample Signup Pulsar Function'
77

8-
java {
9-
sourceCompatibility = JavaVersion.VERSION_1_8
10-
targetCompatibility = JavaVersion.VERSION_1_8
8+
repositories {
9+
mavenCentral()
1110
}
1211

13-
repositories {
14-
mavenCentral()
12+
java {
13+
sourceCompatibility = JavaVersion.VERSION_17
14+
targetCompatibility = JavaVersion.VERSION_17
1515
}
1616

1717
def versionCatalog = extensions.getByType(VersionCatalogsExtension).named("libs")
18-
// At Pulsar 4.0.6 things break related to jdk8 requirement - hardcoding at 4.0.5 for now
19-
def pulsarVersion = '4.0.7'
18+
def pulsarVersion = project.properties['pulsarVersion'] ?: versionCatalog.findVersion("pulsar").orElseThrow().displayName
2019

2120
dependencies {
2221
implementation "org.apache.pulsar:pulsar-client-all:${pulsarVersion}"

0 commit comments

Comments
 (0)