-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle.kts
66 lines (61 loc) · 1.75 KB
/
build.gradle.kts
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* Fireplace
*
* Copyright (c) 2021, Today - Brice Dutheil
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
plugins {
id("com.github.hierynomus.license") version "0.16.1"
}
allprojects {
group = "io.github.bric3.fireplace"
}
tasks.register("v") {
doLast {
println(project.version.toString())
}
}
license {
ext["year"] = "2021, Today"
ext["name"] = "Brice Dutheil"
header = file("HEADER")
strictCheck = true
ignoreFailures = false
excludes(
listOf(
"**/*.java.template",
"**/testData/*.java",
)
)
mapping(
mapOf(
"java" to "SLASHSTAR_STYLE",
"kt" to "SLASHSTAR_STYLE",
"kts" to "SLASHSTAR_STYLE",
"yaml" to "SCRIPT_STYLE",
"yml" to "SCRIPT_STYLE",
"svg" to "XML_STYLE",
"md" to "XML_STYLE",
"toml" to "SCRIPT_STYLE"
)
)
}
tasks.register("licenseCheckForProjectFiles", com.hierynomus.gradle.license.tasks.LicenseCheck::class) {
source = fileTree(project.projectDir) {
include("**/*.kt", "**/*.kts")
include("**/*.toml")
exclude("**/buildSrc/build/generated-sources/**")
}
}
tasks["license"].dependsOn("licenseCheckForProjectFiles")
tasks.register("licenseFormatForProjectFiles", com.hierynomus.gradle.license.tasks.LicenseFormat::class) {
source = fileTree(project.projectDir) {
include("**/*.kt", "**/*.kts")
include("**/*.toml")
exclude("**/buildSrc/build/generated-sources/**")
}
}
tasks["licenseFormat"].dependsOn("licenseFormatForProjectFiles")