-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
64 lines (55 loc) · 1.51 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "2.1.0"
`maven-publish`
`java-library`
}
allprojects {
repositories {
mavenCentral()
}
}
subprojects {
group = "com.github.navikt.aap-libs"
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "maven-publish")
apply(plugin = "java-library")
tasks {
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "21"
}
withType<Jar> {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
withType<Test> {
useJUnitPlatform()
}
}
java {
withSourcesJar()
withJavadocJar()
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
artifactId = project.name
version = project.findProperty("version")?.toString() ?: "0.0.0"
from(components["java"])
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/navikt/aap-libs")
credentials {
username = "x-access-token"
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
kotlin.sourceSets["main"].kotlin.srcDirs("main")
kotlin.sourceSets["test"].kotlin.srcDirs("test")
sourceSets["main"].resources.srcDirs("main")
sourceSets["test"].resources.srcDirs("test")
}