-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle.kts
92 lines (77 loc) · 2.42 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
86
87
88
89
90
91
92
import net.ltgt.gradle.errorprone.errorprone
plugins {
`kotlin-dsl`
id("com.gradle.plugin-publish") version "1.2.1"
id("com.diffplug.spotless")
id("org.zaproxy.common")
id("net.ltgt.errorprone") version "4.0.0"
}
repositories {
maven {
url = uri("https://jitpack.io")
content {
includeGroup("com.github.crowdin")
}
}
mavenCentral()
}
group = "org.zaproxy.gradle"
version = "0.6.0-SNAPSHOT"
val crowdin by configurations.creating
configurations["compileOnly"].extendsFrom(crowdin)
configurations["testImplementation"].extendsFrom(crowdin)
dependencies {
crowdin("com.github.crowdin:crowdin-api-client-java:1.8.0") {
exclude(group = "org.projectlombok")
exclude(group = "org.apache.httpcomponents")
exclude(group = "com.fasterxml.jackson.core")
}
val jacksonVersion = "2.15.2"
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jacksonVersion")
implementation("org.apache.commons:commons-lang3:3.4")
implementation("org.apache.httpcomponents:httpclient:4.5.13")
implementation("org.projectlombok:lombok:1.18.24")
testImplementation("org.assertj:assertj-core:3.26.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
"errorprone"("com.google.errorprone:error_prone_core:2.28.0")
}
java {
val javaVersion = JavaVersion.VERSION_11
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}
tasks.withType<JavaCompile>().configureEach {
options.errorprone {
error(
"MissingOverride",
"WildcardImport",
)
}
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
}
spotless {
kotlinGradle {
ktlint()
}
}
gradlePlugin {
website.set("https://github.com/zaproxy/gradle-plugin-crowdin")
vcsUrl.set("https://github.com/zaproxy/gradle-plugin-crowdin.git")
plugins {
create("crowdin") {
id = "org.zaproxy.crowdin"
implementationClass = "org.zaproxy.gradle.crowdin.CrowdinPlugin"
displayName = "Plugin to integrate with Crowdin"
description = "A Gradle plugin to integrate with Crowdin."
tags.set(listOf("crowdin"))
}
}
}
tasks.named("jar", Jar::class).configure {
from({
crowdin.filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
}