Commit 88e74ef3 by olly Committed by Oliver Woodman

Generate Javadoc for each module individually

Notes:
- The VP9 one is failing claiming that the util package
  doesn't exist and that LibraryLoader cannot be found.
  Unsure why, since it appears to be setup exactly like
  other extensions (e.g. Opus) that does work.
- @link across modules will not work when generating
  Javadoc for a single module. This is WAI. I subsequent
  change will add an aggregated Javadoc generator that
  will generate Javadoc for all modules together and
  apply cross module @link correctly.

Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150864273
parent 7ce81251
...@@ -39,3 +39,8 @@ dependencies { ...@@ -39,3 +39,8 @@ dependencies {
androidTestCompile project(':library') androidTestCompile project(':library')
androidTestCompile 'com.android.support.test:runner:0.5' androidTestCompile 'com.android.support.test:runner:0.5'
} }
ext {
javadocTitle = 'Cronet extension'
}
apply from: '../../library_javadoc.gradle'
...@@ -32,3 +32,8 @@ android { ...@@ -32,3 +32,8 @@ android {
dependencies { dependencies {
compile project(':library-core') compile project(':library-core')
} }
ext {
javadocTitle = 'FFmpeg extension'
}
apply from: '../../library_javadoc.gradle'
...@@ -34,3 +34,7 @@ dependencies { ...@@ -34,3 +34,7 @@ dependencies {
androidTestCompile project(':testutils') androidTestCompile project(':testutils')
} }
ext {
javadocTitle = 'FLAC extension'
}
apply from: '../../library_javadoc.gradle'
...@@ -29,6 +29,11 @@ dependencies { ...@@ -29,6 +29,11 @@ dependencies {
} }
ext { ext {
javadocTitle = 'GVR extension'
}
apply from: '../../library_javadoc.gradle'
ext {
releaseArtifact = 'extension-gvr' releaseArtifact = 'extension-gvr'
releaseDescription = 'Google VR extension for ExoPlayer.' releaseDescription = 'Google VR extension for ExoPlayer.'
} }
......
...@@ -36,6 +36,11 @@ dependencies { ...@@ -36,6 +36,11 @@ dependencies {
} }
ext { ext {
javadocTitle = 'OkHttp extension'
}
apply from: '../../library_javadoc.gradle'
ext {
releaseArtifact = 'extension-okhttp' releaseArtifact = 'extension-okhttp'
releaseDescription = 'OkHttp extension for ExoPlayer.' releaseDescription = 'OkHttp extension for ExoPlayer.'
} }
......
...@@ -32,3 +32,8 @@ android { ...@@ -32,3 +32,8 @@ android {
dependencies { dependencies {
compile project(':library-core') compile project(':library-core')
} }
ext {
javadocTitle = 'Opus extension'
}
apply from: '../../library_javadoc.gradle'
...@@ -33,3 +33,7 @@ dependencies { ...@@ -33,3 +33,7 @@ dependencies {
compile project(':library-core') compile project(':library-core')
} }
ext {
javadocTitle = 'VP9 extension'
}
apply from: '../../library_javadoc.gradle'
...@@ -33,39 +33,6 @@ dependencies { ...@@ -33,39 +33,6 @@ dependencies {
compile project(':library-ui') compile project(':library-ui')
} }
android.libraryVariants.all { variant ->
def name = variant.buildType.name
if (name.equals(BuilderConstants.DEBUG)) {
return; // Skip debug builds.
}
def task = project.tasks.create "jar${name.capitalize()}", Jar
task.dependsOn variant.javaCompile
task.from variant.javaCompile.destinationDir
artifacts.add('archives', task);
}
android.libraryVariants.all { variant ->
task("generate${variant.name.capitalize()}Javadoc", type: Javadoc) {
title = "ExoPlayer library"
description "Generates Javadoc for $variant.name."
source = variant.javaCompile.source
classpath = files(variant.javaCompile.classpath.files, project.android.getBootClasspath())
options {
links "http://docs.oracle.com/javase/7/docs/api/"
linksOffline "https://developer.android.com/reference","${android.sdkDirectory}/docs/reference"
encoding = 'UTF-8'
}
exclude '**/BuildConfig.java'
exclude '**/R.java'
doLast {
copy {
from "src/main/javadoc"
into "$buildDir/docs/javadoc"
}
}
}
}
ext { ext {
releaseArtifact = 'exoplayer' releaseArtifact = 'exoplayer'
releaseDescription = 'The ExoPlayer library (all modules).' releaseDescription = 'The ExoPlayer library (all modules).'
......
...@@ -46,6 +46,11 @@ dependencies { ...@@ -46,6 +46,11 @@ dependencies {
} }
ext { ext {
javadocTitle = 'Core'
}
apply from: '../../library_javadoc.gradle'
ext {
releaseArtifact = 'exoplayer-core' releaseArtifact = 'exoplayer-core'
releaseDescription = 'The ExoPlayer library core module.' releaseDescription = 'The ExoPlayer library core module.'
} }
......
...@@ -38,6 +38,11 @@ dependencies { ...@@ -38,6 +38,11 @@ dependencies {
} }
ext { ext {
javadocTitle = 'DASH'
}
apply from: '../../library_javadoc.gradle'
ext {
releaseArtifact = 'exoplayer-dash' releaseArtifact = 'exoplayer-dash'
releaseDescription = 'The ExoPlayer library DASH module.' releaseDescription = 'The ExoPlayer library DASH module.'
} }
......
...@@ -32,6 +32,11 @@ dependencies { ...@@ -32,6 +32,11 @@ dependencies {
} }
ext { ext {
javadocTitle = 'HLS'
}
apply from: '../../library_javadoc.gradle'
ext {
releaseArtifact = 'exoplayer-hls' releaseArtifact = 'exoplayer-hls'
releaseDescription = 'The ExoPlayer library HLS module.' releaseDescription = 'The ExoPlayer library HLS module.'
} }
......
...@@ -38,6 +38,11 @@ dependencies { ...@@ -38,6 +38,11 @@ dependencies {
} }
ext { ext {
javadocTitle = 'SmoothStreaming'
}
apply from: '../../library_javadoc.gradle'
ext {
releaseArtifact = 'exoplayer-smoothstreaming' releaseArtifact = 'exoplayer-smoothstreaming'
releaseDescription = 'The ExoPlayer library SmoothStreaming module.' releaseDescription = 'The ExoPlayer library SmoothStreaming module.'
} }
......
...@@ -29,6 +29,11 @@ dependencies { ...@@ -29,6 +29,11 @@ dependencies {
} }
ext { ext {
javadocTitle = 'UI'
}
apply from: '../../library_javadoc.gradle'
ext {
releaseArtifact = 'exoplayer-ui' releaseArtifact = 'exoplayer-ui'
releaseDescription = 'The ExoPlayer library UI module.' releaseDescription = 'The ExoPlayer library UI module.'
} }
......
// Copyright (C) 2017 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
android.libraryVariants.all { variant ->
task("generate${variant.name.capitalize()}Javadoc", type: Javadoc) {
description "Generates Javadoc for $variant.name."
title = javadocTitle
source = variant.javaCompile.source
classpath = files(variant.javaCompile.classpath.files, project.android.getBootClasspath())
options {
links "http://docs.oracle.com/javase/7/docs/api/"
linksOffline "https://developer.android.com/reference","${android.sdkDirectory}/docs/reference"
encoding = 'UTF-8'
}
exclude '**/BuildConfig.java'
exclude '**/R.java'
doLast {
copy {
from "src/main/javadoc"
into "$buildDir/docs/javadoc"
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment