-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
110 lines (99 loc) · 2.82 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jreleaser.model.Active
import org.jreleaser.model.Http
plugins {
kotlin("jvm").version("2.0.20")
`java-library`
`maven-publish`
id("org.jreleaser") version "1.13.1"
}
group = "io.github.froks"
version = "0.3.1"
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("com.willowtreeapps.assertk:assertk:0.28.1")
}
kotlin {
jvmToolchain(21)
explicitApi()
compilerOptions {
jvmTarget = JvmTarget.JVM_1_8
}
}
java {
withSourcesJar()
withJavadocJar()
}
tasks.withType<JavaCompile>().configureEach {
targetCompatibility = "1.8"
sourceCompatibility = "1.8"
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn")
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
name.set("dlt-core")
description.set("Kotlin based parser library for autosar dlt files")
url.set("https://github.com/froks/dlt-core")
developers {
developer {
id.set("froks")
name.set("Florian Roks")
email.set("[email protected]")
}
}
scm {
url.set("https://github.com/froks/dlt-core")
developerConnection.set("scm:git:ssh://github.com:froks/dlt-core.git")
connection.set("scm:git:git://github.com/froks/dlt-core.git")
}
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
}
}
}
repositories {
maven {
setUrl(layout.buildDirectory.dir("staging-deploy"))
}
}
}
jreleaser {
release {
github {
skipRelease = true
skipTag = true
}
}
signing {
active = Active.ALWAYS
armored = true
verify = false
}
deploy {
maven {
mavenCentral.create("sonatype") {
active = Active.ALWAYS
username = System.getenv("JRELEASER_MAVENCENTRAL_USERNAME")
url = "https://central.sonatype.com/api/v1/publisher"
authorization = Http.Authorization.BEARER
stagingRepository(layout.buildDirectory.dir("staging-deploy").get().toString())
}
}
}
}