Skip to content

Commit

Permalink
Merge pull request #21 from pseudoankit/publish-maven-central-v2
Browse files Browse the repository at this point in the history
Publish maven central v2
  • Loading branch information
pseudoankit authored Jan 25, 2024
2 parents 58a5856 + be9f481 commit 4f8a4ac
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 40 deletions.
14 changes: 5 additions & 9 deletions coachmark/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ plugins {

apply from: '../publish-package.gradle'

ext {
VERSION_NAME = "1.0.2"
ARTIFACT_ID = "coachmark"
}

kotlin {
explicitApi = 'strict'
}
Expand All @@ -16,17 +21,8 @@ android {
defaultConfig {
minSdk 19
targetSdk 34

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand Down
18 changes: 1 addition & 17 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,4 @@ kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
# Maven details
VERSION_NAME=1.0.0
VERSION_CODE=1
GROUP=io.github.pseudoankit
POM_DESCRIPTION=Compose library to add coachmark
POM_URL=https://github.com/pseudoankit/coachmark
POM_SCM_CONNECTION=scm:[email protected]:pseudoankit/coachmark.git
POM_DEVELOPER_ID=pseudoankit
POM_DEVELOPER_NAME=Ankit Kumar
POM_DEVELOPER_EMAIL=[email protected]
#****
signing.keyId=
signing.password=
signing.secretKeyRingFile=
ossrhUsername=
ossrhPassword=
android.nonTransitiveRClass=true
40 changes: 27 additions & 13 deletions publish-package.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,16 @@ afterEvaluate {

from components.release

// artifact androidJavadocJar
// artifact javaSourcesJar

groupId GROUP
groupId GROUP_ID
version VERSION_NAME
pom {
name = artifactId
description = POM_DESCRIPTION
url = POM_URL
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
name = LICENCE_NAME
url = LICENCE_URL
}
}
scm {
Expand All @@ -66,9 +63,9 @@ afterEvaluate {
}
developers {
developer {
id = POM_DEVELOPER_ID
name = POM_DEVELOPER_NAME
email = POM_DEVELOPER_EMAIL
id = 'pseudoankit'
name = 'Ankit Kumar'
email = '[email protected]'
}
}
}
Expand All @@ -84,8 +81,8 @@ afterEvaluate {
url = "https://s01.oss.sonatype.org/content/repositories/snapshots/"

credentials {
username ossrhUsername
password ossrhPassword
username OSS_USERNAME
password OSS_PASSWORD
}
}

Expand All @@ -98,14 +95,31 @@ afterEvaluate {
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"

credentials {
username ossrhUsername
password ossrhPassword
username OSS_USERNAME
password OSS_PASSWORD
}
}
}
}
}

ext {
GROUP_ID = "io.github.pseudoankit"

POM_DESCRIPTION = "Compose library to add coachmark"
POM_URL = "https://github.com/pseudoankit/coachmark"
POM_SCM_CONNECTION = "scm:[email protected]:pseudoankit/coachmark.git"

OSS_USERNAME = System.getenv("OSS_USERNAME")
OSS_PASSWORD = System.getenv("OSS_PASSWORD")
ext."signing.keyId" = System.getenv("SIGNING_KEY_ID")
ext."signing.password" = System.getenv("SIGNING_PASSWORD")
ext."signing.secretKeyRingFile" = System.getenv("SIGNING_SECRET_KEY_RING_FILE")

LICENCE_NAME = "The Apache Software License, Version 2.0"
LICENCE_URL = "https://www.apache.org/licenses/LICENSE-2.0.txt"
}

signing {
sign publishing.publications
}
1 change: 0 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
rootProject.name = "coachmark"
Expand Down

0 comments on commit 4f8a4ac

Please sign in to comment.