Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
97002c0
Gradle 9.0.0 version updates
labkey-susanh Aug 4, 2025
6af9080
white space
labkey-susanh Aug 4, 2025
315adc5
Snapshot version number
labkey-susanh Aug 5, 2025
beb8bc1
Configuration cache work for DoThenSetup and DeployApp
labkey-susanh Aug 5, 2025
2757c47
Add group for `verifyLicensePatch` task
labkey-susanh Aug 5, 2025
64a7769
Make `getImporterMap` properly visible during configuration phase
labkey-susanh Aug 8, 2025
6ee86cb
Use JavaExec task type
labkey-susanh Aug 8, 2025
3f12de2
Update release notes
labkey-susanh Aug 8, 2025
717e1ad
Replace usages of project.javaexec
labkey-susanh Aug 11, 2025
cfbd223
Use DeleteTask instead of DefaultTask
labkey-susanh Aug 11, 2025
3a85951
Use DeleteTask instead of DefaultTask
labkey-susanh Aug 11, 2025
8892e02
Set up properties for project-related values
labkey-susanh Aug 11, 2025
9292a33
Use `Delete` task instead of `DefaultTask`
labkey-susanh Aug 11, 2025
8fa23bb
Make `useSsl` an input property for configuration cache compatibility
labkey-susanh Aug 11, 2025
942c795
Remove `listNodeProjects` task
labkey-susanh Aug 11, 2025
54e90eb
Update release notes
labkey-susanh Aug 11, 2025
9af31f2
Remove `listJsp` task
labkey-susanh Aug 11, 2025
8b5b7e1
Remove `cleanOut` task
labkey-susanh Aug 11, 2025
a847854
Remove unused code for artifact publication (seems unlikely that we w…
labkey-susanh Aug 11, 2025
096b44f
Release notes
labkey-susanh Aug 11, 2025
f78dabf
update comment on compatibility
labkey-susanh Aug 11, 2025
59edebc
Remove `cleanAndDeploy` task
labkey-susanh Aug 11, 2025
f7d4bad
Use Delete task instead of Default task for config cache compatibility
labkey-susanh Aug 11, 2025
ab7fc8b
Update `CopyAndInstallRPackage` Task class to use injected FileSystem…
labkey-susanh Aug 11, 2025
67764b4
Use Task ant, not project.ant
labkey-susanh Aug 11, 2025
fec17e4
Use task logger and ant
labkey-susanh Aug 11, 2025
9a93d9c
Release notes
labkey-susanh Aug 11, 2025
34646cf
setProjectPath not setProject
labkey-susanh Aug 11, 2025
7fd3753
Remove some more deprecated tasks. Update DeployApp with proper trigg…
labkey-susanh Aug 12, 2025
3274858
startTomcat -> startLabKey
labkey-susanh Aug 12, 2025
9b02224
Restore startTomcat and stopTomcat; remove `createNlpConfig` task
labkey-susanh Aug 14, 2025
2a97191
Remove explicit `setup` task and fix up tasks that were depending on …
labkey-susanh Aug 14, 2025
b46317f
restore nlp-related tasks temporarily since it's still configured in TC
labkey-susanh Aug 14, 2025
a00aabf
Update distribution tasks for compatibility
labkey-susanh Aug 14, 2025
7df6628
Mark applicationProperties as output not input
labkey-susanh Aug 14, 2025
2f8e241
space
labkey-susanh Aug 15, 2025
147c223
Another interation for DeployApp inputs and outputs
labkey-susanh Aug 15, 2025
2710836
Another iteration for chosenPropsFile input
labkey-susanh Aug 15, 2025
900ce9a
Move methods for updating dbProps to TeamCityDbSetup task
labkey-susanh Aug 15, 2025
6571688
Pass in chosenPropsFile to remove project reference
labkey-susanh Aug 15, 2025
3a6e943
revise comment
labkey-susanh Aug 15, 2025
ed6be56
Add TODO comment
labkey-susanh Aug 15, 2025
631ab8b
Convert project-related properties to inputs
labkey-susanh Aug 15, 2025
d0bd0f6
Add incompatibility notes
labkey-susanh Aug 15, 2025
49012a6
Set driver files and add missing dependencies for startTomcat
labkey-susanh Aug 15, 2025
aa61d1e
Remove incompatibility note
labkey-susanh Aug 15, 2025
c595ff5
Convert `stageRemovePipelineJobs` and add back another stopTomcat dep…
labkey-susanh Aug 15, 2025
1027776
Update `ProeprtiesUtils` to remove code for supporting `labkey.xml`
labkey-susanh Aug 18, 2025
f736a0f
typo
labkey-susanh Aug 19, 2025
6189944
Move restart trigger out of `modules` directory so it doesn't cause t…
labkey-susanh Sep 15, 2025
c6271e1
Allow for no alphaPrefix during configuration
labkey-susanh Sep 15, 2025
ab6b654
Allow for better error messaging for missing distributionFileProp
labkey-susanh Sep 15, 2025
62091c8
Update comment
labkey-susanh Sep 16, 2025
48d4e7e
Fix up bootstrap task so it will always run and will update the appli…
labkey-susanh Sep 16, 2025
393fd74
Remove `createNlpConfig`
labkey-susanh Sep 16, 2025
1da2976
Add some messages about configuration cache compatibility
labkey-susanh Sep 17, 2025
b7b309b
Add TODO for possible Antlr plugin usage
labkey-susanh Sep 22, 2025
a121011
Remove description property in favor of the default project description
labkey-susanh Sep 22, 2025
22491a3
Move static methods back to TeamCityExtension
labkey-susanh Sep 22, 2025
761bda0
Release date and version
labkey-susanh Sep 22, 2025
3049b6e
Prepare for merge to develop
labkey-susanh Sep 22, 2025
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
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,29 @@ on how to do that, including how to develop and test locally and the versioning

## Release Notes

### TBD
*Released*: TBD
(Earliest compatible LabKeyversion: 25.2)
### 7.0.0
*Released*: 22 September 2025
(Earliest compatible LabKey version: 25.10)
- Update `PurgeArtifacts` task to be compatible with configuration cache and to work with input files so archived projects can be kept up to date
- Update dependency versions
- 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`

### 6.3.0
*Released*: 3 July 2025
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ repositories {
dependencies {
implementation gradleApi()
implementation localGroovy()
implementation "org.apache.groovy:groovy-sql:${groovySqlVersion}"
api "org.apache.commons:commons-lang3:${commonsLang3Version}"
api "org.apache.commons:commons-text:${commonsTextVersion}"
api "commons-io:commons-io:${commonsIoVersion}"
Expand All @@ -42,7 +43,7 @@ dependencies {
}

group = 'org.labkey.build'
project.version = "6.4.0-SNAPSHOT"
project.version = "7.1.0-SNAPSHOT"

gradlePlugin {
plugins {
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
artifactory_contextUrl=https://labkey.jfrog.io/artifactory

artifactoryPluginVersion=5.2.5
artifactoryPluginVersion=6.0.0

commonsIoVersion=2.20.0
commonsLang3Version=3.18.0
Expand All @@ -9,6 +9,8 @@ commonsTextVersion=1.14.0
grgitGradleVersion=5.3.2
graphqlJavaVersion=24.2

groovySqlVersion=4.0.27

httpclientVersion=5.5
httpcoreVersion=5.3.4

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
1 change: 1 addition & 0 deletions src/main/groovy/org/labkey/gradle/plugin/Antlr.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import org.labkey.gradle.util.GroupNames

/**
* Used to compile antlr grammars into Java classes using the antlr executable.
* TODO: This could be converted to using the Antlr plugin https://docs.gradle.org/9.1.0/userguide/antlr_plugin.html
*/
class Antlr implements Plugin<Project>
{
Expand Down
6 changes: 4 additions & 2 deletions src/main/groovy/org/labkey/gradle/plugin/ApplyLicenses.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ class ApplyLicenses implements Plugin<Project>
}

project.tasks.register('verifyLicensePatch') {
dependsOn(patchApiTask)
doLast {
it.group = GroupNames.TEST
it.dependsOn(patchApiTask)
it.doLast {
[project.configurations.extJs3Commercial, project.configurations.extJs4Commercial].forEach {
def commercialLicense = project.zipTree(it.singleFile).matching {
include '*/license.txt'
Expand All @@ -110,6 +111,7 @@ class ApplyLicenses implements Plugin<Project>
}
}
}
it.notCompatibleWithConfigurationCache("Needs to inject ArtifactOperations for zipTree usage")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class ClientLibraries
task.dependsOn(project.tasks.processResources)
task.dependsOn(project.project(minProjectPath).tasks.named("npmInstall"))
task.xmlFiles = getLibXmlFiles(project)
task.notCompatibleWithConfigurationCache("Class ClientLibsCompress needs more input and output properties declared")
}

project.evaluationDependsOn(minProjectPath)
Expand Down
5 changes: 5 additions & 0 deletions src/main/groovy/org/labkey/gradle/plugin/Database.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class Database implements Plugin<Project>
task.group = GroupNames.DATABASE
task.description = "Switch to SQL Server configuration"
task.dbType = "mssql"
task.driverFiles.setFrom(project.configurations.driver)
}
}

Expand All @@ -62,6 +63,7 @@ class Database implements Plugin<Project>
task.group = GroupNames.DATABASE
task.description = "Switch to SQL Server configuration using jTDS driver"
task.dbType = "jtds"
task.driverFiles.setFrom(project.configurations.driver)
}
}

Expand All @@ -71,6 +73,9 @@ class Database implements Plugin<Project>
Bootstrap task ->
task.group = GroupNames.DATABASE
task.description = "Switch to bootstrap database properties as defined in current db.config file"
task.driverFiles.setFrom(project.configurations.driver)
task.dbPropertiesChanged = true
task.outputs.upToDateWhen({ return false })
}
}
}
Expand Down
76 changes: 0 additions & 76 deletions src/main/groovy/org/labkey/gradle/plugin/Distribution.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,11 @@ import org.gradle.api.artifacts.ModuleDependency
import org.gradle.api.artifacts.ProjectDependency
import org.gradle.api.file.DeleteSpec
import org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.api.tasks.Delete
import org.labkey.gradle.plugin.extension.DistributionExtension
import org.labkey.gradle.plugin.extension.LabKeyExtension
import org.labkey.gradle.plugin.extension.TeamCityExtension
import org.labkey.gradle.task.ModuleDistribution
import org.labkey.gradle.util.BuildUtils
import org.labkey.gradle.util.GroupNames
import org.labkey.gradle.util.PomFileHelper
import org.labkey.gradle.util.TaskUtils

class Distribution implements Plugin<Project>
Expand Down Expand Up @@ -62,10 +58,6 @@ class Distribution implements Plugin<Project>
addDependencies(project)
addTasks(project)
addTaskDependencies(project)

// commented out until we start publishing distribution artifacts, and then we'll examine the publications more closely
// if (BuildUtils.shouldPublishDistribution(project))
// addArtifacts(project)
}

private void addConfigurations(Project project)
Expand Down Expand Up @@ -169,74 +161,6 @@ class Distribution implements Plugin<Project>
project.dependencies.add("distribution", dep)
}
}

private void addArtifacts(Project project)
{
project.apply plugin: 'maven-publish'

// TODO this is really only an approximation of what's needed. We don't currently publish distribution artifacts
// to artifactory
project.afterEvaluate {
String artifactId = getArtifactId(project)
Properties pomProperties = LabKeyExtension.getApiPomProperties(artifactId, project.dist.description, project)
project.publishing {
publications {
distributions(MavenPublication) { pub ->
pub.artifactId(artifactId)
project.tasks.each {
if (it instanceof ModuleDistribution)
{
it.outputs.files.each {File file ->
pub.artifact(file)
{
String fileName = file.getName()
if (fileName.endsWith("gz"))
extension "tar.gz"
if (fileName.contains("-src."))
classifier "src"
}
}
}
}
pom {
name = project.name
description = pomProperties.getProperty("Description")
url = PomFileHelper.LABKEY_ORG_URL
developers PomFileHelper.getLabKeyTeamDevelopers()
// TODO this should probably not always be Apache license
// licenses pomUtil.getLicense()
organization PomFileHelper.getLabKeyOrganization()
// scm PomFileHelper.getLabKeyScm()
// doesn't seem like these pom files will have any dependencies
}
}
}

project.artifactoryPublish {
project.tasks.each {
if (it instanceof ModuleDistribution)
{
dependsOn it
}
}
publications('distributions')
}
}
}
}

static String getArtifactId(Project project)
{
if (project.dist.artifactId != null)
return project.dist.artifactId
else
{
return TaskUtils.getOptionalTask(project, "distribution")
.filter(task -> task.get() instanceof ModuleDistribution)
.map(task -> ((ModuleDistribution)task.get()).getArtifactId())
.orElse(project.name)
}
}
}


18 changes: 4 additions & 14 deletions src/main/groovy/org/labkey/gradle/plugin/FileModule.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -137,19 +137,6 @@ class FileModule implements Plugin<Project>
task.outputs.cacheIf { false } // disable build caching. Has too many undeclared inputs.
}

// This is added because Intellij started creating this "out" directory when you build through IntelliJ.
// It copies files there that are actually input files to the build, which causes some problems when later
// builds attempt to find their input files.
project.tasks.register("cleanOut", Delete) {
Delete task ->
task.group = GroupNames.BUILD
task.description = "removes the ${project.file('out')} directory created by Intellij builds"
task.configure({ Delete delete ->
if (project.file("out").isDirectory())
project.delete project.file("out")
})
}

var moduleTask = project.tasks.register("module", Jar) {
Jar jar ->
jar.group = GroupNames.MODULE
Expand Down Expand Up @@ -207,8 +194,11 @@ class FileModule implements Plugin<Project>
}
BuildUtils.updateRestartTriggerFile(project)
}
task.notCompatibleWithConfigurationCache("Needs its own class to do the two copies (one to staging and one to deploy or possibly two Copy tasks chained together.")
}



project.tasks.register('undeployModule', Delete) {
Delete task ->
task.group = GroupNames.MODULE
Expand All @@ -230,9 +220,9 @@ class FileModule implements Plugin<Project>
task.doLast {
BuildUtils.updateRestartTriggerFile(project)
}
task.notCompatibleWithConfigurationCache("Does multiple deletes using project.delete. Should have its own class.")
}


project.tasks.register("reallyClean") {
Task task ->
task.group = GroupNames.BUILD
Expand Down
4 changes: 0 additions & 4 deletions src/main/groovy/org/labkey/gradle/plugin/JavaModule.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,6 @@ class JavaModule implements Plugin<Project>
})
}

project.tasks.named('populateExplodedLib') {
notCompatibleWithConfigurationCache("Need to figure out how to make the inputs from the optional tasks work.")
}

project.tasks.named('module').configure {dependsOn(populateLib)}
// We do this afterEvaluate to allow all dependencies to be declared before checking
project.afterEvaluate({
Expand Down
Loading