Skip to content

Commit

Permalink
chore(android): fix maven publishing (#6564)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlpoole committed May 4, 2023
1 parent 16fce75 commit 7cc526b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion android/capacitor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ buildscript {
classpath 'com.android.tools.build:gradle:8.0.0'

if (System.getenv("CAP_PUBLISH") == "true") {
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion android/scripts/publish-module.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apply plugin: 'signing'
def LIB_VERSION = System.getenv('CAP_VERSION')

task androidSourcesJar(type: Jar) {
dependsOn(':bundleReleaseAar')
archiveClassifier.set('sources')
if (project.plugins.findPlugin("com.android.library")) {
from android.sourceSets.main.java.srcDirs
Expand All @@ -30,7 +31,7 @@ afterEvaluate {

// Two artifacts, the `aar` (or `jar`) and the sources
if (project.plugins.findPlugin("com.android.library")) {
from components.release
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
} else {
artifact("$buildDir/libs/${project.getName()}-${version}.jar")
}
Expand Down

0 comments on commit 7cc526b

Please sign in to comment.