Skip to content

Commit

Permalink
Remove publishing to GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Chelombitko committed Aug 3, 2024
1 parent d04d12d commit e979c88
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 63 deletions.
28 changes: 0 additions & 28 deletions .buildsystem/deploy-github.sh

This file was deleted.

Binary file removed .buildsystem/secring.gpg
Binary file not shown.
35 changes: 0 additions & 35 deletions buildSrc/src/main/kotlin/Deployment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,13 @@ import org.gradle.api.publish.maven.MavenPom
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.create
import org.gradle.kotlin.dsl.extra
import org.gradle.kotlin.dsl.get
import org.gradle.kotlin.dsl.provideDelegate
import org.gradle.kotlin.dsl.the
import org.gradle.plugins.signing.SigningExtension
import java.net.URI

object Deployment {
val githubUser = System.getenv("GITHUB_MAVEN_USERNAME")
val githubPassword = System.getenv("GITHUB_MAVEN_PASSWORD")
var releaseMode: String? = null
var versionSuffix: String? = null

val githubDeployUrl = "https://maven.pkg.github.com/badoo"

fun initialize(project: Project) {
val releaseMode: String? by project
val versionSuffix = when (releaseMode) {
Expand All @@ -30,7 +22,6 @@ object Deployment {
Deployment.versionSuffix = versionSuffix

initializePublishing(project)
initializeSigning(project)
}

private fun initializePublishing(project: Project) {
Expand All @@ -45,32 +36,6 @@ object Deployment {
from(project.components["java"])
}
}
repositories {
maven {
name = "GitHub"
credentials {
username = Deployment.githubUser
password = Deployment.githubPassword
}
url = URI.create(Deployment.githubDeployUrl)
}
}
}
}

private fun initializeSigning(project: Project) {
val passphrase = System.getenv("GPG_PASSPHRASE")
passphrase?.let {
project.plugins.apply("signing")

val publishing = project.the(PublishingExtension::class)
project.configure<SigningExtension> {
sign(publishing.publications.getByName("default"))
}

project.extra.set("signing.keyId", "1131CBA5")
project.extra.set("signing.password", passphrase)
project.extra.set("signing.secretKeyRingFile", "${project.rootProject.rootDir}/.buildsystem/secring.gpg")
}
}

Expand Down

0 comments on commit e979c88

Please sign in to comment.