Skip to content

Commit f7f68ad

Browse files
committed
Configure publishing
1 parent 40f0724 commit f7f68ad

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

build.gradle.kts

+12
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,15 @@ dependencies {
1111

1212
annotationProcessor ( libs.lombok )
1313
}
14+
15+
publishing {
16+
publications {
17+
create<MavenPublication>("maven") {
18+
groupId = project.group.toString()
19+
artifactId = project.name
20+
version = project.version.toString()
21+
22+
from(components["java"])
23+
}
24+
}
25+
}

buildSrc/src/main/kotlin/bluemap.base.gradle.kts

+17-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
plugins {
22
java
33
`java-library`
4+
`maven-publish`
45
id ( "com.diffplug.spotless" )
56
}
67

7-
group = "de.bluecolored.bluemap"
8+
group = "de.bluecolored"
89
version = gitVersion()
910

1011
repositories {
@@ -31,7 +32,7 @@ tasks.withType(AbstractArchiveTask::class).configureEach {
3132
}
3233

3334
java {
34-
toolchain.languageVersion.set(JavaLanguageVersion.of(16))
35+
toolchain.languageVersion = JavaLanguageVersion.of(21)
3536
withSourcesJar()
3637
withJavadocJar()
3738
}
@@ -61,3 +62,17 @@ spotless {
6162
trimTrailingWhitespace()
6263
}
6364
}
65+
66+
publishing {
67+
repositories {
68+
maven {
69+
name = "bluecolored"
70+
url = uri( "https://repo.bluecolored.de/releases" )
71+
72+
credentials {
73+
username = project.findProperty("bluecoloredUsername") as String? ?: System.getenv("BLUECOLORED_USERNAME")
74+
password = project.findProperty("bluecoloredPassword") as String? ?: System.getenv("BLUECOLORED_PASSWORD")
75+
}
76+
}
77+
}
78+
}

0 commit comments

Comments
 (0)