Skip to content

Commit

Permalink
#287 Fixing mlRoxyMigrateProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
rjrudin committed Dec 28, 2017
1 parent 1f9617b commit 971934f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=com.marklogic
version=3.2.1
version=3.2.2
mlAppDeployerDependency=com.marklogic:ml-app-deployer:3.2.0
mlcpUtilDependency=com.marklogic:mlcp-util:0.3.0

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import org.gradle.api.tasks.TaskAction

class RoxyMigratePropertiesTask extends RoxyTask {

Set<String> allRoxyProperties = new LinkedHashSet<>()
def roxyPropertyFiles = ["default.properties", "build.properties"]
def roxyGradleMapping = [
"app-name" : "mlAppName",
Expand Down Expand Up @@ -91,19 +90,8 @@ class RoxyMigratePropertiesTask extends RoxyTask {
if (file.exists()) {
new File("backup-" + filename).write(file.text)
}
file.withWriter { writer ->
roxyGradleMapping.each { k, v ->
def val = roxyProperties.get(k)
if (val) writer.append(v).append("=").append(val).append("\n")
}
allRoxyProperties.removeAll(roxyGradleMapping.keySet())
allRoxyProperties.each{ prop ->
writer.append(prop).append("=").append("unmapped").append("\n")
}
}
println "Writing: " + filename
file.write(text)
}

String getRoxyHome(){
project.hasProperty("mlRoxyHome") ? project.property("mlRoxyHome") : ""
}
}

0 comments on commit 971934f

Please sign in to comment.