mirror of
https://github.com/kiwix/java-libkiwix.git
synced 2025-09-09 23:30:34 -04:00
Merge pull request #106 from kiwix/Fixes#105
Fixed: CD is failing because there are multiple jar and sources files to upload.
This commit is contained in:
commit
0cc473aee4
2
.github/workflows/cd.yml
vendored
2
.github/workflows/cd.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
|||||||
run: bash ./install_deps.sh
|
run: bash ./install_deps.sh
|
||||||
|
|
||||||
- name: Compile and prepare package
|
- name: Compile and prepare package
|
||||||
run: ./gradlew buildHeaders build assemble androidSourcesJar
|
run: ./gradlew buildHeaders build assemble
|
||||||
|
|
||||||
- name: Publish to Maven Central
|
- name: Publish to Maven Central
|
||||||
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
|
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
|
||||||
|
@ -1,23 +1,6 @@
|
|||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
apply plugin: 'signing'
|
apply plugin: 'signing'
|
||||||
|
|
||||||
tasks.register('androidSourcesJar', Jar) {
|
|
||||||
archiveClassifier.set('sources')
|
|
||||||
if (project.plugins.findPlugin("com.android.library")) {
|
|
||||||
// For Android libraries
|
|
||||||
from android.sourceSets.main.java.srcDirs
|
|
||||||
from android.sourceSets.main.kotlin.srcDirs
|
|
||||||
} else {
|
|
||||||
// For pure Kotlin libraries, in case you have them
|
|
||||||
from sourceSets.main.java.srcDirs
|
|
||||||
from sourceSets.main.kotlin.srcDirs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
artifacts {
|
|
||||||
archives androidSourcesJar
|
|
||||||
}
|
|
||||||
|
|
||||||
def siteUrl = 'https://www.kiwix.org/en/'
|
def siteUrl = 'https://www.kiwix.org/en/'
|
||||||
def gitUrl = 'https://github.com/kiwix/libkiwix.git'
|
def gitUrl = 'https://github.com/kiwix/libkiwix.git'
|
||||||
|
|
||||||
@ -35,7 +18,6 @@ afterEvaluate {
|
|||||||
|
|
||||||
from components.release
|
from components.release
|
||||||
|
|
||||||
artifact androidSourcesJar
|
|
||||||
pom {
|
pom {
|
||||||
name = ARTIFACT_ID
|
name = ARTIFACT_ID
|
||||||
description = 'LibKiwix Android library'
|
description = 'LibKiwix Android library'
|
||||||
@ -71,13 +53,6 @@ afterEvaluate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set dependency for the metadata file generation task
|
|
||||||
tasks.withType(GenerateModuleMetadata).tap {
|
|
||||||
configureEach {
|
|
||||||
dependsOn tasks.named("androidSourcesJar")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
signing {
|
signing {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user