diff options
Diffstat (limited to 'runners/android-gradle-plugin')
-rw-r--r-- | runners/android-gradle-plugin/build.gradle | 9 | ||||
-rw-r--r-- | runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt | 8 |
2 files changed, 14 insertions, 3 deletions
diff --git a/runners/android-gradle-plugin/build.gradle b/runners/android-gradle-plugin/build.gradle index 5050fd87..72d1be9e 100644 --- a/runners/android-gradle-plugin/build.gradle +++ b/runners/android-gradle-plugin/build.gradle @@ -1,3 +1,4 @@ +import com.gradle.publish.DependenciesBuilder import org.jetbrains.CorrectShadowPublishing apply plugin: 'java' @@ -13,7 +14,7 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { kotlinOptions { freeCompilerArgs += "-Xjsr305=strict" languageVersion = "1.2" - apiVersion = "1.0" + apiVersion = "1.1" jvmTarget = "1.8" } } @@ -87,6 +88,12 @@ pluginBundle { } } + withDependencies { List<Dependency> list -> + list.clear() + def builder = new DependenciesBuilder() + builder.addUniqueScopedDependencies(list, configurations.shadow, "compile") + } + mavenCoordinates { groupId = "org.jetbrains.dokka" artifactId = "dokka-android-gradle-plugin" diff --git a/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt b/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt index f2261120..bd2e88c2 100644 --- a/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt +++ b/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt @@ -23,8 +23,12 @@ open class DokkaAndroidTask : DokkaTask() { @Input var noAndroidSdkLink: Boolean = false override fun collectSuppressedFiles(sourceRoots: List<SourceRoot>): List<String> { - val generatedSubpath = "${project.buildDir}/generated/source".replace("/", File.separator) - return sourceRoots.filter { generatedSubpath in it.path }.flatMap { File(it.path).walk().toList() }.map { it.absolutePath } + val generatedRoot = project.buildDir.resolve("generated").absoluteFile + return sourceRoots + .map { File(it.path) } + .filter { it.startsWith(generatedRoot) } + .flatMap { it.walk().toList() } + .map { it.absolutePath } } init { |