-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild.gradle.kts
85 lines (72 loc) · 2.45 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import org.zaproxy.gradle.addon.AddOnStatus
import org.zaproxy.gradle.addon.internal.model.ProjectInfo
import org.zaproxy.gradle.addon.internal.model.ReleaseState
import org.zaproxy.gradle.addon.internal.tasks.GenerateReleaseStateLastCommit
import org.zaproxy.gradle.addon.misc.ConvertMarkdownToHtml
plugins {
`java-library`
eclipse
id("com.diffplug.spotless")
id("org.zaproxy.common")
id("org.zaproxy.add-on") version "0.11.0"
id("org.zaproxy.crowdin") version "0.4.0"
}
eclipse {
classpath {
// Prevent compilation of zapHomeFiles.
sourceSets = listOf()
}
}
description = (
"FuzzDB web backdoors and attack files which can be used with the ZAP fuzzer or for manual penetration testing - contains files " +
"that may well be flagged by anti-virus tools"
)
java {
val javaVersion = JavaVersion.VERSION_11
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}
zapAddOn {
addOnId.set(project.name.replace("-", ""))
addOnName.set("FuzzDB Offensive")
addOnStatus.set(AddOnStatus.RELEASE)
zapVersion.set("2.15.0")
releaseLink.set("https://github.com/zaproxy/fuzzdb-offensive/compare/v@PREVIOUS_VERSION@...v@CURRENT_VERSION@")
unreleasedLink.set("https://github.com/zaproxy/fuzzdb-offensive/compare/v@CURRENT_VERSION@...HEAD")
manifest {
author.set("ZAP Dev Team")
url.set("https://www.zaproxy.org/docs/desktop/addons/fuzzdb-offensive/")
repo.set("https://github.com/zaproxy/fuzzdb-offensive/")
changesFile.set(tasks.named<ConvertMarkdownToHtml>("generateManifestChanges").flatMap { it.html })
helpSet {
baseName.set("help%LC%.helpset")
localeToken.set("%LC%")
}
}
}
crowdin {
credentials {
token.set(System.getenv("CROWDIN_AUTH_TOKEN"))
}
configuration {
file.set(file("gradle/crowdin.yml"))
tokens.set(mutableMapOf("%addOnId%" to zapAddOn.addOnId.get()))
}
}
spotless {
kotlinGradle {
ktlint()
}
}
val projectInfo = ProjectInfo.from(project)
val generateReleaseStateLastCommit by tasks.registering(GenerateReleaseStateLastCommit::class) {
projects.set(listOf(projectInfo))
}
val releaseAddOn by tasks.registering {
if (ReleaseState.read(projectInfo).isNewRelease()) {
dependsOn("createRelease")
dependsOn("handleRelease")
dependsOn("createPullRequestNextDevIter")
dependsOn("crowdinUploadSourceFiles")
}
}