Skip to content

Commit

Permalink
Update external links for javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavpandey committed Dec 7, 2023
1 parent 0b0a889 commit f2993cd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
30 changes: 20 additions & 10 deletions dynamic-support/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,21 @@ if (project.rootProject.file("${publication}").exists()) {
apply from: 'maven.gradle'
}

task generateJavadoc() {
tasks.register('generateJavadoc') {
description "Generates Javadoc."
}

project.afterEvaluate {
android.libraryVariants.all { variant ->
def task = project.tasks.create("generate${variant.name.capitalize()}Javadoc", Javadoc) {
android.libraryVariants.configureEach { variant ->
def task = project.tasks.create(
"generate${variant.name.capitalize()}Javadoc", Javadoc) {
title "${referenceTitle}<h4>${versionDesc}</h4><h5>${mavenVersion}</h5>"
description "Generates Javadoc for $variant.name."
destinationDir = new File(destinationDir, variant.baseName)

source = variant.sourceSets.collect { it.java.sourceFiles }.inject { m, i -> m + i }
source = variant.sourceSets.collect {
it.java.sourceFiles }.inject { m, i -> m + i
}
doFirst {
classpath = project.files(variant.javaCompileProvider.get().classpath.files,
project.android.getBootClasspath())
Expand All @@ -83,16 +86,23 @@ project.afterEvaluate {
options.addStringOption('Xdoclint:none', '-quiet')
}

options.memberLevel = JavadocMemberLevel.PROTECTED
exclude "**/R", "**/R.**", "**/R\$**", "**/BuildConfig*"

if (JavaVersion.current().isJava8Compatible()) {
options.addStringOption('Xdoclint:none', '-quiet')
}

options.windowTitle = "${referenceTitle}"
options.links('http://docs.oracle.com/javase/8/docs/api')
options.links('http://docs.oracle.com/javase/8/docs/api',
'http://docs.oracle.com/javase/17/docs/api')
options.links('https://developer.android.com/reference')
options.memberLevel = JavadocMemberLevel.PROTECTED
options.linksOffline('https://developer.android.com/reference',
'https://developer.android.com/reference/androidx')
options.linksOffline('https://developer.android.com/reference',
'https://developer.android.com/reference/com/google/android/material')
options.links('https://javadoc.io/doc/com.google.code.gson/gson/latest')
options.links('https://pranavpandey.org/dynamic-utils')
options.links('https://pranavpandey.org/dynamic-theme')
options.links('https://pranavpandey.org/dynamic-locale')
options.links('https://pranavpandey.org/dynamic-preferences')
options.links('https://pranavpandey.org/dynamic-toasts')

failOnError false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
* A {@link DynamicThemePreference} to display the night theme settings.
* <p>It will automatically set the theme type to night.
*
* @see Theme#NIGHT
* @see com.pranavpandey.android.dynamic.theme.AppTheme#setType(int)
*
* <p>It will automatically adjust the values according to the available API.
* <p>{@link Theme.Night#BATTERY} will be available for API 21 and above.
* <p>{@link Theme.Night#SYSTEM} will be available for API 28 and above.
*
* @see Theme#NIGHT
* @see com.pranavpandey.android.dynamic.theme.AppTheme#setType(int)
*/
public class DynamicNightThemePreference extends DynamicThemePreference {

Expand Down

0 comments on commit f2993cd

Please sign in to comment.