Skip to content

Commit

Permalink
lib支持javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Kale committed Apr 23, 2018
1 parent ade2e9e commit 5bb1aed
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ allprojects {
name 'Google'
}
}
}
}
24 changes: 24 additions & 0 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,27 @@ dependencies {
compileOnly 'com.android.databinding:baseLibrary:3.1.1'
compileOnly 'com.android.support:recyclerview-v7:27.1.1'
}

// build a jar with source files
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

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

// build a jar with javadoc
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives sourcesJar
archives javadocJar
}

0 comments on commit 5bb1aed

Please sign in to comment.