mirror of
https://github.com/ReVanced/revanced-library.git
synced 2026-01-11 13:56:17 +00:00
build: Fix duplicate publication
KMP already creates one.
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.library)
|
alias(libs.plugins.android.library)
|
||||||
alias(libs.plugins.binary.compatibility.validator)
|
alias(libs.plugins.binary.compatibility.validator)
|
||||||
@@ -29,18 +31,14 @@ repositories {
|
|||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
jvm {
|
jvm {
|
||||||
compilations.all {
|
compilerOptions {
|
||||||
kotlinOptions {
|
jvmTarget = JvmTarget.JVM_11
|
||||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
androidTarget {
|
androidTarget {
|
||||||
compilations.all {
|
compilerOptions {
|
||||||
kotlinOptions {
|
jvmTarget = JvmTarget.JVM_11
|
||||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
publishLibraryVariants("release")
|
publishLibraryVariants("release")
|
||||||
@@ -98,15 +96,15 @@ publishing {
|
|||||||
name = "GitHubPackages"
|
name = "GitHubPackages"
|
||||||
url = uri("https://maven.pkg.github.com/revanced/revanced-library")
|
url = uri("https://maven.pkg.github.com/revanced/revanced-library")
|
||||||
credentials {
|
credentials {
|
||||||
username = System.getenv("GITHUB_ACTOR")
|
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR")
|
||||||
password = System.getenv("GITHUB_TOKEN")
|
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
publications {
|
// KMP plugin creates a publication already, so just configure the POM.
|
||||||
create<MavenPublication>("revanced-library-publication") {
|
publications.all {
|
||||||
version = project.version.toString()
|
if (this !is MavenPublication) return@all
|
||||||
|
|
||||||
pom {
|
pom {
|
||||||
name = "ReVanced Library"
|
name = "ReVanced Library"
|
||||||
@@ -135,10 +133,9 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
signing {
|
signing {
|
||||||
useGpgCmd()
|
useGpgCmd()
|
||||||
sign(publishing.publications["revanced-library-publication"])
|
sign(publishing.publications)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user