mirror of
https://github.com/corda/corda.git
synced 2025-01-01 18:56:44 +00:00
Resources now correctly copied into nodes directory.
This commit is contained in:
parent
f56fea551d
commit
2f082d8cbe
@ -34,9 +34,8 @@ class Cordform extends DefaultTask {
|
||||
}
|
||||
|
||||
protected void installRunScript() {
|
||||
project.delete("${directory}/runnodes")
|
||||
project.copy {
|
||||
from "buildSrc/templates/runnodes"
|
||||
from Cordformation.getPluginFile(project, "com/r3corda/plugins/runnodes")
|
||||
filter { String line -> line.replace("JAR_NAME", Node.JAR_NAME) }
|
||||
filter(org.apache.tools.ant.filters.FixCrLfFilter.class, eol: org.apache.tools.ant.filters.FixCrLfFilter.CrLf.newInstance("lf"))
|
||||
into "${directory}/"
|
||||
|
@ -2,9 +2,16 @@ package com.r3corda.plugins
|
||||
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.resources.TextResource
|
||||
|
||||
class Cordformation implements Plugin<Project> {
|
||||
void apply(Project project) {
|
||||
|
||||
}
|
||||
|
||||
static def getPluginFile(Project project, String filePathInJar) {
|
||||
return project.resources.text.fromArchiveEntry(project.buildscript.configurations.classpath.find {
|
||||
it.name.contains('cordformation')
|
||||
}, filePathInJar).asFile()
|
||||
}
|
||||
}
|
||||
|
@ -116,18 +116,17 @@ class Node {
|
||||
|
||||
private void installConfig() {
|
||||
project.copy {
|
||||
from ('./buildSrc/templates/nodetemplate.conf') {
|
||||
filter { it
|
||||
.replaceAll('@@name@@', name)
|
||||
.replaceAll('@@dirName@@', dirName)
|
||||
.replaceAll('@@nearestCity@@', nearestCity)
|
||||
.replaceAll('@@isNotary@@', isNotary.toString())
|
||||
.replaceAll('@@isHttps@@', isHttps.toString())
|
||||
.replaceAll('@@advertisedServices@@', advertisedServices.join(","))
|
||||
.replaceAll('@@networkMapAddress@@', networkMapAddress)
|
||||
.replaceAll('@@artemisPort@@', artemisPort.toString())
|
||||
.replaceAll('@@webPort@@', webPort.toString())
|
||||
}
|
||||
from Cordformation.getPluginFile(project, 'com/r3corda/plugins/nodetemplate.conf')
|
||||
filter { it
|
||||
.replaceAll('@@name@@', name)
|
||||
.replaceAll('@@dirName@@', dirName)
|
||||
.replaceAll('@@nearestCity@@', nearestCity)
|
||||
.replaceAll('@@isNotary@@', isNotary.toString())
|
||||
.replaceAll('@@isHttps@@', isHttps.toString())
|
||||
.replaceAll('@@advertisedServices@@', advertisedServices.join(","))
|
||||
.replaceAll('@@networkMapAddress@@', networkMapAddress)
|
||||
.replaceAll('@@artemisPort@@', artemisPort.toString())
|
||||
.replaceAll('@@webPort@@', webPort.toString())
|
||||
}
|
||||
into nodeDir
|
||||
rename 'nodetemplate.conf', 'node.conf'
|
||||
|
Loading…
Reference in New Issue
Block a user