Skip to content

Commit

Permalink
Michael gh seg/removejavadoc (#22)
Browse files Browse the repository at this point in the history
* Adding clean and build to gradle release and snapshot

* Removing javadoc for testing
  • Loading branch information
MichaelGHSeg authored Jul 17, 2024
1 parent aada796 commit f8b3c9a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
44 changes: 22 additions & 22 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -85,28 +85,28 @@ tasks.withType<Test> {
tasks {
val sourceFiles = android.sourceSets.getByName("main").java.srcDirs

register<Javadoc>("withJavadoc") {
isFailOnError = false

setSource(sourceFiles)

// add Android runtime classpath
android.bootClasspath.forEach { classpath += project.fileTree(it) }

// add classpath for all dependencies
android.libraryVariants.forEach { variant ->
variant.javaCompileProvider.get().classpath.files.forEach { file ->
classpath += project.fileTree(file)
}
}
}

register<Jar>("withJavadocJar") {
archiveClassifier.set("javadoc")
dependsOn(named("withJavadoc"))
val destination = named<Javadoc>("withJavadoc").get().destinationDir
from(destination)
}
// register<Javadoc>("withJavadoc") {
// isFailOnError = false
//
// setSource(sourceFiles)
//
// // add Android runtime classpath
// android.bootClasspath.forEach { classpath += project.fileTree(it) }
//
// // add classpath for all dependencies
// android.libraryVariants.forEach { variant ->
// variant.javaCompileProvider.get().classpath.files.forEach { file ->
// classpath += project.fileTree(file)
// }
// }
// }

// register<Jar>("withJavadocJar") {
// archiveClassifier.set("javadoc")
// dependsOn(named("withJavadoc"))
// val destination = named<Javadoc>("withJavadoc").get().destinationDir
// from(destination)
// }

register<Jar>("withSourcesJar") {
archiveClassifier.set("sources")
Expand Down
2 changes: 1 addition & 1 deletion publishing-plugins/src/main/kotlin/mvn-publish.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ afterEvaluate {
version = getVersionName()

artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
artifact(tasks.named<Jar>("withJavadocJar"))
// artifact(tasks.named<Jar>("withJavadocJar"))
artifact(tasks.named<Jar>("withSourcesJar"))

// Provide artifacts information requited by Maven Central
Expand Down

0 comments on commit f8b3c9a

Please sign in to comment.