|
1 | 1 | plugins { |
2 | 2 | alias(libs.plugins.micronaut.application) |
3 | 3 | alias(libs.plugins.micronaut.aot) |
| 4 | + `maven-publish` |
4 | 5 | } |
5 | 6 |
|
6 | 7 | group = "net.onelitefeather.blackhole" |
@@ -78,3 +79,63 @@ tasks { |
78 | 79 | options.forkOptions.jvmArgs = listOf("-Dmicronaut.openapi.views.spec=rapidoc.enabled=true,openapi-explorer.enabled=true,swagger-ui.enabled=true,swagger-ui.theme=flattop") |
79 | 80 | } |
80 | 81 | } |
| 82 | + |
| 83 | +publishing { |
| 84 | + publications.create<MavenPublication>("maven") { |
| 85 | + artifact(project.tasks.optimizedJitJar) |
| 86 | + artifact(project.tasks.optimizedRunnerJitJar) |
| 87 | + artifact(project.tasks.runnerJar) |
| 88 | + artifact(project.tasks.jar) |
| 89 | + artifact(project.tasks.optimizedDistTar) |
| 90 | + artifact(project.tasks.optimizedDistZip) |
| 91 | + |
| 92 | + version = rootProject.version as String |
| 93 | + artifactId = "blackhole-backend" |
| 94 | + groupId = rootProject.group as String |
| 95 | + pom { |
| 96 | + name = "Blackhole" |
| 97 | + description = "A backend server for managing different kind of punishments" |
| 98 | + url = "https://github.com/OneLiteFeatherNET/Blackhole" |
| 99 | + licenses { |
| 100 | + license { |
| 101 | + name = "AGPL-3.0" |
| 102 | + url = "https://www.gnu.org/licenses/agpl-3.0.en.html" |
| 103 | + } |
| 104 | + } |
| 105 | + developers { |
| 106 | + developer { |
| 107 | + id = "themeinerlp" |
| 108 | + name = "Phillipp Glanz" |
| 109 | + email = "p.glanz@madfix.me" |
| 110 | + } |
| 111 | + developer { |
| 112 | + id = "theEvilReaper" |
| 113 | + name = "Steffen Wonning" |
| 114 | + email = "steffenwx@gmail.com" |
| 115 | + } |
| 116 | + } |
| 117 | + scm { |
| 118 | + connection = "scm:git:git://github.com:OneLiteFeatherNET/Blackhole.git" |
| 119 | + developerConnection = "scm:git:ssh://git@github.com:OneLiteFeatherNET/Blackhole.git" |
| 120 | + url = "https://github.com/OneLiteFeatherNET/Blackhole" |
| 121 | + } |
| 122 | + } |
| 123 | + } |
| 124 | + |
| 125 | + repositories { |
| 126 | + maven { |
| 127 | + authentication { |
| 128 | + credentials(PasswordCredentials::class) { |
| 129 | + // Those credentials need to be set under "Settings -> Secrets -> Actions" in your repository |
| 130 | + username = System.getenv("ONELITEFEATHER_MAVEN_USERNAME") |
| 131 | + password = System.getenv("ONELITEFEATHER_MAVEN_PASSWORD") |
| 132 | + } |
| 133 | + } |
| 134 | + |
| 135 | + name = "OneLiteFeatherRepository" |
| 136 | + val releasesRepoUrl = uri("https://repo.onelitefeather.dev/onelitefeather-releases") |
| 137 | + val snapshotsRepoUrl = uri("https://repo.onelitefeather.dev/onelitefeather-snapshots") |
| 138 | + url = if (version.toString().contains("BETA") || version.toString().contains("ALPHA") || version.toString().contains("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl |
| 139 | + } |
| 140 | + } |
| 141 | +} |
0 commit comments