Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 0c38bedbc395fef2b2e9a583f62266ed129f26cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

def etUnitConverter = ':plugins:org.eclipse.etrice.etunit.converter'
evaluationDependsOn(etUnitConverter)

/**
 * Creates a tasks that converts etu files to xml files
 * @param name: The name of the new task
 * @param etuFiles: A list of etu files
 * @param options: The options passed to the converter
 */
ext.createEtUnitConverterTask = { name, etuFiles, options = [] ->
	def xmlFiles = etuFiles.collect { it.replace('.etu', '.xml') }

	return tasks.create(name: name, type: JavaExec, dependsOn: "$etUnitConverter:classes") {
		main = project(etUnitConverter).mainClassName
		classpath = project(etUnitConverter).sourceSets.main.runtimeClasspath
		args options
		args etuFiles
		inputs.files etuFiles
		outputs.files xmlFiles
		inputs.files.each { println it }
		outputs.files.each { println it }
	}
}

Back to the top