aboutsummaryrefslogtreecommitdiffstats
path: root/buildSrc/src/main/groovy/tools.refinery.xtend-conventions.gradle
blob: 98fc131c2610996b98579704564a5d3892964ee8 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
plugins {
	id 'org.sonarqube'
	id 'org.xtext.xtend'
	id 'tools.refinery.java-conventions'
}

sourceSets {
	main {
		xtendOutputDir = 'src/main/xtend-gen'
	}
	test {
		xtendOutputDir = 'src/test/xtend-gen'
	}
}

xtend.generator {
	// As of Xtext 2.26.0.M2, the Xbase compiler doesn't know how to handle Java 12 and up
	// and the build fails with a NullPointerException if such Java version is specified.
	javaSourceLevel = '11'
}

tasks.named('clean') {
	delete 'src/main/xtend-gen'
	delete 'src/test/xtend-gen'
}

sonarqube.properties {
	properties['sonar.exclusions'] += [
		'src/main/xtend-gen/**',
		'src/test/xtend-gen/**',
	]
}

tasks.named('generateEclipseSourceFolders') {
	dependsOn tasks.named('generateXtext')
	dependsOn tasks.named('generateTestXtext')
}