Skip to content
Merged
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 .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5

- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
java-version: '25'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/manually-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

actions/checkout@v2 is outdated — update to v4.

actions/checkout@v2 uses the deprecated Node.js 12 runtime and is missing security fixes from v3/v4. Since actions/setup-java was already updated to @v4, this should be updated as well for consistency and security.

♻️ Suggested fix
-        uses: actions/checkout@v2
+        uses: actions/checkout@v4
🧰 Tools
🪛 actionlint (1.7.10)

[error] 27-27: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
In @.github/workflows/manually-release.yml at line 27, The workflow step using
the checkout action should be updated from actions/checkout@v2 to
actions/checkout@v4; locate the step that contains "uses: actions/checkout@v2"
and change it to "uses: actions/checkout@v4", then run or validate the workflow
to ensure there are no breaking input/behavior changes with actions/checkout
(e.g., any custom inputs remain compatible) before pushing the change.


- name: Set up JDK 21
uses: actions/setup-java@v2
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '21'
distribution: 'temurin'
java-version: '25'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up JDK 21
uses: actions/setup-java@v2
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '21'
distribution: 'temurin'
java-version: '25'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
31 changes: 16 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ plugins {
id 'io.spring.dependency-management' version '1.1.7'
id 'java'
id 'jacoco'
id "com.github.node-gradle.node" version "2.2.1"
id "org.springframework.boot" version "3.4.2" apply false
id 'com.gradleup.shadow' version '9.3.1'
id "com.github.node-gradle.node" version "7.1.0"
id "org.springframework.boot" version "3.5.9" apply false
}

node {
version = '20.11.0'
npmVersion = '10.2.4'
download = true
workDir = file("${project.buildDir}/ui")
nodeModulesDir = file("${project.rootDir}/ui")
workDir = layout.buildDirectory.dir('ui').get().asFile
npmWorkDir = layout.buildDirectory.dir('npm').get().asFile
nodeProjectDir = file("${project.rootDir}/ui")
Comment on lines +14 to +16
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat -n build.gradle | head -30

Repository: reportportal/plugin-slack

Length of output: 1092


🏁 Script executed:

# Check gradle plugin versions
rg -n "id|plugins|node" build.gradle | head -20

Repository: reportportal/plugin-slack

Length of output: 483


🏁 Script executed:

# Check if there's a gradle wrapper or properties file that defines plugin versions
fd -e "gradle.properties" -e "settings.gradle" | xargs cat 2>/dev/null

Repository: reportportal/plugin-slack

Length of output: 51


🌐 Web query:

node-gradle plugin 7.x Property<Directory> workDir npmWorkDir API

💡 Result:

In node-gradle / gradle-node-plugin 7.x (com.github.node-gradle.node), the node { ... } extension exposes:

  • workDir: the directory where the downloaded Node.js distribution is unpacked
  • npmWorkDir: the directory where npm is installed (when using a specific npmVersion)

In Gradle terms these are DirectoryProperty (i.e., a Property<Directory>-style API), so in Kotlin DSL you typically configure them with .set(...) (or assign a File, which Gradle can coerce).

Kotlin DSL (recommended style)

node {
  workDir.set(layout.projectDirectory.dir(".gradle/node/nodejs"))
  npmWorkDir.set(layout.projectDirectory.dir(".gradle/node/npm"))
}

Groovy DSL (common in examples)

node {
  workDir = file("$buildDir/nodejs")
  npmWorkDir = file("$buildDir/npm")
}

Example usage in a real build (Apache Solr) sets both workDir and npmWorkDir explicitly. [1]

Related: node-gradle’s task API uses DirectoryProperty for task working directories as well (e.g., NodeTask.getWorkingDir()). [2]

Sources: Apache Solr build config example for workDir/npmWorkDir [1]; node-gradle plugin task API showing DirectoryProperty usage [2]; plugin portal entry for node-gradle 7.x line. [3]

[1] https://apache.googlesource.com/solr/%2B/refs/heads/main/gradle/node.gradle
[2] https://node-gradle.github.io/gradle-node-plugin/com/github/gradle/node/task/NodeTask.html
[3] https://plugins.gradle.org/plugin/com.github.node-gradle.node


Simplify node-gradle property assignments to use lazy evaluation.

The node-gradle 7.1.0 plugin uses DirectoryProperty for workDir and npmWorkDir. The current .get().asFile pattern eagerly resolves these lazy properties, bypassing Gradle's configuration avoidance optimization. Simplify to idiomatic Groovy DSL:

workDir = file("${layout.buildDirectory}/ui")
npmWorkDir = file("${layout.buildDirectory}/npm")

This maintains type compatibility while preserving lazy evaluation.

🤖 Prompt for AI Agents
In `@build.gradle` around lines 14 - 16, The workDir and npmWorkDir assignments
eagerly resolve DirectoryProperty via .get().asFile, which breaks Gradle's lazy
configuration; update the assignments for workDir and npmWorkDir to use
lazy-compatible file() calls derived from layout.buildDirectory (e.g., use
file("${layout.buildDirectory}/ui") and file("${layout.buildDirectory}/npm"))
while leaving nodeProjectDir (file("${project.rootDir}/ui")) unchanged so the
node-gradle plugin receives DirectoryProperty-compatible values and preserves
configuration avoidance.

}

npm_run_build {
Expand All @@ -27,9 +29,9 @@ apply from: scriptsUrl + '/signing.gradle'

repositories {
mavenLocal()
mavenCentral { url "https://repo1.maven.org/maven2" }
mavenCentral { url = "https://repo1.maven.org/maven2" }
if (!releaseMode) {
maven { url 'https://jitpack.io' }
maven { url = 'https://jitpack.io' }
}
}

Expand All @@ -41,20 +43,21 @@ dependencies {
implementation 'com.epam.reportportal:service-api'
annotationProcessor 'com.epam.reportportal:service-api'
} else {
implementation 'com.github.reportportal:service-api:4a137a7'
annotationProcessor 'com.github.reportportal:service-api:4a137a7'
implementation 'com.github.reportportal:service-api:7044a29'
annotationProcessor 'com.github.reportportal:service-api:7044a29'
}

compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}"

testImplementation 'org.mockito:mockito-core:5.14.2'
testImplementation 'org.mockito:mockito-junit-jupiter:5.14.2'
testImplementation 'org.mockito:mockito-core:5.21.0'
testImplementation 'org.mockito:mockito-junit-jupiter:5.21.0'
testImplementation "org.junit.jupiter:junit-jupiter"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.jupiter:junit-jupiter-engine"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

test {
Expand All @@ -71,9 +74,7 @@ test {

build.dependsOn jacocoTestReport

artifacts {
archives shadowJar
}
assemble.dependsOn shadowJar

generatePomFileForShadowPublication { pom.packaging = "jar" }

Expand Down Expand Up @@ -113,7 +114,7 @@ shadowJar {
into("/resources")
}
configurations = [project.configurations.compileClasspath]
zip64 true
zip64 = true
dependencies {
include(dependency('commons-io:commons-io:2.15.1'))
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ pluginId = slack
lombokVersion=1.18.42
junitVersion=5.11.0

springBootVersion=3.4.11
springBootVersion=3.5.9
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading