Added publishing task

This commit is contained in:
Gero Lindner 2024-01-22 19:55:56 +01:00
parent 4d6b04ee39
commit 3a2bf2f81b
Signed by: gero.lindner
GPG Key ID: F7F222F23A672C4D
1 changed files with 30 additions and 0 deletions

View File

@ -1,5 +1,6 @@
plugins {
id 'java'
id 'maven-publish'
}
group = 'cc.lndnr'
@ -15,12 +16,41 @@ repositories {
name = "sonatype"
url = "https://oss.sonatype.org/content/groups/public/"
}
maven {
url = "https://git.lndnr.cc/api/packages/gerolndnr/maven"
}
}
dependencies {
compileOnly "io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT"
}
publishing {
publications {
maven(MavenPublication) {
groupId = "cc.lndnr"
artifactId = "core-system"
version = version
}
}
repositories {
maven {
name = "Gitea"
url = uri("https://git.lndnr.cc/api/packages/gero.lindner/maven")
credentials(HttpHeaderCredentials) {
name = "Authorization"
value = "token " + System.getenv("GITEA_PERSONAL_ACCESS_TOKEN")
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
def targetJavaVersion = 17
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)