Skip to content

Commit 654425f

Browse files
authored
Merge pull request #930 from arunvenmany-ibm/gradle_depecations_fix
gradle deprecation fixes testing
2 parents 8ec4372 + 8b0c0a3 commit 654425f

File tree

59 files changed

+148
-147
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+148
-147
lines changed

.github/workflows/gradle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
working-directory: build/reports/tests
8686
env:
8787
BUILD_REPORTS_PATH: /buildReports/${{runner.os}}/java${{matrix.java}}/${{matrix.RUNTIME}}-${{matrix.RUNTIME_VERSION}}/
88-
- uses: actions/upload-artifact@v3
88+
- uses: actions/upload-artifact@v4
8989
if: ${{ failure() }}
9090
with:
9191
name: buildReportsArtifactLinux
@@ -167,7 +167,7 @@ jobs:
167167
if: ${{ failure() }}
168168
working-directory: C:/ci.gradle
169169
run: cp -r build/reports/tests/test D:/buildReports/${{runner.os}}/java${{matrix.java}}/${{matrix.RUNTIME}}-${{matrix.RUNTIME_VERSION}}/
170-
- uses: actions/upload-artifact@v3
170+
- uses: actions/upload-artifact@v4
171171
if: ${{ failure() }}
172172
with:
173173
name: buildReportsArtifactWindows

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ repositories {
1313
mavenLocal()
1414
mavenCentral()
1515
maven {
16-
url 'https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/'
16+
url = 'https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/'
1717
}
1818
maven {
19-
url 'https://oss.sonatype.org/content/repositories/snapshots/'
19+
url = 'https://oss.sonatype.org/content/repositories/snapshots/'
2020
}
2121
}
2222

