feat: add publishing to package registry

chore: update deps
This commit is contained in:
Lucaskyy 2022-03-21 21:05:31 +01:00
parent d3764d3109
commit b475e09577
No known key found for this signature in database
GPG Key ID: 1530BFF96D1EEB89

View File

@ -1,5 +1,6 @@
plugins {
kotlin("jvm") version "1.6.10"
java
`maven-publish`
}
@ -8,10 +9,14 @@ group = "net.revanced"
repositories {
mavenCentral()
maven {
url = uri("https://maven.pkg.github.com/ReVancedTeam/revanced-patcher")
url = uri("https://maven.pkg.github.com/ReVancedTeam/revanced-patcher") // note the "r"!
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("REVANCED_PATCHER_GITHUB_PACKAGE_TOKEN")
// DO NOT set these variables in the project's gradle.properties.
// Instead, you should set them in:
// Windows: %homepath%\.gradle\gradle.properties
// Linux: ~/.gradle/gradle.properties
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR") // DO NOT CHANGE!
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN") // DO NOT CHANGE!
}
}
}
@ -24,5 +29,28 @@ dependencies {
implementation("org.ow2.asm:asm-tree:9.2")
implementation("org.ow2.asm:asm-commons:9.2")
implementation("net.revanced:revanced-patcher:1.0.0-dev.7")
implementation("net.revanced:revanced-patcher:1.+") // use latest version.
}
java {
withSourcesJar()
withJavadocJar()
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/ReVancedTeam/revanced-patches") // note the "s"!
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
register<MavenPublication>("gpr") {
from(components["java"])
}
}
}