Skip to content

Commit

Permalink
Add source docs to release (#36)
Browse files Browse the repository at this point in the history
* add api client with grpc kotlin

* need source and java docs

* remove unused code

* retrigger CI
  • Loading branch information
nplasterer authored Feb 24, 2023
1 parent d2ddf72 commit a6737ab
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ android {
kotlinOptions {
jvmTarget = '11'
}

publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}
}
}

protobuf {
Expand Down Expand Up @@ -84,6 +77,34 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}

sourceSets {
main {
java {
srcDirs = ["src/main/java"]
}
}
}

task javadoc(type: Javadoc) {
failOnError false
source = sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task sourcesJar(type: Jar) {
classifier = "sources"
from sourceSets.main.java.srcDirs
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = "javadoc"
from javadoc.destinationDir
}

artifacts {
archives javadocJar, sourcesJar
}

afterEvaluate {
publishing {
publications {
Expand All @@ -92,6 +113,8 @@ afterEvaluate {
artifactId = "android"
version = System.getenv("RELEASE_VERSION")
from components.release
artifact sourcesJar
artifact javadocJar

pom {
name = "XMTP"
Expand Down

0 comments on commit a6737ab

Please sign in to comment.