-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
75 lines (65 loc) · 2.14 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
plugins {
id("java-library")
alias(libs.plugins.nexus.publish)
}
apply(plugin = "signing")
apply(plugin = "maven-publish")
group = "dev.httpmarco"
version = "1.2.0.1-SNAPSHOT"
dependencies {
testImplementation(libs.jUnit)
testRuntimeOnly(libs.jUnit)
compileOnly(libs.lombok)
annotationProcessor(libs.lombok)
testCompileOnly(libs.lombok)
testAnnotationProcessor(libs.lombok)
}
tasks.getByName<Test>("test") {
useJUnitPlatform()
}
tasks.withType<JavaCompile> {
sourceCompatibility = JavaVersion.VERSION_17.toString()
targetCompatibility = JavaVersion.VERSION_17.toString()
// options
options.encoding = "UTF-8"
options.isIncremental = true
}
extensions.configure<PublishingExtension> {
publications {
create("library", MavenPublication::class.java) {
from(project.components.getByName("java"))
pom {
name.set(project.name)
url.set("https://github.com/httpmarco/osgon")
description.set("Reflection/Data libary")
licenses {
license {
name.set("MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
name.set("Mirco Lindenau")
email.set("mirco.lindenau@gmx.de")
}
}
scm {
url.set("https://github.com/httpmarco/osgon")
connection.set("https://github.com/httpmarco/osgon.git")
}
}
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username.set(System.getenv("ossrhUsername")?.toString() ?: "")
password.set(System.getenv("ossrhPassword")?.toString() ?: "")
}
}
useStaging.set(!project.rootProject.version.toString().endsWith("-SNAPSHOT"))
}