Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
group = "net.onelitefeather.blackhole.api"

plugins {
`maven-publish`
alias(libs.plugins.shadow)
alias(libs.plugins.publishdata)
}

dependencies {
Expand All @@ -16,34 +14,3 @@ dependencies {
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly(mn.junit.jupiter.engine)
}

publishData {
addBuildData()
useGitlabReposForProject("196", "https://gitlab.onelitefeather.dev/")
publishTask("shadowJar")
}

publishing {
publications.create<MavenPublication>("maven") {
// configure the publication as defined previously.
publishData.configurePublication(this)
version = publishData.getVersion(false)
}

repositories {
maven {
credentials(HttpHeaderCredentials::class) {
name = "Job-Token"
value = System.getenv("CI_JOB_TOKEN")
}
authentication {
create("header", HttpHeaderAuthentication::class)
}


name = "Gitlab"
// Get the detected repository from the publishing data
url = uri(publishData.getRepository())
}
}
}
61 changes: 61 additions & 0 deletions backend/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
alias(libs.plugins.micronaut.application)
alias(libs.plugins.micronaut.aot)
`maven-publish`
}

group = "net.onelitefeather.blackhole"
Expand Down Expand Up @@ -78,3 +79,63 @@ tasks {
options.forkOptions.jvmArgs = listOf("-Dmicronaut.openapi.views.spec=rapidoc.enabled=true,openapi-explorer.enabled=true,swagger-ui.enabled=true,swagger-ui.theme=flattop")
}
}

publishing {
publications.create<MavenPublication>("maven") {
artifact(project.tasks.optimizedJitJar)
artifact(project.tasks.optimizedRunnerJitJar)
artifact(project.tasks.runnerJar)
artifact(project.tasks.jar)
artifact(project.tasks.optimizedDistTar)
artifact(project.tasks.optimizedDistZip)

version = rootProject.version as String
artifactId = "blackhole-backend"
groupId = rootProject.group as String
pom {
name = "Blackhole"
description = "A backend server for managing different kind of punishments"
url = "https://github.com/OneLiteFeatherNET/Blackhole"
licenses {
license {
name = "AGPL-3.0"
url = "https://www.gnu.org/licenses/agpl-3.0.en.html"
}
}
developers {
developer {
id = "themeinerlp"
name = "Phillipp Glanz"
email = "[email protected]"
}
developer {
id = "theEvilReaper"
name = "Steffen Wonning"
email = "[email protected]"
}
}
scm {
connection = "scm:git:git://github.com:OneLiteFeatherNET/Blackhole.git"
developerConnection = "scm:git:ssh://[email protected]:OneLiteFeatherNET/Blackhole.git"
url = "https://github.com/OneLiteFeatherNET/Blackhole"
}
}
}

repositories {
maven {
authentication {
credentials(PasswordCredentials::class) {
// Those credentials need to be set under "Settings -> Secrets -> Actions" in your repository
username = System.getenv("ONELITEFEATHER_MAVEN_USERNAME")
password = System.getenv("ONELITEFEATHER_MAVEN_PASSWORD")
}
}

name = "OneLiteFeatherRepository"
val releasesRepoUrl = uri("https://repo.onelitefeather.dev/onelitefeather-releases")
val snapshotsRepoUrl = uri("https://repo.onelitefeather.dev/onelitefeather-snapshots")
url = if (version.toString().contains("BETA") || version.toString().contains("ALPHA") || version.toString().contains("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
}
}
}
32 changes: 0 additions & 32 deletions client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ group = "net.onelitefeather.blackhole.client"
plugins {
`maven-publish`
alias(libs.plugins.shadow)
alias(libs.plugins.publishdata)
}

dependencies {
Expand All @@ -26,34 +25,3 @@ dependencies {
testRuntimeOnly(mn.junit.jupiter.engine)
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

publishData {
addBuildData()
useGitlabReposForProject("196", "https://gitlab.onelitefeather.dev/")
publishTask("shadowJar")
}

publishing {
publications.create<MavenPublication>("maven") {
// configure the publication as defined previously.
publishData.configurePublication(this)
version = publishData.getVersion(false)
}

repositories {
maven {
credentials(HttpHeaderCredentials::class) {
name = "Job-Token"
value = System.getenv("CI_JOB_TOKEN")
}
authentication {
create("header", HttpHeaderAuthentication::class)
}


name = "Gitlab"
// Get the detected repository from the publishing data
url = uri(publishData.getRepository())
}
}
}
27 changes: 1 addition & 26 deletions phoca/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
java
`java-library`
jacoco
`java-library`
`maven-publish`
}

Expand Down Expand Up @@ -40,27 +39,3 @@ tasks {
}
}
}


publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}

repositories {
maven {
authentication {
credentials(PasswordCredentials::class) {
username = System.getenv("ONELITEFEATHER_MAVEN_USERNAME")
password = System.getenv("ONELITEFEATHER_MAVEN_PASSWORD")
}
}
name = "OneLiteFeatherRepository"
url = if (project.version.toString().contains("SNAPSHOT")) {
uri("https://repo.onelitefeather.dev/onelitefeather-snapshots")
} else {
uri("https://repo.onelitefeather.dev/onelitefeather-releases")
}
}
}
}
9 changes: 0 additions & 9 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
rootProject.name = "Blackhole"
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven("https://eldonexus.de/repository/maven-public/")
}
}

plugins {
id("io.micronaut.platform.catalog") version "4.6.1"
Expand Down Expand Up @@ -36,7 +29,6 @@ dependencyResolutionManagement {
version("micronaut", "4.6.1")
version("velocity", "3.4.0-SNAPSHOT")
version("cloud.commands", "2.0.0")
version("publishdata", "1.4.0")
version("shadow", "9.2.2")
version("jetbrains.annotations", "26.0.2-1")

Expand All @@ -49,7 +41,6 @@ dependencyResolutionManagement {

plugin("micronaut.application", "io.micronaut.application").versionRef("micronaut")
plugin("micronaut.aot", "io.micronaut.aot").versionRef("micronaut")
plugin("publishdata", "de.chojo.publishdata").versionRef("publishdata")
plugin("shadow", "com.gradleup.shadow").versionRef("shadow")
}
}
Expand Down
36 changes: 1 addition & 35 deletions velocity/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
group = "net.onelitefeather.blackhole.velocity"

plugins {
id("xyz.jpenilla.run-velocity") version "3.0.2"
`maven-publish`
alias(libs.plugins.shadow)
alias(libs.plugins.publishdata)
}



dependencies {
annotationProcessor(libs.velocity.api)

Expand All @@ -32,35 +30,3 @@ tasks {
velocityVersion("3.3.0-SNAPSHOT")
}
}


publishData {
addBuildData()
useGitlabReposForProject("196", "https://gitlab.onelitefeather.dev/")
publishTask("shadowJar")
}

publishing {
publications.create<MavenPublication>("maven") {
// configure the publication as defined previously.
publishData.configurePublication(this)
version = publishData.getVersion(false)
}

repositories {
maven {
credentials(HttpHeaderCredentials::class) {
name = "Job-Token"
value = System.getenv("CI_JOB_TOKEN")
}
authentication {
create("header", HttpHeaderAuthentication::class)
}


name = "Gitlab"
// Get the detected repository from the publishing data
url = uri(publishData.getRepository())
}
}
}