aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-06-04 09:23:20 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-06-16 10:37:58 +0200
commitd20cad929c4c095fbc8a94e4d41938fa3fc39a0c (patch)
tree69d76cc2d08769564fc053c6aba5624a92bf848c
parentee425e0b1e39245f5e1106bbb0888e557e6fbfcd (diff)
downloaddokka-d20cad929c4c095fbc8a94e4d41938fa3fc39a0c.tar.gz
dokka-d20cad929c4c095fbc8a94e4d41938fa3fc39a0c.tar.bz2
dokka-d20cad929c4c095fbc8a94e4d41938fa3fc39a0c.zip
Dokka Gradle Plugin: Reduce public API surface
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ProxyUtils.kt6
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ReflectDsl.kt2
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt2
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt2
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 <reified T : Any> automagicTypedProxy(targetClassLoader: ClassLoader, delegate: Any): T =
+internal inline fun <reified T : Any> automagicTypedProxy(targetClassLoader: ClassLoader, delegate: Any): T =
automagicProxy(targetClassLoader, T::class.java, delegate) as T
@@ -24,14 +24,14 @@ inline fun <reified T : Any> 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?>?): 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