Skip to content

Commit

Permalink
Successful Maven Publish (#41)
Browse files Browse the repository at this point in the history
* add api client with grpc kotlin

* successfully publish to github packages with the jar files
  • Loading branch information
nplasterer authored Mar 2, 2023
1 parent 71a1fb4 commit b75604b
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,38 +77,33 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}

sourceSets {
main {
java {
srcDirs = ["src/main/java"]
task androidJavadocs(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
android.libraryVariants.all { variant ->
if (variant.name == 'release') {
owner.classpath += variant.javaCompileProvider.get().classpath
}
}
exclude '**/R.html', '**/R.*.html', '**/index.html'
}

task androidSourcesJar(type: Jar) {
archiveClassifier.set('sources')
if (project.plugins.findPlugin("com.android.library")) {
from android.sourceSets.main.java.srcDirs
from android.sourceSets.main.kotlin.srcDirs
} else {
from sourceSets.main.java.srcDirs
from sourceSets.main.kotlin.srcDirs
}
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
archiveClassifier.set('javadoc')
from androidJavadocs.destinationDir
}

task javadoc(type: Javadoc) {
failOnError false
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
task androidSourcesJar(type: Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = "javadoc"
from javadoc.destinationDir
tasks.withType(Javadoc).all {
enabled = false
}

artifacts {
archives javadocJar, androidSourcesJar
archives androidJavadocsJar, androidSourcesJar
}

afterEvaluate {
Expand All @@ -126,7 +121,7 @@ afterEvaluate {
}

artifact androidSourcesJar
artifact javadocJar
artifact androidJavadocsJar

pom {
name = "XMTP"
Expand Down

0 comments on commit b75604b

Please sign in to comment.