Skip to content

Commit

Permalink
Merge pull request #22 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 4f8a4ac + 2fe0e0c commit 1f74a57
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 71 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ dependencies {
implementation('org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0')
}

implementation 'io.github.pseudoankit:coachmark:1.0.0'
implementation 'io.github.pseudoankit:coachmark:1.0.2'
implementation 'androidx.activity:activity-compose:1.7.2'
implementation platform('androidx.compose:compose-bom:2022.10.00')
implementation 'androidx.compose.ui:ui'
Expand Down
3 changes: 1 addition & 2 deletions coachmark/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ plugins {
id 'org.jetbrains.kotlin.android'
}

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

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

Expand Down
Empty file removed coachmark/consumer-rules.pro
Empty file.
21 changes: 0 additions & 21 deletions coachmark/proguard-rules.pro

This file was deleted.

97 changes: 50 additions & 47 deletions publish-package.gradle → gradle/publish-package.gradle
Original file line number Diff line number Diff line change
@@ -1,40 +1,26 @@
apply plugin: 'maven-publish'
apply plugin: 'signing'

task androidJavadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
android.libraryVariants.all { variant ->
if (variant.name == 'release') {
owner.classpath += variant.javaCompileProvider.get().classpath
}
}
ext {
GROUP_ID = "io.github.pseudoankit"
VERSION_NAME = "1.0.3"

exclude '**/R.html', '**/R.*.html', '**/index.html'
options.encoding 'utf-8'
options {
addStringOption 'docencoding', 'utf-8'
addStringOption 'charset', 'utf-8'
links 'https://docs.oracle.com/javase/7/docs/api/'
links 'https://d.android.com/reference'
links 'https://developer.android.com/reference/androidx/'
}
}
POM_DESCRIPTION = "Compose library to add coachmark"
POM_URL = "https://github.com/pseudoankit/coachmark"
POM_SCM_CONNECTION = "scm:[email protected]:pseudoankit/coachmark.git"

task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
archiveClassifier.set('javadoc')
from androidJavadoc.destinationDir
OSS_USERNAME = System.getenv("OSS_USERNAME")
OSS_PASSWORD = System.getenv("OSS_PASSWORD")

preserveFileTimestamps = false
reproducibleFileOrder = true
}

task javaSourcesJar(type: Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs

preserveFileTimestamps = false
reproducibleFileOrder = true
signing {
useInMemoryPgpKeys(
System.getenv("SIGNING_KEY_ID"),
System.getenv("SIGNING_KEY"),
System.getenv("SIGNING_PASSWORD"),
)
sign publishing.publications
}

afterEvaluate {
Expand All @@ -45,15 +31,17 @@ afterEvaluate {
from components.release

groupId GROUP_ID
artifactId ARTIFACT_ID
version VERSION_NAME

pom {
name = artifactId
name = ARTIFACT_ID
description = POM_DESCRIPTION
url = POM_URL
licenses {
license {
name = LICENCE_NAME
url = LICENCE_URL
name = "The Apache Software License, Version 2.0"
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
scm {
Expand Down Expand Up @@ -103,23 +91,38 @@ afterEvaluate {
}
}

ext {
GROUP_ID = "io.github.pseudoankit"
task androidJavadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
android.libraryVariants.all { variant ->
if (variant.name == 'release') {
owner.classpath += variant.javaCompileProvider.get().classpath
}
}

POM_DESCRIPTION = "Compose library to add coachmark"
POM_URL = "https://github.com/pseudoankit/coachmark"
POM_SCM_CONNECTION = "scm:[email protected]:pseudoankit/coachmark.git"
exclude '**/R.html', '**/R.*.html', '**/index.html'
options.encoding 'utf-8'
options {
addStringOption 'docencoding', 'utf-8'
addStringOption 'charset', 'utf-8'
links 'https://docs.oracle.com/javase/7/docs/api/'
links 'https://d.android.com/reference'
links 'https://developer.android.com/reference/androidx/'
}
}

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")
task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
archiveClassifier.set('javadoc')
from androidJavadoc.destinationDir

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

signing {
sign publishing.publications
}
task javaSourcesJar(type: Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs

preserveFileTimestamps = false
reproducibleFileOrder = true
}

0 comments on commit 1f74a57

Please sign in to comment.