diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2019-04-11 14:56:38 +0200 |
---|---|---|
committer | Kamil Doległo <kamilok1965@interia.pl> | 2019-04-11 14:56:38 +0200 |
commit | 64305246bf6a22a4111c11dc3c671297cf223393 (patch) | |
tree | acd0940b9fe9e212763c37dd86330c4e54097a43 /runners | |
parent | 5de1d68ca8510f7bc3601c3516ecb111f7abe44b (diff) | |
download | dokka-64305246bf6a22a4111c11dc3c671297cf223393.tar.gz dokka-64305246bf6a22a4111c11dc3c671297cf223393.tar.bz2 dokka-64305246bf6a22a4111c11dc3c671297cf223393.zip |
Remove dead code, create package, add comment
Diffstat (limited to 'runners')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ProxyUtils.kt (renamed from runners/gradle-plugin/src/main/kotlin/ProxyUtils.kt) | 4 | ||||
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt (renamed from runners/gradle-plugin/src/main/kotlin/configurationImplementations.kt) | 11 | ||||
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaTask.kt (renamed from runners/gradle-plugin/src/main/kotlin/dokkaTask.kt) | 4 | ||||
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt (renamed from runners/gradle-plugin/src/main/kotlin/main.kt) | 7 |
4 files changed, 11 insertions, 15 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/ProxyUtils.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ProxyUtils.kt index 7bdf2f9d..61c9e773 100644 --- a/runners/gradle-plugin/src/main/kotlin/ProxyUtils.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ProxyUtils.kt @@ -1,4 +1,4 @@ -package org.jetbrains.dokka +package org.jetbrains.dokka.gradle import java.lang.reflect.InvocationHandler import java.lang.reflect.InvocationTargetException @@ -28,7 +28,7 @@ fun automagicProxy(targetClassLoader: ClassLoader, targetType: Class<*>, delegat Proxy.newProxyInstance( targetClassLoader, arrayOf(targetType), - DelegatedInvocationHandler(delegate) + DelegatedInvocationHandler(delegate) ) class DelegatedInvocationHandler(private val delegate: Any) : InvocationHandler { diff --git a/runners/gradle-plugin/src/main/kotlin/configurationImplementations.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt index 3e9db147..bab36f29 100644 --- a/runners/gradle-plugin/src/main/kotlin/configurationImplementations.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt @@ -5,7 +5,6 @@ import org.gradle.api.Action import org.gradle.util.ConfigureUtil import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.Platform -import org.jetbrains.dokka.SourceLinkDefinitionImpl import java.io.File import java.io.Serializable import java.net.URL @@ -93,16 +92,6 @@ class GradleSourceLinkDefinitionImpl : DokkaConfiguration.SourceLinkDefinition { override var path: String = "" override var url: String = "" override var lineSuffix: String? = null - - companion object { - fun parseSourceLinkDefinition(srcLink: String): SourceLinkDefinitionImpl { - val (path, urlAndLine) = srcLink.split('=') - return SourceLinkDefinitionImpl( - File(path).canonicalPath, - urlAndLine.substringBefore("#"), - urlAndLine.substringAfter("#", "").let { if (it.isEmpty()) null else "#$it" }) - } - } } class GradleExternalDocumentationLinkImpl : DokkaConfiguration.ExternalDocumentationLink { diff --git a/runners/gradle-plugin/src/main/kotlin/dokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaTask.kt index 825830c5..0d78461c 100644 --- a/runners/gradle-plugin/src/main/kotlin/dokkaTask.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaTask.kt @@ -15,7 +15,6 @@ import org.jetbrains.dokka.DokkaBootstrap import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.ReflectDsl import org.jetbrains.dokka.ReflectDsl.isNotInstance -import org.jetbrains.dokka.automagicTypedProxy import java.io.File import java.io.Serializable import java.net.URLClassLoader @@ -179,7 +178,8 @@ open class DokkaTask : DefaultTask() { val bootstrapClass = ClassloaderContainer.fatJarClassLoader!!.loadClass("org.jetbrains.dokka.DokkaBootstrapImpl") val bootstrapInstance = bootstrapClass.constructors.first().newInstance() - val bootstrapProxy: DokkaBootstrap = automagicTypedProxy(javaClass.classLoader, bootstrapInstance) + val bootstrapProxy: DokkaBootstrap = + automagicTypedProxy(javaClass.classLoader, bootstrapInstance) val gson = GsonBuilder().setPrettyPrinting().create() diff --git a/runners/gradle-plugin/src/main/kotlin/main.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt index dd216f89..defddd31 100644 --- a/runners/gradle-plugin/src/main/kotlin/main.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt @@ -6,6 +6,13 @@ import java.io.File import java.io.InputStream import java.util.* +/* +* Those are extension names, which are used in a build.gradle file as closure names: +* dokka { +* configuration { <- extension name +* } +* } +* */ internal const val CONFIGURATION_EXTENSION_NAME = "configuration" internal const val MULTIPLATFORM_EXTENSION_NAME = "multiplatform" |