diff options
author | sebastian.sellmair <sebastian.sellmair@jetbrains.com> | 2020-07-01 16:38:56 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-07-02 12:48:53 +0200 |
commit | 2e02e56818609c683f95ba4f17fa749eb9e1c705 (patch) | |
tree | 53c1ccadcb26f651dec20ed7874db202081fc825 /runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka | |
parent | badd2d7e4bfad519f31b69ae9c1bea5659f3c59b (diff) | |
download | dokka-2e02e56818609c683f95ba4f17fa749eb9e1c705.tar.gz dokka-2e02e56818609c683f95ba4f17fa749eb9e1c705.tar.bz2 dokka-2e02e56818609c683f95ba4f17fa749eb9e1c705.zip |
runner:gradle-plugin: Apply `java-gradle-plugin`
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka')
-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 +} |