From d20cad929c4c095fbc8a94e4d41938fa3fc39a0c Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" Date: Thu, 4 Jun 2020 09:23:20 +0200 Subject: Dokka Gradle Plugin: Reduce public API surface --- .../src/main/kotlin/org/jetbrains/dokka/gradle/ProxyUtils.kt | 6 +++--- .../src/main/kotlin/org/jetbrains/dokka/gradle/ReflectDsl.kt | 2 +- .../org/jetbrains/dokka/gradle/configurationImplementations.kt | 2 +- .../src/main/kotlin/org/jetbrains/dokka/gradle/main.kt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ProxyUtils.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ProxyUtils.kt index f8965993..85b6ea3b 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ProxyUtils.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ProxyUtils.kt @@ -13,7 +13,7 @@ import java.lang.reflect.Proxy * to create access proxy for [delegate] into [targetClassLoader]. */ @Suppress("UNCHECKED_CAST") -inline fun automagicTypedProxy(targetClassLoader: ClassLoader, delegate: Any): T = +internal inline fun automagicTypedProxy(targetClassLoader: ClassLoader, delegate: Any): T = automagicProxy(targetClassLoader, T::class.java, delegate) as T @@ -24,14 +24,14 @@ inline fun automagicTypedProxy(targetClassLoader: ClassLoader, * to create access proxy for [delegate] into [targetClassLoader]. * */ -fun automagicProxy(targetClassLoader: ClassLoader, targetType: Class<*>, delegate: Any): Any = +internal fun automagicProxy(targetClassLoader: ClassLoader, targetType: Class<*>, delegate: Any): Any = Proxy.newProxyInstance( targetClassLoader, arrayOf(targetType), DelegatedInvocationHandler(delegate) ) -class DelegatedInvocationHandler(private val delegate: Any) : InvocationHandler { +internal class DelegatedInvocationHandler(private val delegate: Any) : InvocationHandler { @Throws(Throwable::class) override fun invoke(proxy: Any, method: Method, args: Array?): Any? { diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ReflectDsl.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ReflectDsl.kt index 1984a3e5..4b511022 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ReflectDsl.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ReflectDsl.kt @@ -5,7 +5,7 @@ import kotlin.reflect.full.memberFunctions import kotlin.reflect.full.memberProperties import kotlin.reflect.jvm.isAccessible -object ReflectDsl { +internal object ReflectDsl { class CallOrPropAccess(private val receiver: Any?, private val clz: KClass<*>, diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt index 3e08d27d..152fa910 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt @@ -142,7 +142,7 @@ class GradlePackageOptionsImpl: PackageOptions, Serializable { override var suppress: Boolean = false } -fun GradlePassConfigurationImpl.copy(): GradlePassConfigurationImpl { +internal fun GradlePassConfigurationImpl.copy(): GradlePassConfigurationImpl { val newObj = GradlePassConfigurationImpl(this.name) this::class.memberProperties.forEach { field -> if (field is KMutableProperty<*>) { diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt index b62774f8..b7961b6e 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt @@ -109,7 +109,7 @@ object DokkaVersion { } } -object ClassloaderContainer { +internal object ClassloaderContainer { @JvmField var coreClassLoader: ClassLoader? = null } \ No newline at end of file -- cgit