Skip to content

Commit

Permalink
Lib Publish config
Browse files Browse the repository at this point in the history
  • Loading branch information
carlospontual committed Mar 18, 2024
1 parent 7e4a2a7 commit 4931907
Showing 1 changed file with 50 additions and 2 deletions.
52 changes: 50 additions & 2 deletions persistent-cookie-jar-okhttp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.jetbrainsKotlinAndroid)
//id("maven-publish")
`maven-publish`
}

group = "tv.pluto.ads"
version = "1.0.0-alpha01-2024.03.18"

kotlin {
androidTarget {
// see doc https://kotlinlang.org/docs/mpp-publish-lib.html#avoid-duplicate-publications
publishLibraryVariants("release")
}
}

android {
Expand All @@ -13,7 +23,6 @@ android {
targetSdk = 33
versionCode = 1
versionName = "1.0"
//consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
Expand All @@ -30,6 +39,45 @@ android {
}
}

afterEvaluate {
publishing {
// These values are provided by the CI environment, args are retrieved from the command line.
val nexusURL: String? by project
val nexusUserName: String? by project
val nexusUserPassword: String? by project
repositories {
maven {
url = uri(nexusURL)
credentials {
username = nexusUserName
password = nexusUserPassword
}
}
}
publications {
publications.withType<MavenPublication> {
// Provide artifacts information requited by Maven Central
pom {
name.set("persistent-cookie-jar-okhttp Library")
description.set(
"Custom version of persistent-cookie-jar-okhttp Library"
)
url.set("https://github.com/Pluto-tv/persistent-cookie-jar-okhttp")

developers {
developer {
id.set("Pluto TV")
name.set("Android Team (MH)")
}
}
scm {
url.set("https://github.com/Pluto-tv/persistent-cookie-jar-okhttp")
}
}
}
}
}

dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
Expand Down

0 comments on commit 4931907

Please sign in to comment.