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

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 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
	}
}

Back to the top