Skip to content

Commit 1d9ba41

Browse files
Fixed: CD is failing because there are multiple jar and sources files to upload.
* It was due to we had upgraded the Nexus plugin while upgrading the gradle. So this new version of Nexus generates the sources and jar files itself, and we have a task where we are generating the sources and jar so due to this it detected the multiple jar and sources files and failed the CD. So we have removed our task so that the Nexus plugin will generate and upload the jar and source files itself.
1 parent cd8ac21 commit 1d9ba41

2 files changed

Lines changed: 1 addition & 26 deletions

File tree

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
run: bash ./install_deps.sh
2323

2424
- name: Compile and prepare package
25-
run: ./gradlew buildHeaders build assemble androidSourcesJar
25+
run: ./gradlew buildHeaders build assemble
2626

2727
- name: Publish to Maven Central
2828
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository

lib/publish.gradle

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
11
apply plugin: 'maven-publish'
22
apply plugin: 'signing'
33

4-
tasks.register('androidSourcesJar', Jar) {
5-
archiveClassifier.set('sources')
6-
if (project.plugins.findPlugin("com.android.library")) {
7-
// For Android libraries
8-
from android.sourceSets.main.java.srcDirs
9-
from android.sourceSets.main.kotlin.srcDirs
10-
} else {
11-
// For pure Kotlin libraries, in case you have them
12-
from sourceSets.main.java.srcDirs
13-
from sourceSets.main.kotlin.srcDirs
14-
}
15-
}
16-
17-
artifacts {
18-
archives androidSourcesJar
19-
}
20-
214
def siteUrl = 'https://www.kiwix.org/en/'
225
def gitUrl = 'https://github.com/kiwix/libkiwix.git'
236

@@ -35,7 +18,6 @@ afterEvaluate {
3518

3619
from components.release
3720

38-
artifact androidSourcesJar
3921
pom {
4022
name = ARTIFACT_ID
4123
description = 'LibKiwix Android library'
@@ -71,13 +53,6 @@ afterEvaluate {
7153
}
7254
}
7355
}
74-
75-
// Set dependency for the metadata file generation task
76-
tasks.withType(GenerateModuleMetadata).tap {
77-
configureEach {
78-
dependsOn tasks.named("androidSourcesJar")
79-
}
80-
}
8156
}
8257

8358
signing {

0 commit comments

Comments
 (0)