diff --git a/build.gradle b/build.gradle index ccba7b8..9de1c83 100644 --- a/build.gradle +++ b/build.gradle @@ -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)