-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
101 lines (87 loc) · 3.04 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
93
94
95
96
97
98
99
100
101
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
group = "no.nav.helsearbeidsgiver"
version = "3.3.4"
plugins {
kotlin("jvm")
kotlin("plugin.serialization")
id("com.expediagroup.graphql")
id("maven-publish")
id("org.jmailen.kotlinter")
}
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_21)
}
}
tasks {
test {
useJUnitPlatform()
}
lintKotlinMain {
exclude("no/nav/helsearbeidsgiver/arbeidsgivernotifkasjon/graphql/generated/**/*.kt")
}
formatKotlinMain {
exclude("no/nav/helsearbeidsgiver/arbeidsgivernotifkasjon/graphql/generated/**/*.kt")
}
}
java {
withSourcesJar()
}
graphql {
client {
packageName = "no.nav.helsearbeidsgiver.arbeidsgivernotifkasjon.graphql.generated"
// uncomment if you need schema to be local
// schemaFile = File("src/main/resources/arbeidsgivernotifikasjon/Schema.graphql")
endpoint = "https://notifikasjon-fake-produsent-api.ekstern.dev.nav.no"
queryFiles = file("src/main/resources/arbeidsgivernotifikasjon").listFiles()?.toList().orEmpty()
serializer = com.expediagroup.graphql.plugin.gradle.config.GraphQLSerializer.KOTLINX
}
}
repositories {
mavenCentral()
mavenNav("*")
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
repositories {
mavenNav("helsearbeidsgiver-${rootProject.name}")
}
}
dependencies {
val coroutinesVersion: String by project
val graphQLKotlinVersion: String by project
val kotestVersion: String by project
val ktorVersion: String by project
val logbackVersion: String by project
val mockkVersion: String by project
val slf4jVersion: String by project
val utilsVersion: String by project
implementation("com.expediagroup:graphql-kotlin-ktor-client:$graphQLKotlinVersion")
implementation("io.ktor:ktor-client-apache5:$ktorVersion")
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("no.nav.helsearbeidsgiver:utils:$utilsVersion")
implementation("org.slf4j:slf4j-api:$slf4jVersion")
testImplementation(kotlin("test"))
testImplementation(testFixtures("no.nav.helsearbeidsgiver:utils:$utilsVersion"))
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
testImplementation("io.kotest:kotest-framework-datatest:$kotestVersion")
testImplementation("io.kotest:kotest-runner-junit5:$kotestVersion")
testImplementation("io.ktor:ktor-client-mock:$ktorVersion")
testImplementation("io.mockk:mockk:$mockkVersion")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
testRuntimeOnly("ch.qos.logback:logback-classic:$logbackVersion")
}
fun RepositoryHandler.mavenNav(repo: String): MavenArtifactRepository {
val githubPassword: String by project
return maven {
setUrl("https://maven.pkg.github.com/navikt/$repo")
credentials {
username = "x-access-token"
password = githubPassword
}
}
}