Skip to content

Conversation

@labkey-susanh
Copy link
Contributor

@labkey-susanh labkey-susanh commented Sep 17, 2025

Rationale

Gradle 9.0.0 has been released (and 9.1.0 is coming soon). This release has removed some deprecated features and moves even closer to making the use of the configuration cache the default behavior, so getting out build closer to compatibility will help make the transition easier whenever that happens (Probably Gradle 10, but I'm unsure on the timing of that).

Related Pull Requests

Changes

  • Update DoThenSetup and its relatives to be compatible with configuration cache
  • Update DeployApp for better configuration cache compatibility
  • Replace usages of project.javaexc with JavaExc task types or injected ExecOperations
  • Update CompressClientLibs, StopLabKey to work better with configuration cache
  • Remove listNodeModules task defined by NpmRun plugin
  • Remove cleanOut task defined by FileModule plugin
  • Remove cleanAndDeploy task from ServerDeploy plugin
  • Update CopyAndInstallRPackage Task class to use injected FileSystem instead of project.copy
  • Update GzipAction task to use task logger and ant builder objects
  • Update StopLabKey and StartLabKey with appropriate dependencies to mirror the deprecated StopTomcat and StartTomcat
  • Remove deprecated getServerDeployDirectory from ServerDeployExtension
  • Remove createNlpConfig task from TeamCity plugin since that module is no longer in use
  • Remove setup task from ServerDeploy plugin.
  • Update DeployDistribution and StageDistribution for configuration cache compatibility
  • Some updates for ModuleDistribution for better configuration cache compatibility
  • Update PropertiesUtils to remove code for supporting labkey.xml
  • Relocate the .restartTriggerFile to prevent creation of empty build/deploy/modules directory for embedded distribution deployment
  • Fix bootstrap task so it will update application.properties

…er file configuration. Update StopLabKey properties and conditions
Comment on lines 198 to 199
if (BuildUtils.embeddedProjectExists(project)) {
def embeddedProject = project.project(BuildUtils.getEmbeddedProjectPath())
Copy link
Member

Choose a reason for hiding this comment

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

Is BuildUtils.embeddedProjectExists even relevant anymore? (probably out of scope but something to clean up later)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is still technically possible that you won't have the embedded project included in your settings.gradle file. I'm not sure why you would, but it's possible.

static String getLabKeyServerPort(Project project)
{
return getTeamCityProperty(project, 'tomcat.port', null)
}
Copy link
Member

Choose a reason for hiding this comment

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

Putting these static TeamCity property getters in the task class seems odd. It also causes some method name overlap; there is a static getLabKeyServerPort that gets the property but there is also the implicit non-static getLabKeyServerPort for the task input.
If TeamCityExtension isn't the right place for these, maybe they could live in a new TeamCityUtils (similar to BuildUtils).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The placement of these methods doesn't seem odd to me, but good point about the name overlap. I don't remember the evolution of this change, but I am generally moving away from heavy usage of Extension classes where possible because we don't seem to be using them in the way they are intended in a lot of places. No real harm for static classes, though, so I've moved these methods back (for now, at least).

@labkey-susanh labkey-susanh merged commit deb0da1 into develop Sep 22, 2025
3 checks passed
@labkey-susanh labkey-susanh deleted the fb_gradle_9.0.0 branch September 22, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants