Skip to content

Commit 51d1b6b

Browse files
committed
#536 mlExportResources uses last ConfigDir
This is to account for DHF, where config paths defaults to two paths, and the second one - src/main/ml-config - should be the default
1 parent 0b5611e commit 51d1b6b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/groovy/com/marklogic/gradle/task/export/ExportResourcesTask.groovy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.marklogic.gradle.task.export
22

3+
import com.marklogic.appdeployer.ConfigDir
34
import com.marklogic.appdeployer.export.ExportedResources
45
import com.marklogic.appdeployer.export.Exporter
56
import com.marklogic.gradle.task.MarkLogicTask
@@ -50,7 +51,9 @@ class ExportResourcesTask extends MarkLogicTask {
5051
}
5152

5253
void export(ResourceSelector selector) {
53-
def path = getAppConfig().getFirstConfigDir().getBaseDir()
54+
List<ConfigDir> configDirs = getAppConfig().getConfigDirs()
55+
ConfigDir lastConfigDir = configDirs.get(configDirs.size() - 1)
56+
def path = lastConfigDir.getBaseDir()
5457
if (getProject().hasProperty("exportPath")) {
5558
/**
5659
* Note that if a user provides a path and they're using Java 11 and the Gradle daemon, then the path

0 commit comments

Comments
 (0)