Skip to content

Commit 95fed02

Browse files
Update to Gradle 9 and make more progress toward configuration cache compatibility (#1182)
1 parent d5f0795 commit 95fed02

File tree

7 files changed

+18
-53
lines changed

7 files changed

+18
-53
lines changed

build.gradle

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,11 @@ allprojects {
7171
// exclude log4j, which may come in transitively, from all configurations to avoid its potential vulnerabilities
7272
exclude group: "log4j", module:"log4j"
7373
}
74-
configurations.driver.setDescription("Dependencies used for SqlUtils")
74+
configurations.driver.setDescription("Dependencies used for Gradle SetUpProperties task")
7575
configurations.utilities.setDescription("Utility binaries for use on Windows platform")
7676

7777
dependencies
7878
{
79-
//for SqlUtils
8079
driver "org.postgresql:postgresql:${postgresqlDriverVersion}"
8180
driver "com.microsoft.sqlserver:mssql-jdbc:${mssqlJdbcVersion}"
8281

@@ -436,17 +435,6 @@ subprojects {
436435
}
437436
})
438437
}
439-
project.tasks.register("showConfigs") {
440-
task ->
441-
task.group = GroupNames.HELP
442-
task.description = "Show all the configurations available in the project and their published artifacts"
443-
task.doLast({
444-
project.configurations.forEach({
445-
Configuration config ->
446-
println(config.name + ": (${config.getDescription()})")
447-
})
448-
})
449-
}
450438

451439
project.tasks.register("allDepInsight", DependencyInsightReportTask) {
452440
DependencyInsightReportTask t ->
@@ -465,6 +453,7 @@ project.tasks.register("showDiscrepancies", ShowDiscrepancies) {
465453
task ->
466454
task.group = "Help"
467455
task.description = "Report external dependencies that have more than one version referenced in the modules in this build"
456+
task.notCompatibleWithConfigurationCache("Walks the project tree")
468457
}
469458

470459
project.tasks.register('getModulesManifest', DefaultTask) {
@@ -517,24 +506,7 @@ project.tasks.register('getModulesManifest', DefaultTask) {
517506
})
518507
manifestFile.text = manifestString.toString()
519508
})
520-
}
521-
522-
project.tasks.register('listNpmProjects', DefaultTask) {
523-
task ->
524-
task.group = GroupNames.NPM_RUN
525-
task.description ="List all projects that employ npm in their build"
526-
task.doLast({
527-
List<String> npmProjects = []
528-
project.allprojects({Project p ->
529-
if (p.getPlugins().hasPlugin(NpmRun.class))
530-
npmProjects.add(p.path)
531-
})
532-
if (npmProjects.size() == 0)
533-
println("No projects found containing ${NpmRun.NPM_PROJECT_FILE}")
534-
else {
535-
println("The following projects use NPM in their builds:\n\t${npmProjects.join("\n\t")}\n")
536-
}
537-
})
509+
task.notCompatibleWithConfigurationCache("Walks the project tree")
538510
}
539511

540512
project.tasks.register('ijWorkspaceSetup', Copy) {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ windowsProteomicsBinariesVersion=1.0
5959
# The current version numbers for the gradle plugins.
6060
artifactoryPluginVersion=5.2.5
6161
gradleNodePluginVersion=7.1.0
62-
gradlePluginsVersion=6.3.0
62+
gradlePluginsVersion=7.0.0
6363
owaspDependencyCheckPluginVersion=12.1.3
6464
versioningPluginVersion=1.1.2
6565

gradle/wrapper/gradle-wrapper.jar

1.65 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
#
4-
# Copyright © 2015-2021 the original authors.
4+
# Copyright © 2015 the original authors.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.

server/build.gradle

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import org.apache.commons.lang3.SystemUtils
2-
import org.labkey.gradle.plugin.JsDoc
32
import org.labkey.gradle.plugin.XsdDoc
43
import org.labkey.gradle.task.CreateModule
4+
import org.labkey.gradle.task.CreateJsDocs
55
import org.labkey.gradle.util.BuildUtils
66
import org.labkey.gradle.util.GroupNames
77
import org.labkey.gradle.util.PomFileHelper
@@ -162,13 +162,13 @@ project.publishing {
162162
}
163163

164164

165-
project.tasks.register("cleanDocs", DefaultTask) {
166-
DefaultTask task ->
165+
project.tasks.register("cleanDocs", Delete) {
166+
Delete task ->
167167
task.group = GroupNames.DOCUMENTATION
168168
task.description = "Remove directories created for xsd and js doc tasks"
169-
task.doLast({
170-
project.delete(XsdDoc.getXsdDocDirectory(project))
171-
project.delete(JsDoc.getJsDocDirectory(project))
169+
task.configure({ DeleteSpec delete ->
170+
delete.delete(XsdDoc.getXsdDocDirectory(project))
171+
delete.delete(CreateJsDocs.getJsDocDirectory(project))
172172
})
173173
}
174174

@@ -180,6 +180,7 @@ tasks.register('createModule', CreateModule) {
180180
"Use createFiles to control which subdirectories are created. Include some subset of api, test, and/or schema " +
181181
"in a comma delimited list to create those subdirectories in the new module. If none are required, still " +
182182
"include -PcreateFiles with no value to avoid being prompted."
183+
task.notCompatibleWithConfigurationCache("Class needs to declare more input and output properties.")
183184
}
184185

185186
project.tasks.register("reportVersionToTeamCity", DefaultTask) {
@@ -199,7 +200,7 @@ if (project.hasProperty("teamcity"))
199200
else
200201
{
201202
var cleanJspRecompileSetup = project.tasks.register("cleanJspRecompileSetup", Delete) {
202-
DeleteSpec task ->
203+
Delete task ->
203204
task.group = GroupNames.BUILD
204205
task.delete project.rootProject.layout.buildDirectory.dir("jspRecompiling").get()
205206
task.description = "Remove build/jspRecompiling directory"
@@ -226,16 +227,8 @@ else
226227
// We add this configuration here so we have a single location to link to for the npm and node executables.
227228
// Each project that requires node will have its own downloaded version of node and npm, but for the symlinkNode
228229
// task we need a single location, and one that works even when not building from source (Issue 35207)
229-
if (BuildUtils.useServerNode(project))
230-
{
231-
project.node {
232-
workDir = project.file("${project.rootProject.projectDir}/.node")
233-
npmWorkDir = project.file("${project.rootProject.projectDir}/.node")
234-
}
235-
} else {
236-
project.node {
237-
workDir = BuildUtils.getRootBuildDirFile(project, ".node")
238-
npmWorkDir = BuildUtils.getRootBuildDirFile(project, ".node")
239-
}
230+
project.node {
231+
workDir = project.file("${project.rootProject.projectDir}/.node")
232+
npmWorkDir = project.file("${project.rootProject.projectDir}/.node")
240233
}
241234
project.tasks.named('deployApp').configure { dependsOn(project.tasks.npmSetup) }

server/configs/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ mail.smtpUser=@@smtpUser@@
108108
#context.resources.ldap.ConfigFactory.useSsl=false
109109
#context.resources.ldap.ConfigFactory.sslProtocol=SSLv3
110110

111-
#useLocalBuild#spring.devtools.restart.additional-paths=@@pathToServer@@/build/deploy/modules
111+
#useLocalBuild#spring.devtools.restart.additional-paths=@@pathToServer@@/build/deploy
112112
#useLocalBuild#spring.devtools.restart.trigger-file=.restartTrigger
113113

114114
# HTTP session timeout for users - defaults to 30 minutes

0 commit comments

Comments
 (0)