2323
buildscript {
2424
repositories {
2525
mavenLocal()
2626
maven {
27-
url "https://plugins.gradle.org/m2/"
27+
url = "https://plugins.gradle.org/m2/"
2828
}
2929
}
3030
dependencies {

src/main/groovy/io/openliberty/tools/gradle/tasks/AbstractServerTask.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corporation 2017, 2024.
2+
* (C) Copyright IBM Corporation 2017, 2025.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -677,7 +677,8 @@ abstract class AbstractServerTask extends AbstractLibertyTask {
677677
application.appendNode('applicationFilename', appObj.getArchiveFileName().get())
678678
}
679679
if (appObj instanceof War) {
680-
application.appendNode('warSourceDirectory', project.webAppDirName)
680+
War war=appObj
681+
application.appendNode('warSourceDirectory', war.webAppDirectory.getAsFile().get())
681682
}
682683
} else if (appObj instanceof File) {
683684
application.appendNode('appsDirectory', appDir)

src/main/groovy/io/openliberty/tools/gradle/tasks/CleanTask.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corporation 2015, 2023.
2+
* (C) Copyright IBM Corporation 2015, 2025.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,8 +21,8 @@ import org.gradle.api.logging.LogLevel
2121
class CleanTask extends AbstractServerTask {
2222
CleanTask() {
2323
configure({
24-
description 'Deletes files from some directories from the Liberty server'
25-
group 'Liberty'
24+
description = 'Deletes files from some directories from the Liberty server'
25+
group = 'Liberty'
2626
})
2727
}
2828

src/main/groovy/io/openliberty/tools/gradle/tasks/CompileJSPTask.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corporation 2017, 2024.
2+
* (C) Copyright IBM Corporation 2017, 2025.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,8 +29,8 @@ class CompileJSPTask extends AbstractFeatureTask {
2929

3030
CompileJSPTask() {
3131
configure({
32-
description 'Compile the JSP files in the src/main/webapp directory. '
33-
group 'Liberty'
32+
description = 'Compile the JSP files in the src/main/webapp directory. '
33+
group = 'Liberty'
3434
})
3535
}
3636

src/main/groovy/io/openliberty/tools/gradle/tasks/CreateTask.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corporation 2014, 2024.
2+
* (C) Copyright IBM Corporation 2014, 2025.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,8 +29,8 @@ class CreateTask extends AbstractServerTask {
2929

3030
CreateTask() {
3131
configure({
32-
description 'Creates a Liberty server.'
33-
group 'Liberty'
32+
description = 'Creates a Liberty server.'
33+
group = 'Liberty'
3434
})
3535
outputs.upToDateWhen {
3636
getServerDir(project).exists() && (new File(getServerDir(project), 'server.xml')).exists() && !isServerDirChanged(project)

src/main/groovy/io/openliberty/tools/gradle/tasks/DeployTask.groovy

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corporation 2014, 2024.
2+
* (C) Copyright IBM Corporation 2014, 2025.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -57,8 +57,8 @@ class DeployTask extends AbstractServerTask {
5757

5858
DeployTask() {
5959
configure({
60-
description "Copy applications generated by the Gradle project to a Liberty server's dropins or apps directory."
61-
group 'Liberty'
60+
description = "Copy applications generated by the Gradle project to a Liberty server's dropins or apps directory."
61+
group = 'Liberty'
6262
project.afterEvaluate {
6363
springBootVersion = findSpringBootVersion(project)
6464
springBootTask = findSpringBootTask(project, springBootVersion)
@@ -133,7 +133,7 @@ class DeployTask extends AbstractServerTask {
133133
} else {
134134
archiveBaseName = task.getArchiveBaseName().get()
135135
fileName = getArchiveName(task)
136-
Files.copy(task.archivePath.toPath(), new File(getServerDir(project), "/" + appsDir + "/" + getArchiveName(task)).toPath(), StandardCopyOption.REPLACE_EXISTING)
136+
Files.copy(task.archiveFile.get().getAsFile().toPath(), new File(getServerDir(project), "/" + appsDir + "/" + getArchiveName(task)).toPath(), StandardCopyOption.REPLACE_EXISTING)
137137
validateAppConfig(getArchiveName(task), archiveBaseName, appsDir)
138138
}
139139
validateAppConfig(fileName, archiveBaseName, appsDir)
@@ -167,10 +167,10 @@ class DeployTask extends AbstractServerTask {
167167
String archiveOutputPath;
168168

169169
if (isSpringBoot2plus(springBootVersion)) {
170-
archiveOutputPath = springBootTask.archivePath.getAbsolutePath()
170+
archiveOutputPath = springBootTask.archiveFile.get().getAsFile().getAbsolutePath()
171171
}
172172
else if(isSpringBoot1(springBootVersion)) {
173-
archiveOutputPath = springBootTask.archivePath.getAbsolutePath()
173+
archiveOutputPath = springBootTask.archiveFile.get().getAsFile().getAbsolutePath()
174174
if (project.bootRepackage.classifier != null && !project.bootRepackage.classifier.isEmpty()) {
175175
archiveOutputPath = archiveOutputPath.substring(0, archiveOutputPath.lastIndexOf(".")) + "-" + project.bootRepackage.classifier + "." + springBootTask.getArchiveExtension().get()
176176
}

src/main/groovy/io/openliberty/tools/gradle/tasks/DevTask.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corporation 2019, 2024.
2+
* (C) Copyright IBM Corporation 2019, 2025.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -68,8 +68,8 @@ class DevTask extends AbstractFeatureTask {
6868

6969
DevTask() {
7070
configure({
71-
description 'Runs a Liberty server in dev mode'
72-
group 'Liberty'
71+
description = 'Runs a Liberty server in dev mode'
72+
group = 'Liberty'
7373
})
7474
}
7575

src/main/groovy/io/openliberty/tools/gradle/tasks/DevcTask.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corporation 2020.
2+
* (C) Copyright IBM Corporation 2020, 2025
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,8 +21,8 @@ class DevcTask extends DevTask {
2121

2222
DevcTask() {
2323
configure({
24-
description 'Runs a Liberty server in dev mode inside of a Docker container'
25-
group 'Liberty'
24+
description = 'Runs a Liberty server in dev mode inside of a Docker container'
25+
group = 'Liberty'
2626
})
2727
}
2828

src/main/groovy/io/openliberty/tools/gradle/tasks/DumpTask.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corporation 2015, 2019.
2+
* (C) Copyright IBM Corporation 2015, 2025.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,8 +22,8 @@ class DumpTask extends AbstractServerTask {
2222

2323
DumpTask() {
2424
configure({
25-
description 'Dumps diagnostic information from the Liberty server into an archive.'
26-
group 'Liberty'
25+
description = 'Dumps diagnostic information from the Liberty server into an archive.'
26+
group = 'Liberty'
2727
})
2828
}
2929

0 commit comments

Comments
 (0)