Skip to content

Commit 6ee5432

Browse files
Merge pull request #318 from AikidoSec/feat/support-java-25
Add Java 25 support
2 parents 34a9da7 + 55b0aff commit 6ee5432

19 files changed

Lines changed: 33 additions & 22 deletions

File tree

.github/workflows/end2end.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,13 @@ jobs:
4949
- { name: JavalinMySQLKotlin, test_file: end2end/javalin_mysql_kotlin.py, db: mysql_database }
5050
- { name: SpringBoot2.7Postgres, test_file: end2end/spring_boot_2.7_postgres.py, db: postgres_database }
5151
- { name: SpringBootHyperSQL, test_file: end2end/spring_boot_hypersql.py, db: "" }
52-
java-version: [17, 18, 19, 20, 21, 24]
52+
java-version: [17, 18, 19, 20, 21, 24, 25]
5353
distribution: ['adopt', 'corretto', 'oracle']
54+
exclude:
55+
# Spring Boot 2.7 uses the legacy javax stack and does not support JDK 25;
56+
# keep this app on Java 17-24 only (its javax coverage stays exercised there).
57+
- app: { name: SpringBoot2.7Postgres, test_file: end2end/spring_boot_2.7_postgres.py, db: postgres_database }
58+
java-version: 25
5459
steps:
5560
- name: Download build artifacts
5661
uses: actions/download-artifact@v4

.github/workflows/gradle-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
continue-on-error: true
4242
strategy:
4343
matrix:
44-
java-version: [17, 18, 19, 20, 21, 24]
44+
java-version: [17, 18, 19, 20, 21, 24, 25]
4545
distribution: ['adopt', 'corretto', 'oracle']
4646

4747
steps:

agent/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
plugins {
22
id 'java'
3-
id 'com.github.johnrengelman.shadow' version '7.1.0'
3+
id 'com.gradleup.shadow' version '9.5.1'
44
}
55

66
dependencies {
77
implementation project(':agent_api')
8-
implementation 'net.bytebuddy:byte-buddy:1.15.11'
8+
implementation 'net.bytebuddy:byte-buddy:1.18.11'
99
// Compile only for interface types :
1010
compileOnly 'jakarta.servlet:jakarta.servlet-api:6.1.0' // spring 3 -> jakarta
1111
compileOnly 'javax.servlet:javax.servlet-api:4.0.1' // spring 2 -> javax

agent/src/main/java/dev/aikido/agent/Agent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public static void premain(String agentArgs, Instrumentation inst) {
3131
logger.error("Zen by Aikido requires Java 17 or newer. Current version: %d. The agent will not be loaded.", javaVersion);
3232
return;
3333
}
34-
if (javaVersion > 24) {
35-
logger.error("Zen by Aikido does not support Java %d (max supported version: 24). The agent will not be loaded.", javaVersion);
34+
if (javaVersion > 25) {
35+
logger.error("Zen by Aikido does not support Java %d (max supported version: 25). The agent will not be loaded.", javaVersion);
3636
return;
3737
}
3838
logger.info("Zen by Aikido v%s starting.", Config.pkgVersion);

agent_api/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id 'java'
33
id 'jacoco'
4-
id 'com.github.johnrengelman.shadow' version '7.1.0'
4+
id 'com.gradleup.shadow' version '9.5.1'
55
}
66

77
jacoco {

build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ subprojects {
1515
tasks.withType(JavaCompile) {
1616
options.encoding = 'UTF-8'
1717
}
18-
sourceCompatibility = '16'
19-
targetCompatibility = '16'
18+
java {
19+
sourceCompatibility = JavaVersion.VERSION_16
20+
targetCompatibility = JavaVersion.VERSION_16
21+
}
2022
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Thu Oct 10 12:48:48 CEST 2024
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

sample-apps/JavalinMySQLKotlin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<properties>
1212
<maven.compiler.source>17</maven.compiler.source>
1313
<maven.compiler.target>17</maven.compiler.target>
14-
<kotlin.version>1.8.0</kotlin.version> <!-- Change to a stable version -->
14+
<kotlin.version>2.2.20</kotlin.version> <!-- 2.2.x required for JDK 25 -->
1515
<log4j2-version>2.24.3</log4j2-version>
1616
</properties>
1717

sample-apps/JavalinPostgres/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'java'
3-
id 'com.github.johnrengelman.shadow' version '7.1.2'
3+
id 'com.gradleup.shadow' version '9.5.1'
44
}
55

66
group = 'dev.aikido'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Tue Dec 17 13:31:53 CET 2024
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)