Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

Commit 57c0db8

Browse files
committed
Update androidx.build.publishing.gradle
add sources zip generation
1 parent 6c763e7 commit 57c0db8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

constraintlayout/build-logic/src/main/groovy/androidx.build.publishing.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,22 @@ publishing {
2222
}
2323
}
2424

25+
task androidSourceJar(type: Jar) {
26+
if (project.hasProperty('android')) {
27+
from android.sourceSets.main.java.srcDirs
28+
archiveClassifier.set('sources')
29+
}
30+
}
31+
2532
components.configureEach {component ->
2633
if (component.name in ['release', 'java']) {
2734
publishing.publications {
2835
maven(MavenPublication) {
2936
from component
3037
artifactId aid
38+
if (project.hasProperty('android')) {
39+
artifact androidSourceJar
40+
}
3141
}
3242
}
3343
}

0 commit comments

Comments
 (0)