-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
80 lines (68 loc) · 2.45 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
plugins {
id("java-library")
id("maven-publish")
alias(libs.plugins.nexusPublish)
}
allprojects {
apply(plugin = "java-library")
apply(plugin = "maven-publish")
group = "dev.httpmarco"
version = "1.2.20-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
implementation(rootProject.libs.lombok)
annotationProcessor(rootProject.libs.lombok)
implementation(rootProject.libs.annotations)
annotationProcessor(rootProject.libs.annotations)
testAnnotationProcessor(rootProject.libs.lombok)
testImplementation(rootProject.libs.lombok)
}
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"))
}