Skip to content

Commit

Permalink
Add javadocsJar task in the whatIf gradle module for generating javad…
Browse files Browse the repository at this point in the history
…oc files
  • Loading branch information
skydoves committed Oct 26, 2020
1 parent 8b1a711 commit e195da9
Showing 1 changed file with 51 additions and 41 deletions.
92 changes: 51 additions & 41 deletions whatif/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,67 +11,77 @@ ext.repository = [
]

afterEvaluate {
publishing {
publications {
releaseWhatIf(MavenPublication) {
from components.java
publishing {
publications {
releaseWhatIf(MavenPublication) {
from components.java

group = "com.github.skydoves"
artifactId = repository.name
version = versions.versionName
group = "com.github.skydoves"
artifactId = repository.name
version = versions.versionName

artifact sourceJar
artifact javadocsJar
artifact(sourceJar)

pom {
name = repository.name
description = repository.description
url = repository.websiteUrl
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "skydoves"
name = "Jaewoong Eum"
}
}
scm {
connection = repository.scm
developerConnection = repository.scm
url = repository.websiteUrl
}
}
pom {
name = repository.name
description = repository.description
url = repository.websiteUrl
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "skydoves"
name = "Jaewoong Eum"
}
}
scm {
connection = repository.scm
developerConnection = repository.scm
url = repository.websiteUrl
}
}
}
}
}
}

kotlin {
explicitApiWarning()
explicitApiWarning()
}

dependencies {
testImplementation "junit:junit:$versions.junit"
testImplementation "junit:junit:$versions.junit"
}

dokka {
outputFormat = 'html'
outputDirectory = "$buildDir/javadoc"
configuration {
moduleName = 'whatif'
}
outputFormat = 'html'
outputDirectory = "$buildDir/javadoc"
configuration {
moduleName = 'whatif'
}
}

tasks.withType(Javadoc) {
excludes = ['**/*.kt']
options.addBooleanOption('Xdoclint:none', true)
}

task sourceJar(type: Jar) {
archiveClassifier = "sources"
archiveClassifier = "sources"
}

tasks.withType(Javadoc) {
excludes = ['**/*.kt']
options.addBooleanOption('Xdoclint:none', true)
task javadocs(type: Javadoc) {
source = sourceSets.main.java.srcDirs
}

task javadocsJar(type: Jar, dependsOn: javadocs) {
archiveClassifier.set('javadoc')
from javadocs.destinationDir
}

apply from: '../spotless.gradle'
Expand Down

0 comments on commit e195da9

Please sign in to comment.