diff --git a/.idea/copyright/Apache_2___Google.xml b/.idea/copyright/Apache_2___Google.xml index a0bb219243a..39ebd9250d1 100644 --- a/.idea/copyright/Apache_2___Google.xml +++ b/.idea/copyright/Apache_2___Google.xml @@ -1,6 +1,6 @@ diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 21f3907f5f3..de7360476cd 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -48,7 +48,7 @@ dependencies { runtime 'io.opencensus:opencensus-impl:0.18.0' implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6' - implementation 'org.jetbrains.dokka:dokka-android-gradle-plugin:0.9.17-g004' + implementation 'org.jetbrains.dokka:dokka-android-gradle-plugin:0.9.17-g005' implementation 'com.android.tools.build:gradle:3.4.1' testImplementation 'junit:junit:4.12' diff --git a/buildSrc/src/main/groovy/com/google/firebase/gradle/plugins/Dokka.java b/buildSrc/src/main/groovy/com/google/firebase/gradle/plugins/Dokka.java new file mode 100644 index 00000000000..c2d7c055100 --- /dev/null +++ b/buildSrc/src/main/groovy/com/google/firebase/gradle/plugins/Dokka.java @@ -0,0 +1,179 @@ +// Copyright 2020 Google LLC +// +// 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. + +package com.google.firebase.gradle.plugins; + +import com.android.build.gradle.LibraryExtension; +import com.google.common.collect.ImmutableMap; +import java.io.File; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Collections; +import java.util.Optional; +import org.gradle.api.GradleException; +import org.gradle.api.Project; +import org.gradle.api.attributes.Attribute; +import org.gradle.api.file.FileCollection; +import org.gradle.api.file.RelativePath; +import org.gradle.api.tasks.Copy; +import org.jetbrains.dokka.DokkaConfiguration; +import org.jetbrains.dokka.gradle.DokkaAndroidTask; + +final class Dokka { + /** + * Configures the dokka task for a 'firebase-library'. + * + *

Configuration includes: + * + *

    + *
  1. Configure Metalava task for Java(non-Kotlin) libraries + *
  2. Configure Dokka with the DAC format and full classpath for symbol resolution + *
  3. Postprocessing of the produced Kotlindoc + *