forked from leanix/vsm-sbom-booster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
71 lines (61 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
import com.expediagroup.graphql.plugin.gradle.tasks.GraphQLGenerateClientTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version "3.0.2"
id("io.spring.dependency-management") version "1.1.0"
id("com.expediagroup.graphql") version "6.2.2"
id("io.gitlab.arturbosch.detekt") version "1.21.0"
kotlin("jvm") version "1.7.22"
kotlin("plugin.spring") version "1.7.22"
}
group = "net.leanix"
version = "v1.0.0"
java.sourceCompatibility = JavaVersion.VERSION_17
repositories {
mavenCentral()
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.reactivestreams:reactive-streams:1.0.4")
implementation("com.expediagroup:graphql-kotlin-spring-client:6.2.2")
implementation("org.cyclonedx:cyclonedx-core-java:7.2.0")
testImplementation("org.springframework.boot:spring-boot-starter-test")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "17"
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
val graphqlGenerateGitlabClient by tasks.creating(GraphQLGenerateClientTask::class) {
packageName.set("net.leanix.vsm.sbomBooster.graphql.generated.gitlab")
schemaFile.set(file("${project.projectDir}/src/main/resources/schemas/gitlab_schema.graphql"))
queryFiles.from(
"${project.projectDir}/src/main/resources/queries/Gitlab/GetUsername.graphql",
"${project.projectDir}/src/main/resources/queries/Gitlab/GetRepositoriesPaginated.graphql"
)
}
val graphqlGenerateGithubClient by tasks.creating(GraphQLGenerateClientTask::class) {
packageName.set("net.leanix.vsm.sbomBooster.graphql.generated.github")
schemaFile.set(file("${project.projectDir}/src/main/resources/schemas/github_schema.graphql"))
queryFiles.from(
"${project.projectDir}/src/main/resources/queries/Github/GetUsername.graphql",
"${project.projectDir}/src/main/resources/queries/Github/GetRepositoriesPaginated.graphql"
)
}
detekt {
autoCorrect = true
parallel = true
buildUponDefaultConfig = true
dependencies {
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.21.0")
}
}