-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
155 lines (132 loc) · 5.39 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
`maven-publish`
id("org.springframework.boot") version "3.3.5"
id("io.spring.dependency-management") version "1.1.6"
kotlin("jvm") version "2.0.21"
kotlin("plugin.spring") version "2.0.21"
}
java {
sourceCompatibility = JavaVersion.VERSION_21
}
val kotlinVersion by extra("1.8.21")
val kotlinXVersion by extra("1.6.4")
val logstashLogbackEncoderVersion by extra("7.4")
val tokenSupportVersion by extra("4.1.4")
val springCloudVersion by extra("4.1.2")
val retryVersion by extra("2.0.0")
val awailitilityKotlinVersion by extra("4.2.0")
val assertkJvmVersion by extra("0.25")
val springMockkVersion by extra("3.1.1")
val mockkVersion by extra("1.13.2")
val guavaVersion by extra("33.2.1-jre")
val orgJsonVersion by extra("20231013")
val graphQLKotlinVersion by extra("7.0.2")
val jacksonKotlinModuleVersion by extra("2.15.0")
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
repositories {
maven {
name = "sif-tilgangskontroll"
url = uri("https://maven.pkg.github.com/navikt/sif-tilgangskontroll")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
}
allprojects {
group = "no.nav.sif.tilgangskontroll"
repositories {
mavenCentral()
}
afterEvaluate {
dependencies {
// Logging
implementation("net.logstash.logback:logstash-logback-encoder:$logstashLogbackEncoderVersion")
// Kotlin
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:$kotlinXVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinXVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:$kotlinXVersion")
// Jackson
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonKotlinModuleVersion")
implementation("org.json:json:$orgJsonVersion")
}
}
}
kotlin {
compilerOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
}
}
subprojects {
apply(plugin = "maven-publish")
configure<PublishingExtension> {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/navikt/sif-tilgangskontroll")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
}
afterEvaluate {
publications {
register<MavenPublication>("gpr") {
from(components["java"])
}
}
}
}
}
dependencies {
implementation(project(":spesification"))
implementation(project(":core"))
/*implementation("no.nav.sif.tilgangskontroll:spesification:1-25a6045")
implementation("no.nav.sif.tilgangskontroll:core:1-25a6045")*/
// NAV
implementation("no.nav.security:token-validation-spring:$tokenSupportVersion")
implementation("no.nav.security:token-client-spring:$tokenSupportVersion")
testImplementation("no.nav.security:token-validation-spring-test:$tokenSupportVersion")
// Spring Boot
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.retry:spring-retry:$retryVersion")
implementation("org.springframework:spring-aspects")
runtimeOnly("org.springframework.boot:spring-boot-properties-migrator")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude(group = "junit")
exclude(module = "mockito-core")
}
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-engine")
// Spring Cloud
// https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-contract-stub-runner
testImplementation("org.springframework.cloud:spring-cloud-starter-contract-stub-runner:$springCloudVersion")
// Metrics
implementation("io.micrometer:micrometer-registry-prometheus")
//graphql
implementation("com.expediagroup:graphql-kotlin-spring-client:$graphQLKotlinVersion")
// Diverse
implementation("com.github.ben-manes.caffeine:caffeine")
implementation("com.google.guava:guava:$guavaVersion")
testImplementation("org.awaitility:awaitility-kotlin:$awailitilityKotlinVersion")
testImplementation("com.willowtreeapps.assertk:assertk-jvm:$assertkJvmVersion")
testImplementation("com.ninja-squad:springmockk:$springMockkVersion")
testImplementation("io.mockk:mockk:$mockkVersion")
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.getByName<Jar>("jar") {
enabled = false
}