Skip to content

Commit d6e26f3

Browse files
committed
updated publish-module.gradle
1 parent 957a7e8 commit d6e26f3

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

scripts/publish-module.gradle

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
apply plugin: 'maven-publish'
22
apply plugin: 'signing'
33

4-
task androidSourcesJar(type: 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-
}
4+
//task androidSourcesJar(type: 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+
//}
1616

17-
artifacts {
18-
archives androidSourcesJar
17+
android {
18+
publishing {
19+
singleVariant("release") {
20+
withJavadocJar()
21+
withSourcesJar()
22+
}
23+
}
1924
}
2025

2126
group = PUBLISH_GROUP_ID
@@ -38,7 +43,7 @@ afterEvaluate {
3843
from components.java
3944
}
4045

41-
artifact androidSourcesJar
46+
//artifact androidSourcesJar
4247

4348
// Mostly self-explanatory metadata
4449
pom {

0 commit comments

Comments
 (0)