aboutsummaryrefslogtreecommitdiffstats
path: root/buildSrc/src/main/kotlin/refinery-xtext-conventions.gradle.kts
blob: 34fbae994458ff10a42d81f80c096bcf535dc874 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import org.gradle.api.tasks.SourceSetContainer
import org.sonarqube.gradle.SonarExtension
import tools.refinery.buildsrc.SonarPropertiesUtils

apply(plugin = "refinery-java-conventions")
apply(plugin = "refinery-sonarqube")

val xtextGenPath = "src/main/xtext-gen"

the<SourceSetContainer>().named("main") {
	java.srcDir(xtextGenPath)
	resources.srcDir(xtextGenPath)
}

tasks.named<Delete>("clean") {
	delete(xtextGenPath)
}

the<SonarExtension>().properties {
	SonarPropertiesUtils.addToList(properties, "sonar.exclusions", "$xtextGenPath/**")
}