File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ android {
3333
3434dependencies {
3535 // Segment
36- implementation ' com.segment.analytics.kotlin:substrata:1.1.1 '
36+ implementation ' com.segment.analytics.kotlin:substrata:1.1.2 '
3737 implementation ' com.segment.analytics.kotlin:android:1.21.0'
3838
3939 implementation ' org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1'
@@ -45,5 +45,29 @@ dependencies {
4545 androidTestImplementation ' androidx.test.ext:junit:1.1.5'
4646 androidTestImplementation ' androidx.test.espresso:espresso-core:3.5.1'
4747}
48+ task sourcesJar (type : Jar ) {
49+ archiveClassifier. set(' sources' )
50+ from android. sourceSets. main. java. srcDirs
51+ }
52+
53+ task javadoc (type : Javadoc ) {
54+ configurations. implementation. setCanBeResolved(true )
55+
56+ failOnError false
57+ source = android. sourceSets. main. java. sourceFiles
58+ classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
59+ classpath + = configurations. implementation
60+ }
4861
62+ // build a jar with javadoc
63+ task javadocJar (type : Jar , dependsOn : javadoc) {
64+ archiveClassifier. set(' javadoc' )
65+ from javadoc. destinationDir
66+ }
67+
68+ // Attach Javadocs and Sources jar
69+ artifacts {
70+ archives sourcesJar
71+ archives javadocJar
72+ }
4973apply from : rootProject. file(' gradle/mvn-publish.gradle' )
Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ publishing {
1212 version getVersionName()
1313
1414 artifact(" $projectDir /build/outputs/aar/${ project.getName()} -release.aar" )
15+ if (gradle. startParameter. taskNames. any { it. contains(' publishToMavenLocal' ) }) {
16+ artifact sourcesJar
17+ artifact javadocJar
18+ }
1519
1620 // Self-explanatory metadata for the most part
1721 pom {
You can’t perform that action at this time.
0 commit comments