diff options
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin/org/jetbrains')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt | 18 |
1 files changed, 2 insertions, 16 deletions
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 2b076fd0..92d63a40 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 @@ -5,9 +5,8 @@ import org.gradle.api.Project import org.gradle.api.artifacts.Configuration import org.gradle.api.attributes.Usage import org.gradle.util.GradleVersion +import org.jetbrains.dokka.DokkaVersion import java.io.File -import java.io.InputStream -import java.util.* internal const val SOURCE_SETS_EXTENSION_NAME = "dokkaSourceSets" internal const val DOKKA_TASK_NAME = "dokka" @@ -16,7 +15,6 @@ internal const val DOKKA_MULTIMODULE_TASK_NAME = "dokkaMultimodule" open class DokkaPlugin : Plugin<Project> { override fun apply(project: Project) { - loadDokkaVersion() val dokkaRuntimeConfiguration = addConfiguration(project) val pluginsConfiguration = project.configurations.create("dokkaPlugins").apply { dependencies.add(project.dependencies.create("org.jetbrains.dokka:dokka-base:${DokkaVersion.version}")) @@ -35,8 +33,6 @@ open class DokkaPlugin : Plugin<Project> { ) } - private fun loadDokkaVersion() = - DokkaVersion.loadFrom(javaClass.getResourceAsStream("/META-INF/gradle-plugins/org.jetbrains.dokka.properties")) private fun addConfiguration(project: Project) = project.configurations.create("dokkaRuntime").apply { @@ -99,17 +95,7 @@ open class DokkaPlugin : Plugin<Project> { } } -object DokkaVersion { - var version: String? = null - - fun loadFrom(stream: InputStream) { - version = Properties().apply { - load(stream) - }.getProperty("dokka-version") - } -} - internal object ClassloaderContainer { @JvmField var coreClassLoader: ClassLoader? = null -}
\ No newline at end of file +} |