[Android] Generate Javadoc for all libs

Geoffrey Métais git at videolan.org
Fri Dec 7 14:11:07 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Nov 27 10:26:09 2018 +0100| [e38bf6a1648a22f0d876d29f3129181f540143f3] | committer: Geoffrey Métais

Generate Javadoc for all libs

> https://code.videolan.org/videolan/vlc-android/commit/e38bf6a1648a22f0d876d29f3129181f540143f3
---

 libvlc/build.gradle       | 21 ---------------------
 medialibrary/build.gradle |  5 -----
 publish.gradle            | 11 +++++++++++
 3 files changed, 11 insertions(+), 26 deletions(-)

diff --git a/libvlc/build.gradle b/libvlc/build.gradle
index fd64983bc..c6c3cf9c5 100644
--- a/libvlc/build.gradle
+++ b/libvlc/build.gradle
@@ -50,22 +50,6 @@ android {
     }
 }
 
-task generateSources (type: Jar) {
-    classifier = 'sources'
-    from android.sourceSets.main.java.srcDirs
-}
-
-task javadoc(type: Javadoc) {
-    source = android.sourceSets.main.java.srcDirs
-    classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
-    failOnError false
-}
-
-task javadocJar(type: Jar, dependsOn: javadoc) {
-    classifier = 'javadoc'
-    from javadoc.destinationDir
-}
-
 clean {
     delete 'build', 'jni/libs', 'jni/obj'
 }
@@ -75,9 +59,4 @@ dependencies {
     api "androidx.legacy:legacy-support-v4:$rootProject.ext.androidxVersion"
 }
 
-artifacts {
-    archives javadocJar
-    archives generateSources
-}
-
 apply from: '../publish.gradle'
diff --git a/medialibrary/build.gradle b/medialibrary/build.gradle
index 4c0836b64..16fb5b6bc 100644
--- a/medialibrary/build.gradle
+++ b/medialibrary/build.gradle
@@ -83,11 +83,6 @@ android {
     }
 }
 
-task generateSources (type: Jar) {
-    classifier = 'sources'
-    from android.sourceSets.main.java.srcDirs
-}
-
 clean {
     delete 'build', 'jni/libs', 'jni/obj'
 }
diff --git a/publish.gradle b/publish.gradle
index 7943a71fb..cd5550d59 100644
--- a/publish.gradle
+++ b/publish.gradle
@@ -15,7 +15,18 @@ task sourcesJar(type: Jar) {
     classifier = 'sources'
 }
 
+task javadoc(type: Javadoc) {
+    source = android.sourceSets.main.java.srcDirs
+    classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
+}
+
+task javadocJar(type: Jar, dependsOn: javadoc) {
+    classifier = 'javadoc'
+    from javadoc.destinationDir
+}
+
 artifacts {
+    archives javadocJar
     archives sourcesJar
 }
 



More information about the Android mailing list