Skip to content

Commit

Permalink
gradle doc
Browse files Browse the repository at this point in the history
  • Loading branch information
zj565061763 committed Oct 29, 2020
1 parent f5c558d commit 2e4d7f5
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,25 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.0.2'
}

// 指定编码
tasks.withType(Javadoc) {
options {
encoding "UTF-8"
encoding 'UTF-8'
charSet 'UTF-8'
failOnError false
}
}

// 打包源码
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
getArchiveClassifier().set('sources')
from android.sourceSets.main.java.sourceFiles
}

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

// 制作文档(Javadoc)
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
getArchiveClassifier().set('javadoc')
from javadoc.destinationDir
}

Expand Down

0 comments on commit 2e4d7f5

Please sign in to comment.