summaryrefslogtreecommitdiffhomepage
path: root/tunnel/publish.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'tunnel/publish.gradle')
-rw-r--r--tunnel/publish.gradle28
1 files changed, 21 insertions, 7 deletions
diff --git a/tunnel/publish.gradle b/tunnel/publish.gradle
index 064a901b..f8d086f8 100644
--- a/tunnel/publish.gradle
+++ b/tunnel/publish.gradle
@@ -52,11 +52,25 @@ bintray {
}
}
-task sourcesJar(type: Jar) {
- from android.sourceSets.main.java.srcDirs
- archiveClassifier = 'sources'
-}
-
-artifacts {
- archives sourcesJar
+android.libraryVariants.all { variant ->
+ if (variant.name == 'release') {
+ task javadoc(type: Javadoc) {
+ source = variant.javaCompiler.source
+ classpath = files((android.bootClasspath.join(File.pathSeparator)))
+ classpath += variant.javaCompiler.classpath
+ title = 'Embeddable WireGuard Tunnel for Android v$wireguardVersionName'
+ }
+ task javadocJar(type: Jar, dependsOn: javadoc) {
+ archiveClassifier = 'javadoc'
+ from javadoc.destinationDir
+ }
+ task sourcesJar(type: Jar) {
+ archiveClassifier = 'sources'
+ from android.sourceSets.main.java.srcDirs
+ }
+ artifacts {
+ archives sourcesJar
+ archives javadocJar
+ }
+ }
}