@@ -70,29 +70,31 @@ abstract class DackkaPlugin : Plugin<Project> {
70
70
71
71
private fun registerGenerateDackkaDocumentationTask (project : Project ) =
72
72
project.tasks.register<GenerateDocumentationTask >(" generateDackkaDocumentation" ) {
73
- project.extensions.getByType<LibraryExtension >().libraryVariants.all {
74
- if (name == " release" ) {
75
- mustRunAfter(" createFullJarRelease" )
76
- dependsOn(" createFullJarRelease" )
77
-
78
- val classpath = project.provider {
79
- runtimeConfiguration.getJars() + project.javadocConfig.getJars() + project.bootClasspath
80
- }
81
-
82
- val sourcesForJava = sourceSets.flatMap {
83
- it.javaDirectories.map { it.absoluteFile } + projectSpecificSources(project)
73
+ with (project.extensions.getByType<LibraryExtension >()) {
74
+ libraryVariants.all {
75
+ if (name == " release" ) {
76
+ mustRunAfter(" createFullJarRelease" )
77
+ dependsOn(" createFullJarRelease" )
78
+
79
+ val classpath = project.provider {
80
+ runtimeConfiguration.getJars() + project.javadocConfig.getJars() + bootClasspath
81
+ }
82
+
83
+ val sourcesForJava = sourceSets.flatMap {
84
+ it.javaDirectories.map { it.absoluteFile } + projectSpecificSources(project)
85
+ }
86
+
87
+ // this will become useful with the agp upgrade, as they're separate in 7.x+
88
+ val sourcesForKotlin = emptyList<File >()
89
+ val excludedFiles = emptyList<File >() + projectSpecificSuppressedFiles(project)
90
+
91
+ dependencies.set(classpath)
92
+ javaSources.set(sourcesForJava)
93
+ kotlinSources.set(sourcesForKotlin)
94
+ suppressedFiles.set(excludedFiles)
95
+
96
+ applyCommonConfigurations()
84
97
}
85
-
86
- // this will become useful with the agp upgrade, as they're separate in 7.x+
87
- val sourcesForKotlin = emptyList<File >()
88
- val excludedFiles = emptyList<File >() + projectSpecificSuppressedFiles(project)
89
-
90
- dependencies.set(classpath)
91
- javaSources.set(sourcesForJava)
92
- kotlinSources.set(sourcesForKotlin)
93
- suppressedFiles.set(excludedFiles)
94
-
95
- applyCommonConfigurations()
96
98
}
97
99
}
98
100
}
0 commit comments