add publishing to github packages

This commit is contained in:
bvn13 2022-01-29 01:26:15 +03:00
parent 857ce637a7
commit e0fe404832

View File

@ -1,6 +1,7 @@
plugins { plugins {
id 'java' id 'java'
id 'idea' id 'idea'
id 'maven-publish'
} }
group 'me.bvn13' group 'me.bvn13'
@ -34,4 +35,22 @@ test {
tasks.withType(Test).configureEach { tasks.withType(Test).configureEach {
maxParallelForks = 1 maxParallelForks = 1
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/bvn13/sewy")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
}
}
} }