From 8f32ef92be19c88f1a26d3ce19f77c9e1d053d8d Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Mon, 29 Oct 2018 17:51:48 +0300 Subject: Fix gradle integration test data --- runners/gradle-integration-tests/testData/androidApp/fileTree.txt | 1 + .../testData/androidMultiFlavourApp/fileTree.txt | 2 ++ 2 files changed, 3 insertions(+) (limited to 'runners/gradle-integration-tests/testData') diff --git a/runners/gradle-integration-tests/testData/androidApp/fileTree.txt b/runners/gradle-integration-tests/testData/androidApp/fileTree.txt index 3827b69e..f66c79e3 100644 --- a/runners/gradle-integration-tests/testData/androidApp/fileTree.txt +++ b/runners/gradle-integration-tests/testData/androidApp/fileTree.txt @@ -9,6 +9,7 @@ -init-.html index.html on-create-options-menu.html + on-create.html -kotlin-activity/ -init-.html index.html diff --git a/runners/gradle-integration-tests/testData/androidMultiFlavourApp/fileTree.txt b/runners/gradle-integration-tests/testData/androidMultiFlavourApp/fileTree.txt index 5e969d8b..77b563b2 100644 --- a/runners/gradle-integration-tests/testData/androidMultiFlavourApp/fileTree.txt +++ b/runners/gradle-integration-tests/testData/androidMultiFlavourApp/fileTree.txt @@ -10,6 +10,7 @@ -init-.html index.html on-create-options-menu.html + on-create.html -kotlin-activity/ -init-.html index.html @@ -35,6 +36,7 @@ -init-.html index.html on-create-options-menu.html + on-create.html -kotlin-activity/ -init-.html index.html -- cgit From fa6e8ab0b0a846192d46cf9d13a0e4f01262432f Mon Sep 17 00:00:00 2001 From: Paul Merlin Date: Sat, 15 Sep 2018 15:45:15 +0200 Subject: Add integration test for type safe configuration by leveraging Groovy's @CompileStatic Signed-off-by: Paul Merlin --- .../dokka/gradle/TypeSafeConfigurationTest.kt | 38 ++++++++++++++++ .../testData/typeSafeConfiguration/build.gradle | 53 ++++++++++++++++++++++ .../testData/typeSafeConfiguration/settings.gradle | 1 + 3 files changed, 92 insertions(+) create mode 100644 runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/TypeSafeConfigurationTest.kt create mode 100644 runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle create mode 100644 runners/gradle-integration-tests/testData/typeSafeConfiguration/settings.gradle (limited to 'runners/gradle-integration-tests/testData') diff --git a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/TypeSafeConfigurationTest.kt b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/TypeSafeConfigurationTest.kt new file mode 100644 index 00000000..ab8bc62b --- /dev/null +++ b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/TypeSafeConfigurationTest.kt @@ -0,0 +1,38 @@ +package org.jetbrains.dokka.gradle + +import org.gradle.testkit.runner.TaskOutcome +import org.junit.Test +import org.junit.runner.RunWith +import org.junit.runners.Parameterized +import kotlin.test.assertEquals + +@RunWith(Parameterized::class) +class TypeSafeConfigurationTest(private val testCase: TestCase) : AbstractDokkaGradleTest() { + + data class TestCase(val gradleVersion: String, val kotlinVersion: String) { + override fun toString(): String = "Gradle $gradleVersion and Kotlin $kotlinVersion" + } + + companion object { + @Parameterized.Parameters(name = "{0}") + @JvmStatic + fun testCases() = listOf( + TestCase("4.0", "1.1.2"), + TestCase("4.5", "1.2.20"), + TestCase("4.10.1", "1.2.60") + ) + } + + @Test + fun test() { + testDataFolder.resolve("typeSafeConfiguration").toFile().copyRecursively(testProjectDir.root) + configure( + testCase.gradleVersion, + testCase.kotlinVersion, + arguments = arrayOf("help", "-s") + ).build().apply { + println(output) + assertEquals(TaskOutcome.SUCCESS, task(":help")?.outcome) + } + } +} \ No newline at end of file diff --git a/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle b/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle new file mode 100644 index 00000000..b5b09ff9 --- /dev/null +++ b/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle @@ -0,0 +1,53 @@ +import org.jetbrains.dokka.* +import org.jetbrains.dokka.gradle.* +import org.jetbrains.kotlin.gradle.tasks.* + +import groovy.transform.CompileStatic +import java.util.concurrent.Callable + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$test_kotlin_version" + } +} + +plugins { + id 'org.jetbrains.dokka' +} + +apply plugin: 'kotlin' + +@CompileStatic +def configureDokkaTypeSafely(Project project) { + project.tasks.withType(DokkaTask) { DokkaTask dokka -> + dokka.with { + moduleName = "some String" + outputFormat = "some String" + outputDirectory = "some String" + classpath = Collections.singleton(file("someClassDir")) + includes = Collections.emptyList() + linkMappings = new ArrayList() + samples = Collections.emptyList() + jdkVersion = 6 + sourceDirs = Collections. emptyList() + sourceRoots = new ArrayList() + dokkaFatJar = file("some File") + includeNonPublic = false + skipDeprecated = false + skipEmptyPackages = true + reportUndocumented = true + perPackageOptions = new ArrayList() + impliedPlatforms = Collections.emptyList() + externalDocumentationLinks = new ArrayList() + noStdlibLink = false + cacheRoot = null as String + languageVersion = null as String + apiVersion = null as String + } + } +} + +configureDokkaTypeSafely(project) diff --git a/runners/gradle-integration-tests/testData/typeSafeConfiguration/settings.gradle b/runners/gradle-integration-tests/testData/typeSafeConfiguration/settings.gradle new file mode 100644 index 00000000..be82e328 --- /dev/null +++ b/runners/gradle-integration-tests/testData/typeSafeConfiguration/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "type-safe-configuration" \ No newline at end of file -- cgit From 22700d015f552429af2806c767d716bf8613178c Mon Sep 17 00:00:00 2001 From: Paul Merlin Date: Sat, 15 Sep 2018 15:46:28 +0200 Subject: Add type safe counterparts to Closure taking methods on DokkaTask Signed-off-by: Paul Merlin --- .../testData/typeSafeConfiguration/build.gradle | 31 +++++++++++++ runners/gradle-plugin/src/main/kotlin/main.kt | 53 +++++++++++++++++----- 2 files changed, 72 insertions(+), 12 deletions(-) (limited to 'runners/gradle-integration-tests/testData') diff --git a/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle b/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle index b5b09ff9..6cab34c8 100644 --- a/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle +++ b/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle @@ -46,6 +46,37 @@ def configureDokkaTypeSafely(Project project) { cacheRoot = null as String languageVersion = null as String apiVersion = null as String + kotlinTasks(new Callable>() { + @Override + List call() { + return defaultKotlinTasks() + } + }) + linkMapping(new Action() { + @Override + void execute(LinkMapping mapping) { + mapping.dir = "some String" + mapping.url = "some String" + } + }) + sourceRoot(new Action() { + @Override + void execute(SourceRoot sourceRoot) { + sourceRoot.path = "some String" + } + }) + packageOptions(new Action() { + @Override + void execute(PackageOptions packageOptions) { + packageOptions.prefix = "some String" + } + }) + externalDocumentationLink(new Action() { + @Override + void execute(DokkaConfiguration.ExternalDocumentationLink.Builder builder) { + builder.url = uri("some URI").toURL() + } + }) } } } diff --git a/runners/gradle-plugin/src/main/kotlin/main.kt b/runners/gradle-plugin/src/main/kotlin/main.kt index d3a341e0..9130a329 100644 --- a/runners/gradle-plugin/src/main/kotlin/main.kt +++ b/runners/gradle-plugin/src/main/kotlin/main.kt @@ -1,6 +1,7 @@ package org.jetbrains.dokka.gradle import groovy.lang.Closure +import org.gradle.api.Action import org.gradle.api.DefaultTask import org.gradle.api.Plugin import org.gradle.api.Project @@ -147,14 +148,17 @@ open class DokkaTask : DefaultTask() { private var kotlinTasksConfigurator: () -> List? = { defaultKotlinTasks() } private val kotlinTasks: List by lazy { extractKotlinCompileTasks() } + fun kotlinTasks(taskSupplier: Callable>) { + kotlinTasksConfigurator = { taskSupplier.call() } + } + fun kotlinTasks(closure: Closure) { kotlinTasksConfigurator = { closure.call() as? List } } - fun linkMapping(closure: Closure) { + fun linkMapping(action: Action) { val mapping = LinkMapping() - closure.delegate = mapping - closure.call() + action.execute(mapping) if (mapping.path.isEmpty()) { throw IllegalArgumentException("Link mapping should have dir") @@ -166,27 +170,52 @@ open class DokkaTask : DefaultTask() { linkMappings.add(mapping) } - fun sourceRoot(closure: Closure) { + fun linkMapping(closure: Closure) { + linkMapping(Action { mapping -> + closure.delegate = mapping + closure.call() + }) + } + + fun sourceRoot(action: Action) { val sourceRoot = SourceRoot() - closure.delegate = sourceRoot - closure.call() + action.execute(sourceRoot) sourceRoots.add(sourceRoot) } - fun packageOptions(closure: Closure) { + fun sourceRoot(closure: Closure) { + sourceRoot(Action { sourceRoot -> + closure.delegate = sourceRoot + closure.call() + }) + } + + fun packageOptions(action: Action) { val packageOptions = PackageOptions() - closure.delegate = packageOptions - closure.call() + action.execute(packageOptions) perPackageOptions.add(packageOptions) } - fun externalDocumentationLink(closure: Closure) { + fun packageOptions(closure: Closure) { + packageOptions(Action { packageOptions -> + closure.delegate = packageOptions + closure.call() + }) + } + + fun externalDocumentationLink(action: Action) { val builder = DokkaConfiguration.ExternalDocumentationLink.Builder() - closure.delegate = builder - closure.call() + action.execute(builder) externalDocumentationLinks.add(builder.build()) } + fun externalDocumentationLink(closure: Closure) { + externalDocumentationLink(Action { builder -> + closure.delegate = builder + closure.call() + }) + } + fun tryResolveFatJar(project: Project): File { return try { val dependency = project.buildscript.dependencies.create(dokkaFatJar) -- cgit From 43ab42296520e8fba8d115ab1f6e3a9388f818d3 Mon Sep 17 00:00:00 2001 From: Paul Merlin Date: Sat, 15 Sep 2018 16:17:11 +0200 Subject: Remove spurious whitespace Signed-off-by: Paul Merlin --- .../testData/typeSafeConfiguration/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runners/gradle-integration-tests/testData') diff --git a/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle b/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle index 6cab34c8..923c07d8 100644 --- a/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle +++ b/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle @@ -32,7 +32,7 @@ def configureDokkaTypeSafely(Project project) { linkMappings = new ArrayList() samples = Collections.emptyList() jdkVersion = 6 - sourceDirs = Collections. emptyList() + sourceDirs = Collections.emptyList() sourceRoots = new ArrayList() dokkaFatJar = file("some File") includeNonPublic = false -- cgit From a32ce3282935b382f285f66c65484409d96328c7 Mon Sep 17 00:00:00 2001 From: Paul Merlin Date: Sat, 15 Sep 2018 16:34:04 +0200 Subject: Refine type safe configuration test Signed-off-by: Paul Merlin --- .../dokka/gradle/TypeSafeConfigurationTest.kt | 14 ++- .../testData/typeSafeConfiguration/build.gradle | 116 ++++++++++----------- 2 files changed, 64 insertions(+), 66 deletions(-) (limited to 'runners/gradle-integration-tests/testData') diff --git a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/TypeSafeConfigurationTest.kt b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/TypeSafeConfigurationTest.kt index ab8bc62b..7b179e92 100644 --- a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/TypeSafeConfigurationTest.kt +++ b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/TypeSafeConfigurationTest.kt @@ -1,10 +1,8 @@ package org.jetbrains.dokka.gradle -import org.gradle.testkit.runner.TaskOutcome import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized -import kotlin.test.assertEquals @RunWith(Parameterized::class) class TypeSafeConfigurationTest(private val testCase: TestCase) : AbstractDokkaGradleTest() { @@ -25,14 +23,14 @@ class TypeSafeConfigurationTest(private val testCase: TestCase) : AbstractDokkaG @Test fun test() { - testDataFolder.resolve("typeSafeConfiguration").toFile().copyRecursively(testProjectDir.root) + + testDataFolder.resolve("typeSafeConfiguration").toFile() + .copyRecursively(testProjectDir.root) + configure( testCase.gradleVersion, testCase.kotlinVersion, arguments = arrayOf("help", "-s") - ).build().apply { - println(output) - assertEquals(TaskOutcome.SUCCESS, task(":help")?.outcome) - } + ).build() } -} \ No newline at end of file +} diff --git a/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle b/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle index 923c07d8..327cead8 100644 --- a/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle +++ b/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle @@ -21,64 +21,64 @@ plugins { apply plugin: 'kotlin' @CompileStatic -def configureDokkaTypeSafely(Project project) { - project.tasks.withType(DokkaTask) { DokkaTask dokka -> - dokka.with { - moduleName = "some String" - outputFormat = "some String" - outputDirectory = "some String" - classpath = Collections.singleton(file("someClassDir")) - includes = Collections.emptyList() - linkMappings = new ArrayList() - samples = Collections.emptyList() - jdkVersion = 6 - sourceDirs = Collections.emptyList() - sourceRoots = new ArrayList() - dokkaFatJar = file("some File") - includeNonPublic = false - skipDeprecated = false - skipEmptyPackages = true - reportUndocumented = true - perPackageOptions = new ArrayList() - impliedPlatforms = Collections.emptyList() - externalDocumentationLinks = new ArrayList() - noStdlibLink = false - cacheRoot = null as String - languageVersion = null as String - apiVersion = null as String - kotlinTasks(new Callable>() { - @Override - List call() { - return defaultKotlinTasks() - } - }) - linkMapping(new Action() { - @Override - void execute(LinkMapping mapping) { - mapping.dir = "some String" - mapping.url = "some String" - } - }) - sourceRoot(new Action() { - @Override - void execute(SourceRoot sourceRoot) { - sourceRoot.path = "some String" - } - }) - packageOptions(new Action() { - @Override - void execute(PackageOptions packageOptions) { - packageOptions.prefix = "some String" - } - }) - externalDocumentationLink(new Action() { - @Override - void execute(DokkaConfiguration.ExternalDocumentationLink.Builder builder) { - builder.url = uri("some URI").toURL() - } - }) - } +def configureDokkaTypeSafely(DokkaTask dokka) { + dokka.with { + moduleName = "some String" + outputFormat = "some String" + outputDirectory = "some String" + classpath = Collections.singleton(file("someClassDir")) + includes = Collections.emptyList() + linkMappings = new ArrayList() + samples = Collections.emptyList() + jdkVersion = 6 + sourceDirs = Collections.emptyList() + sourceRoots = new ArrayList() + dokkaFatJar = file("some File") + includeNonPublic = false + skipDeprecated = false + skipEmptyPackages = true + reportUndocumented = true + perPackageOptions = new ArrayList() + impliedPlatforms = Collections.emptyList() + externalDocumentationLinks = new ArrayList() + noStdlibLink = false + cacheRoot = null as String + languageVersion = null as String + apiVersion = null as String + kotlinTasks(new Callable>() { + @Override + List call() { + return defaultKotlinTasks() + } + }) + linkMapping(new Action() { + @Override + void execute(LinkMapping mapping) { + mapping.dir = "some String" + mapping.url = "some String" + } + }) + sourceRoot(new Action() { + @Override + void execute(SourceRoot sourceRoot) { + sourceRoot.path = "some String" + } + }) + packageOptions(new Action() { + @Override + void execute(PackageOptions packageOptions) { + packageOptions.prefix = "some String" + } + }) + externalDocumentationLink(new Action() { + @Override + void execute(DokkaConfiguration.ExternalDocumentationLink.Builder builder) { + builder.url = uri("some URI").toURL() + } + }) } } -configureDokkaTypeSafely(project) +project.tasks.withType(DokkaTask) { dokka -> + configureDokkaTypeSafely(dokka) +} -- cgit From 9e2ca870881823498c8f65afda7bd9b77e575a2d Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Tue, 19 Feb 2019 16:08:12 +0300 Subject: Cleanup http --- .gitignore | 2 +- README.md | 8 ++-- build.gradle | 4 +- .../src/main/kotlin/Kotlin/DocumentationBuilder.kt | 2 +- core/src/test/kotlin/format/PackageDocsTest.kt | 2 +- core/src/test/kotlin/model/JavaTest.kt | 2 +- core/testdata/format/enumRef.md | 2 +- core/testdata/format/externalReferenceLink.kt | 2 +- core/testdata/format/externalReferenceLink.md | 4 +- core/testdata/format/inheritedLink.md | 2 +- core/testdata/format/jdkLinks.md | 8 ++-- core/testdata/format/markdownInLinks.html | 2 +- core/testdata/format/markdownInLinks.kt | 2 +- core/testdata/markdown/spec.txt | 52 +++++++++++----------- core/testdata/packagedocs/referenceLinks.kotlin.md | 5 +-- core/testdata/packagedocs/referenceLinks.md | 2 +- core/testdata/packagedocs/referenceLinks.module.md | 4 +- runners/android-gradle-plugin/build.gradle | 2 +- .../testData/androidApp/build.gradle | 4 +- .../testData/androidAppJavadoc/build.gradle | 4 +- .../testData/androidMultiFlavourApp/build.gradle | 4 +- .../testData/basic/build.gradle | 4 +- .../testData/multiProjectSingleOut/build.gradle | 4 +- .../testData/sourcesChange/build.gradle | 4 +- runners/gradle-plugin/build.gradle | 2 +- runners/maven-plugin/src/main/kotlin/DokkaMojo.kt | 2 +- 26 files changed, 67 insertions(+), 68 deletions(-) (limited to 'runners/gradle-integration-tests/testData') diff --git a/.gitignore b/.gitignore index fe5edc3b..59243df5 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,7 @@ buildNumber.properties *.war *.ear -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +# virtual machine crash logs, see https://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* ### JetBrains template # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm diff --git a/README.md b/README.md index 170ecfa6..341305fa 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -dokka [![official JetBrains project](http://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub) +dokka [![official JetBrains project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub) [![TeamCity (build status)](https://img.shields.io/teamcity/http/teamcity.jetbrains.com/s/Kotlin_Dokka_DokkaAntMavenGradle.svg)](https://teamcity.jetbrains.com/viewType.html?buildTypeId=Kotlin_Dokka_DokkaAntMavenGradle&branch_KotlinTools_Dokka=%3Cdefault%3E&tab=buildTypeStatusDiv) [ ![Download](https://api.bintray.com/packages/kotlin/dokka/dokka/images/download.svg) ](https://bintray.com/kotlin/dokka/dokka/_latestVersion) ===== @@ -52,7 +52,7 @@ dokka { } // List of files with module and package documentation - // http://kotlinlang.org/docs/reference/kotlin-doc.html#module-and-package-documentation + // https://kotlinlang.org/docs/reference/kotlin-doc.html#module-and-package-documentation includes = ['packages.md', 'extra.md'] // The list of files or directories containing sample code (referenced with @sample tags) @@ -250,7 +250,7 @@ The available configuration options are shown below: default - + packages.md extra.md @@ -297,7 +297,7 @@ The available configuration options are shown below: ${project.basedir}/src/main/kotlin - http://github.com/me/myrepo + https://github.com/me/myrepo #L diff --git a/build.gradle b/build.gradle index d282aeb0..0b5d5dbc 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ allprojects { repositories { mavenCentral() jcenter() - maven { url "http://dl.bintray.com/kotlin/kotlin-eap" } + maven { url "https://dl.bintray.com/kotlin/kotlin-eap" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } maven { url "https://plugins.gradle.org/m2/" } ivy(repo) @@ -30,7 +30,7 @@ allprojects { mavenCentral() mavenLocal() maven { url "https://dl.bintray.com/jetbrains/markdown" } - maven { url "http://dl.bintray.com/kotlin/kotlin-eap" } + maven { url "https://dl.bintray.com/kotlin/kotlin-eap" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } maven { url 'https://jitpack.io' } maven { url "https://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_dev_CompilerAllPlugins/$bundled_kotlin_compiler_version/maven" } diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt index aa35634d..38804e39 100644 --- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt +++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt @@ -74,7 +74,7 @@ class DocumentationOptions(val outputDir: String, val defaultLinks = run { val links = mutableListOf() if (!noJdkLink) - links += ExternalDocumentationLink.Builder("http://docs.oracle.com/javase/$jdkVersion/docs/api/").build() + links += ExternalDocumentationLink.Builder("https://docs.oracle.com/javase/$jdkVersion/docs/api/").build() if (!noStdlibLink) links += ExternalDocumentationLink.Builder("https://kotlinlang.org/api/latest/jvm/stdlib/").build() diff --git a/core/src/test/kotlin/format/PackageDocsTest.kt b/core/src/test/kotlin/format/PackageDocsTest.kt index b7fff1e2..3ff5f123 100644 --- a/core/src/test/kotlin/format/PackageDocsTest.kt +++ b/core/src/test/kotlin/format/PackageDocsTest.kt @@ -49,7 +49,7 @@ class PackageDocsTest { @Test fun testReferenceLinksInPackageDocs() { val mockLinkResolver = mock { - val exampleCom = "http://example.com" + val exampleCom = "https://example.com" on { tryResolveContentLink(any(), eq(exampleCom)) } doAnswer { ContentExternalLink(exampleCom) } } diff --git a/core/src/test/kotlin/model/JavaTest.kt b/core/src/test/kotlin/model/JavaTest.kt index 876d18c0..0bec6d01 100644 --- a/core/src/test/kotlin/model/JavaTest.kt +++ b/core/src/test/kotlin/model/JavaTest.kt @@ -150,7 +150,7 @@ public class JavaTest { /** * `@suppress` not supported in Java! * - * [Proposed tags](http://www.oracle.com/technetwork/java/javase/documentation/proposed-tags-142378.html) + * [Proposed tags](https://www.oracle.com/technetwork/java/javase/documentation/proposed-tags-142378.html) * Proposed tag `@exclude` for it, but not supported yet */ @Ignore("@suppress not supported in Java!") @Test fun suppressTag() { diff --git a/core/testdata/format/enumRef.md b/core/testdata/format/enumRef.md index 8b2a6650..f5f5a3e0 100644 --- a/core/testdata/format/enumRef.md +++ b/core/testdata/format/enumRef.md @@ -4,5 +4,5 @@ `fun f(): Unit` -[java.math.RoundingMode.UP](http://docs.oracle.com/javase/6/docs/api/java/math/RoundingMode.html#UP) +[java.math.RoundingMode.UP](https://docs.oracle.com/javase/6/docs/api/java/math/RoundingMode.html#UP) diff --git a/core/testdata/format/externalReferenceLink.kt b/core/testdata/format/externalReferenceLink.kt index 4ca0ee21..775b2e66 100644 --- a/core/testdata/format/externalReferenceLink.kt +++ b/core/testdata/format/externalReferenceLink.kt @@ -3,7 +3,7 @@ * * Sure, it is [example.com] * - * [example.com]: http://example.com + * [example.com]: https://example.com */ fun a() { diff --git a/core/testdata/format/externalReferenceLink.md b/core/testdata/format/externalReferenceLink.md index 38ffde78..3565d9aa 100644 --- a/core/testdata/format/externalReferenceLink.md +++ b/core/testdata/format/externalReferenceLink.md @@ -4,7 +4,7 @@ `fun a(): Unit` -It is link to [example site](http://example.com) +It is link to [example site](https://example.com) -Sure, it is [example.com](http://example.com) +Sure, it is [example.com](https://example.com) diff --git a/core/testdata/format/inheritedLink.md b/core/testdata/format/inheritedLink.md index e5af326c..aec07a75 100644 --- a/core/testdata/format/inheritedLink.md +++ b/core/testdata/format/inheritedLink.md @@ -13,5 +13,5 @@ Overrides [Foo.sayHello](../../p1/-foo/say-hello.md) -Says hello - [LinkedList](http://docs.oracle.com/javase/6/docs/api/java/util/LinkedList.html). +Says hello - [LinkedList](https://docs.oracle.com/javase/6/docs/api/java/util/LinkedList.html). diff --git a/core/testdata/format/jdkLinks.md b/core/testdata/format/jdkLinks.md index 7498171d..c3a5fbf4 100644 --- a/core/testdata/format/jdkLinks.md +++ b/core/testdata/format/jdkLinks.md @@ -2,13 +2,13 @@ # C -`class C : `[`ClassLoader`](http://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html) +`class C : `[`ClassLoader`](https://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html) -This is a [ClassLoader](http://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html) and I can get its [ClassLoader.getResource](http://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html#getResource(java.lang.String)) +This is a [ClassLoader](https://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html) and I can get its [ClassLoader.getResource](https://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html#getResource(java.lang.String)) -You can print something to [java.lang.System.out](http://docs.oracle.com/javase/6/docs/api/java/lang/System.html#out) now! +You can print something to [java.lang.System.out](https://docs.oracle.com/javase/6/docs/api/java/lang/System.html#out) now! ### Constructors -| [<init>](-init-.md) | `C()`
This is a [ClassLoader](http://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html) and I can get its [ClassLoader.getResource](http://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html#getResource(java.lang.String)) | +| [<init>](-init-.md) | `C()`
This is a [ClassLoader](https://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html) and I can get its [ClassLoader.getResource](https://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html#getResource(java.lang.String)) | diff --git a/core/testdata/format/markdownInLinks.html b/core/testdata/format/markdownInLinks.html index 596cca73..f0bb475e 100644 --- a/core/testdata/format/markdownInLinks.html +++ b/core/testdata/format/markdownInLinks.html @@ -9,6 +9,6 @@

foo

fun foo(): Unit -

abd kas

+

abd kas

diff --git a/core/testdata/format/markdownInLinks.kt b/core/testdata/format/markdownInLinks.kt index 67b6311f..380727ee 100644 --- a/core/testdata/format/markdownInLinks.kt +++ b/core/testdata/format/markdownInLinks.kt @@ -1,4 +1,4 @@ /** - * [a**b**__d__ kas ](http://www.ibm.com) + * [a**b**__d__ kas ](https://www.ibm.com) */ fun foo() {} diff --git a/core/testdata/markdown/spec.txt b/core/testdata/markdown/spec.txt index fce87924..916bdd89 100644 --- a/core/testdata/markdown/spec.txt +++ b/core/testdata/markdown/spec.txt @@ -23,7 +23,7 @@ HTML but in LaTeX and many other formats. ## Why is a spec needed? John Gruber's [canonical description of Markdown's -syntax](http://daringfireball.net/projects/markdown/syntax) +syntax](https://daringfireball.net/projects/markdown/syntax) does not specify the syntax unambiguously. Here are some examples of questions it does not answer: @@ -34,7 +34,7 @@ questions it does not answer: not require that. This is hardly a "corner case," and divergences between implementations on this issue often lead to surprises for users in real documents. (See [this comment by John - Gruber](http://article.gmane.org/gmane.text.markdown.general/1997).) + Gruber](https://article.gmane.org/gmane.text.markdown.general/1997).) 2. Is a blank line needed before a block quote or header? Most implementations do not require the blank line. However, @@ -42,7 +42,7 @@ questions it does not answer: also to ambiguities in parsing (note that some implementations put the header inside the blockquote, while others do not). (John Gruber has also spoken [in favor of requiring the blank - lines](http://article.gmane.org/gmane.text.markdown.general/2146).) + lines](https://article.gmane.org/gmane.text.markdown.general/2146).) 3. Is a blank line needed before an indented code block? (`Markdown.pl` requires it, but this is not mentioned in the @@ -75,7 +75,7 @@ questions it does not answer: ``` (There are some relevant comments by John Gruber - [here](http://article.gmane.org/gmane.text.markdown.general/2554).) + [here](https://article.gmane.org/gmane.text.markdown.general/2554).) 5. Can list markers be indented? Can ordered list markers be right-aligned? @@ -509,7 +509,7 @@ More than six `#` characters is not a header: A space is required between the `#` characters and the header's contents. Note that many implementations currently do not require the space. However, the space was required by the [original ATX -implementation](http://www.aaronsw.com/2002/atx/atx.py), and it helps +implementation](https://www.aaronsw.com/2002/atx/atx.py), and it helps prevent things like the following from being parsed as headers: . @@ -3686,9 +3686,9 @@ raw HTML: . . - + . -

http://google.com?find=\*

+

https://google.com?find=\*

. . @@ -3736,7 +3736,7 @@ and simplifies the job of implementations targetting other languages, as these w UTF8 chars and need not be HTML-entity aware. [Named entities](#name-entities) consist of `&` -+ any of the valid HTML5 entity names + `;`. The [following document](http://www.whatwg.org/specs/web-apps/current-work/multipage/entities.json) ++ any of the valid HTML5 entity names + `;`. The [following document](https://www.whatwg.org/specs/web-apps/current-work/multipage/entities.json) is used as an authoritative source of the valid entity names and their corresponding codepoints. Conforming implementations that target Markdown don't need to generate entities for all the valid @@ -3955,9 +3955,9 @@ And this is not parsed as a link: But this is a link: . -` +` . -

http://foo.bar.`baz`

+

https://foo.bar.`baz`

. And this is an HTML tag: @@ -3986,7 +3986,7 @@ we just have literal backticks: ## Emphasis and strong emphasis John Gruber's original [Markdown syntax -description](http://daringfireball.net/projects/markdown/syntax#em) says: +description](https://daringfireball.net/projects/markdown/syntax#em) says: > Markdown treats asterisks (`*`) and underscores (`_`) as indicators of > emphasis. Text wrapped with one `*` or `_` will be wrapped with an HTML @@ -4229,15 +4229,15 @@ _a `_`_ . . -**a +**a . -

**ahttp://foo.bar?q=**

+

**ahttps://foo.bar?q=**

. . -__a +__a . -

__ahttp://foo.bar?q=__

+

__ahttps://foo.bar?q=__

. This is not emphasis, because the opening delimiter is @@ -5455,15 +5455,15 @@ soap.beep`, `soap.beeps`, `tag`, `tel`, `telnet`, `tftp`, `thismessage`, Here are some valid autolinks: . - + . -

http://foo.bar.baz

+

https://foo.bar.baz

. . - + . -

http://foo.bar.baz?q=hello&id=22&boolean

+

https://foo.bar.baz?q=hello&id=22&boolean

. . @@ -5483,9 +5483,9 @@ Uppercase is also fine: Spaces are not allowed in autolinks: . - + . -

<http://foo.bar/baz bim>

+

<https://foo.bar/baz bim>

. An [email autolink](#email-autolink) @@ -5496,7 +5496,7 @@ and the URL is `mailto:` followed by the email address. An [email address](#email-address), for these purposes, is anything that matches the [non-normative regex from the HTML5 -spec](http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#e-mail-state-%28type=email%29): +spec](https://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#e-mail-state-%28type=email%29): /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])? (?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/ @@ -5530,9 +5530,9 @@ These are not autolinks: . . -< http://foo.bar > +< https://foo.bar > . -

< http://foo.bar >

+

< https://foo.bar >

. . @@ -5548,9 +5548,9 @@ These are not autolinks: . . -http://google.com +https://google.com . -

http://google.com

+

https://google.com

. . diff --git a/core/testdata/packagedocs/referenceLinks.kotlin.md b/core/testdata/packagedocs/referenceLinks.kotlin.md index ac7e4b48..f7b1edad 100644 --- a/core/testdata/packagedocs/referenceLinks.kotlin.md +++ b/core/testdata/packagedocs/referenceLinks.kotlin.md @@ -1,7 +1,6 @@ Core functions and types -See [ref](http://example.com) -Also, [example](http://example.com) +See [ref](https://example.com) +Also, [example](https://example.com) - \ No newline at end of file diff --git a/core/testdata/packagedocs/referenceLinks.md b/core/testdata/packagedocs/referenceLinks.md index 7583ee9d..177dea0c 100644 --- a/core/testdata/packagedocs/referenceLinks.md +++ b/core/testdata/packagedocs/referenceLinks.md @@ -14,4 +14,4 @@ See [ref] Also, [example][ref] -[ref]: http://example.com +[ref]: https://example.com diff --git a/core/testdata/packagedocs/referenceLinks.module.md b/core/testdata/packagedocs/referenceLinks.module.md index ddbdbe2f..08372175 100644 --- a/core/testdata/packagedocs/referenceLinks.module.md +++ b/core/testdata/packagedocs/referenceLinks.module.md @@ -4,6 +4,6 @@ The Kotlin standard library is a set of functions and types implementing idiomatic patterns when working with collections, text and files. -See [ref](http://example.com) -Also, [example](http://example.com) +See [ref](https://example.com) +Also, [example](https://example.com) diff --git a/runners/android-gradle-plugin/build.gradle b/runners/android-gradle-plugin/build.gradle index 72d1be9e..28b0cbb9 100644 --- a/runners/android-gradle-plugin/build.gradle +++ b/runners/android-gradle-plugin/build.gradle @@ -76,7 +76,7 @@ artifacts { } pluginBundle { - website = 'http://www.kotlinlang.org/' + website = 'https://www.kotlinlang.org/' vcsUrl = 'https://github.com/kotlin/dokka.git' description = 'Dokka, the Kotlin documentation tool' tags = ['dokka', 'kotlin', 'kdoc', 'android'] diff --git a/runners/gradle-integration-tests/testData/androidApp/build.gradle b/runners/gradle-integration-tests/testData/androidApp/build.gradle index 59477b52..35356b90 100644 --- a/runners/gradle-integration-tests/testData/androidApp/build.gradle +++ b/runners/gradle-integration-tests/testData/androidApp/build.gradle @@ -3,7 +3,7 @@ buildscript { mavenCentral() jcenter() maven { url 'https://maven.google.com' } - maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" } + maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } } dependencies { @@ -15,7 +15,7 @@ allprojects { repositories { mavenCentral() jcenter() - maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" } + maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } } } diff --git a/runners/gradle-integration-tests/testData/androidAppJavadoc/build.gradle b/runners/gradle-integration-tests/testData/androidAppJavadoc/build.gradle index 59477b52..35356b90 100644 --- a/runners/gradle-integration-tests/testData/androidAppJavadoc/build.gradle +++ b/runners/gradle-integration-tests/testData/androidAppJavadoc/build.gradle @@ -3,7 +3,7 @@ buildscript { mavenCentral() jcenter() maven { url 'https://maven.google.com' } - maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" } + maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } } dependencies { @@ -15,7 +15,7 @@ allprojects { repositories { mavenCentral() jcenter() - maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" } + maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } } } diff --git a/runners/gradle-integration-tests/testData/androidMultiFlavourApp/build.gradle b/runners/gradle-integration-tests/testData/androidMultiFlavourApp/build.gradle index 59477b52..35356b90 100644 --- a/runners/gradle-integration-tests/testData/androidMultiFlavourApp/build.gradle +++ b/runners/gradle-integration-tests/testData/androidMultiFlavourApp/build.gradle @@ -3,7 +3,7 @@ buildscript { mavenCentral() jcenter() maven { url 'https://maven.google.com' } - maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" } + maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } } dependencies { @@ -15,7 +15,7 @@ allprojects { repositories { mavenCentral() jcenter() - maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" } + maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } } } diff --git a/runners/gradle-integration-tests/testData/basic/build.gradle b/runners/gradle-integration-tests/testData/basic/build.gradle index 4a259f50..a3116751 100644 --- a/runners/gradle-integration-tests/testData/basic/build.gradle +++ b/runners/gradle-integration-tests/testData/basic/build.gradle @@ -2,7 +2,7 @@ buildscript { repositories { mavenCentral() jcenter() - maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" } + maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } } dependencies { @@ -21,7 +21,7 @@ repositories { mavenCentral() jcenter() maven { - url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" + url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" diff --git a/runners/gradle-integration-tests/testData/multiProjectSingleOut/build.gradle b/runners/gradle-integration-tests/testData/multiProjectSingleOut/build.gradle index 68d93e30..4f561472 100644 --- a/runners/gradle-integration-tests/testData/multiProjectSingleOut/build.gradle +++ b/runners/gradle-integration-tests/testData/multiProjectSingleOut/build.gradle @@ -7,7 +7,7 @@ subprojects { repositories { mavenCentral() jcenter() - maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" } + maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } } dependencies { @@ -17,7 +17,7 @@ subprojects { repositories { mavenCentral() jcenter() - maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" } + maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } } } diff --git a/runners/gradle-integration-tests/testData/sourcesChange/build.gradle b/runners/gradle-integration-tests/testData/sourcesChange/build.gradle index bc20e1cf..4627e8ef 100644 --- a/runners/gradle-integration-tests/testData/sourcesChange/build.gradle +++ b/runners/gradle-integration-tests/testData/sourcesChange/build.gradle @@ -2,7 +2,7 @@ buildscript { repositories { mavenCentral() jcenter() - maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" } + maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } } dependencies { @@ -21,7 +21,7 @@ repositories { mavenCentral() jcenter() maven { - url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" + url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" diff --git a/runners/gradle-plugin/build.gradle b/runners/gradle-plugin/build.gradle index 661d432b..8e59a7be 100644 --- a/runners/gradle-plugin/build.gradle +++ b/runners/gradle-plugin/build.gradle @@ -74,7 +74,7 @@ artifacts { } pluginBundle { - website = 'http://www.kotlinlang.org/' + website = 'https://www.kotlinlang.org/' vcsUrl = 'https://github.com/kotlin/dokka.git' description = 'Dokka, the Kotlin documentation tool' tags = ['dokka', 'kotlin', 'kdoc'] diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt index dcb9ac2c..41521388 100644 --- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt +++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt @@ -200,7 +200,7 @@ class DokkaJavadocJarMojo : AbstractDokkaMojo() { /** * The archive configuration to use. - * See [Maven Archiver Reference](http://maven.apache.org/shared/maven-archiver/index.html) + * See [Maven Archiver Reference](https://maven.apache.org/shared/maven-archiver/index.html) */ @Parameter private val archive = MavenArchiveConfiguration() -- cgit