From a6182a75edb1e4828c6e31eb0393ab8629a8175f Mon Sep 17 00:00:00 2001 From: Pranav Pandey Date: Thu, 7 Dec 2023 19:45:03 +0530 Subject: [PATCH] Update external links for javadoc --- dynamic-dialogs/build.gradle | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/dynamic-dialogs/build.gradle b/dynamic-dialogs/build.gradle index 042c21e..67a8875 100644 --- a/dynamic-dialogs/build.gradle +++ b/dynamic-dialogs/build.gradle @@ -48,18 +48,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}

${versionDesc}

${mavenVersion}
" 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()) @@ -69,16 +72,18 @@ 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://pranavpandey.org/dynamic-utils') failOnError false }