Add publish gradle task
This commit is contained in:
parent
1ae8d4bd82
commit
6fc1fe6ccd
|
|
@ -1,5 +1,7 @@
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.library")
|
id("com.android.library")
|
||||||
|
id("maven-publish")
|
||||||
|
id("signing")
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
@ -19,11 +21,70 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
targetCompatibility = JavaVersion.VERSION_1_7
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
fun MavenPublication.setup() {
|
||||||
|
group = "io.github.libxposed"
|
||||||
|
version = "100"
|
||||||
|
pom {
|
||||||
|
name.set("api")
|
||||||
|
description.set("Modern Xposed API")
|
||||||
|
url.set("https://github.com/libxposed/api")
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name.set("Apache License 2.0")
|
||||||
|
url.set("https://github.com/libxposed/api/blob/master/LICENSE")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
name.set("libxposed")
|
||||||
|
url.set("https://libxposed.github.io")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
scm {
|
||||||
|
connection.set("scm:git:https://github.com/libxposed/api.git")
|
||||||
|
url.set("https://github.com/libxposed/api")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
register<MavenPublication>("api") {
|
||||||
|
artifactId = "api"
|
||||||
|
setup()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "ossrh"
|
||||||
|
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
|
||||||
|
credentials(PasswordCredentials::class)
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "GitHubPackages"
|
||||||
|
url = uri("https://maven.pkg.github.com/LSPosed/LSPlant")
|
||||||
|
credentials {
|
||||||
|
username = System.getenv("GITHUB_ACTOR")
|
||||||
|
password = System.getenv("GITHUB_TOKEN")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
signing {
|
||||||
|
val signingKey = findProperty("signingKey") as String?
|
||||||
|
val signingPassword = findProperty("signingPassword") as String?
|
||||||
|
if (signingKey != null && signingPassword != null) {
|
||||||
|
useInMemoryPgpKeys(signingKey, signingPassword)
|
||||||
|
}
|
||||||
|
sign(publishing.publications)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("androidx.annotation:annotation:1.5.0")
|
compileOnly("androidx.annotation:annotation:1.5.0")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue