diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2019-08-22 16:04:19 +0200 |
---|---|---|
committer | Kamil Doległo <kamilok1965@interia.pl> | 2019-08-22 16:04:19 +0200 |
commit | 1c4a3c6b21846271bcdba3818ba323d1b0bb096f (patch) | |
tree | fa3a5e40d879bd1dbb284c69cee1b418f5044021 /runners/android-gradle-plugin/src/main/kotlin/AndroidConfigurationExtractor.kt | |
parent | e224c709692adf450786e16e245b4574a480cdab (diff) | |
download | dokka-1c4a3c6b21846271bcdba3818ba323d1b0bb096f.tar.gz dokka-1c4a3c6b21846271bcdba3818ba323d1b0bb096f.tar.bz2 dokka-1c4a3c6b21846271bcdba3818ba323d1b0bb096f.zip |
Merge Android plugin into Gradle plugin
Diffstat (limited to 'runners/android-gradle-plugin/src/main/kotlin/AndroidConfigurationExtractor.kt')
-rw-r--r-- | runners/android-gradle-plugin/src/main/kotlin/AndroidConfigurationExtractor.kt | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/runners/android-gradle-plugin/src/main/kotlin/AndroidConfigurationExtractor.kt b/runners/android-gradle-plugin/src/main/kotlin/AndroidConfigurationExtractor.kt deleted file mode 100644 index 8a2a2dff..00000000 --- a/runners/android-gradle-plugin/src/main/kotlin/AndroidConfigurationExtractor.kt +++ /dev/null @@ -1,32 +0,0 @@ -package org.jetbrains.dokka.gradle - -import com.android.build.gradle.* -import com.android.build.gradle.api.BaseVariant -import com.android.builder.core.BuilderConstants -import org.gradle.api.Project - -class AndroidConfigurationExtractor(private val project: Project): AbstractConfigurationExtractor(project) { - override fun getMainCompilationName(): String = getVariants(project).filter { it.name == BuilderConstants.RELEASE }.map { it.name }.first() - - private fun getVariants(project: Project): Set<BaseVariant> { - val androidExtension = project.extensions.getByName("android") - return when (androidExtension) { - is AppExtension -> androidExtension.applicationVariants.toSet() - is LibraryExtension -> { - androidExtension.libraryVariants.toSet() + - if (androidExtension is FeatureExtension) { - androidExtension.featureVariants.toSet() - } else { - emptySet<BaseVariant>() - } - } - is TestExtension -> androidExtension.applicationVariants.toSet() - else -> emptySet() - } + - if (androidExtension is TestedExtension) { - androidExtension.testVariants.toSet() + androidExtension.unitTestVariants.toSet() - } else { - emptySet<BaseVariant>() - } - } -}
\ No newline at end of file |