-
Notifications
You must be signed in to change notification settings - Fork 24
/
build.gradle.kts
66 lines (51 loc) · 1.71 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
import org.zaproxy.gradle.addon.AddOnStatus
import org.zaproxy.gradle.addon.misc.ConvertMarkdownToHtml
plugins {
`java-library`
id("org.zaproxy.add-on") version "0.8.0"
id("com.diffplug.spotless") version "5.12.1"
}
repositories {
mavenCentral()
}
description = "A packaged version of the scripts in https://github.com/sepehrdaddev/zap-scripts"
val scriptsDir = layout.buildDirectory.dir("scripts")
zapAddOn {
addOnId.set("sepehrdadscripts")
addOnName.set("Sepehrdad Scripts")
zapVersion.set("2.11.0")
addOnStatus.set(AddOnStatus.ALPHA)
releaseLink.set("https://github.com/sepehrdaddev/zap-scripts/compare/v@[email protected]@CURRENT_VERSION@")
unreleasedLink.set("https://github.com/sepehrdaddev/zap-scripts/compare/v@[email protected]")
manifest {
author.set("Sepehrdad")
url.set("https://www.zaproxy.org/docs/desktop/addons/sepehrdad-scripts/")
repo.set("https://github.com/sepehrdaddev/zap-scripts/")
changesFile.set(tasks.named<ConvertMarkdownToHtml>("generateManifestChanges").flatMap { it.html })
files.from(scriptsDir)
}
}
var scriptTypes = listOf(
"active", "passive")
val syncScriptsDirTask by tasks.creating(Sync::class) {
into(scriptsDir.get().dir(project.name))
scriptTypes.forEach {
from(it) {
into(it)
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
sourceSets["main"].output.dir(mapOf("builtBy" to syncScriptsDirTask), scriptsDir)
spotless {
java {
licenseHeaderFile("$rootDir/gradle/spotless/license.java")
googleJavaFormat("1.7").aosp()
}
kotlinGradle {
ktlint()
}
}