Skip to content

Commit

Permalink
Configure publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
TBlueF committed Sep 11, 2024
1 parent 40f0724 commit f7f68ad
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
12 changes: 12 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,15 @@ dependencies {

annotationProcessor ( libs.lombok )
}

publishing {
publications {
create<MavenPublication>("maven") {
groupId = project.group.toString()
artifactId = project.name
version = project.version.toString()

from(components["java"])
}
}
}
19 changes: 17 additions & 2 deletions buildSrc/src/main/kotlin/bluemap.base.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
plugins {
java
`java-library`
`maven-publish`
id ( "com.diffplug.spotless" )
}

group = "de.bluecolored.bluemap"
group = "de.bluecolored"
version = gitVersion()

repositories {
Expand All @@ -31,7 +32,7 @@ tasks.withType(AbstractArchiveTask::class).configureEach {
}

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(16))
toolchain.languageVersion = JavaLanguageVersion.of(21)
withSourcesJar()
withJavadocJar()
}
Expand Down Expand Up @@ -61,3 +62,17 @@ spotless {
trimTrailingWhitespace()
}
}

publishing {
repositories {
maven {
name = "bluecolored"
url = uri( "https://repo.bluecolored.de/releases" )

credentials {
username = project.findProperty("bluecoloredUsername") as String? ?: System.getenv("BLUECOLORED_USERNAME")
password = project.findProperty("bluecoloredPassword") as String? ?: System.getenv("BLUECOLORED_PASSWORD")
}
}
}
}

0 comments on commit f7f68ad

Please sign in to comment.