diff options
Diffstat (limited to 'integration-tests/gradle')
3 files changed, 19 insertions, 7 deletions
diff --git a/integration-tests/gradle/projects/template.root.gradle.kts b/integration-tests/gradle/projects/template.root.gradle.kts index 51d199ff..f76d616b 100644 --- a/integration-tests/gradle/projects/template.root.gradle.kts +++ b/integration-tests/gradle/projects/template.root.gradle.kts @@ -1,11 +1,11 @@ allprojects { repositories { - maven("https://dl.bintray.com/kotlin/kotlin-eap/") - maven("https://dl.bintray.com/kotlin/kotlin-dev/") - jcenter() + maven("https://cache-redirector.jetbrains.com/jcenter.bintray.com") mavenLocal() mavenCentral() google() + maven("https://cache-redirector.jetbrains.com/dl.bintray.com/kotlin/kotlin-eap") + maven("https://cache-redirector.jetbrains.com/dl.bintray.com/kotlin/kotlin-dev") } } diff --git a/integration-tests/gradle/projects/template.settings.gradle.kts b/integration-tests/gradle/projects/template.settings.gradle.kts index 7fe3c510..6c73899f 100644 --- a/integration-tests/gradle/projects/template.settings.gradle.kts +++ b/integration-tests/gradle/projects/template.settings.gradle.kts @@ -26,12 +26,12 @@ pluginManagement { } } repositories { - maven("https://dl.bintray.com/kotlin/kotlin-eap") - maven("https://dl.bintray.com/kotlin/kotlin-dev/") mavenLocal() + maven("https://cache-redirector.jetbrains.com/jcenter.bintray.com") mavenCentral() - jcenter() gradlePluginPortal() google() + maven("https://cache-redirector.jetbrains.com/dl.bintray.com/kotlin/kotlin-eap") + maven("https://cache-redirector.jetbrains.com/dl.bintray.com/kotlin/kotlin-dev") } } diff --git a/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt b/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt index f852dc8b..9998f3fd 100644 --- a/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt +++ b/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt @@ -4,6 +4,7 @@ import org.gradle.testkit.runner.BuildResult import org.gradle.testkit.runner.GradleRunner import org.gradle.testkit.runner.internal.DefaultGradleRunner import org.gradle.tooling.GradleConnectionException +import org.gradle.util.GradleVersion import org.jetbrains.dokka.it.AbstractIntegrationTest import org.junit.Assume import org.junit.Assume.assumeFalse @@ -11,6 +12,7 @@ import org.junit.AssumptionViolatedException import org.junit.runner.RunWith import org.junit.runners.Parameterized import java.io.File +import java.net.URI import kotlin.test.BeforeTest @RunWith(Parameterized::class) @@ -31,8 +33,8 @@ abstract class AbstractGradleIntegrationTest : AbstractIntegrationTest() { ): GradleRunner { return GradleRunner.create() .withProjectDir(projectDir) - .withGradleVersion(versions.gradleVersion.version) .forwardOutput() + .withJetBrainsCachedGradleVersion(versions.gradleVersion) .withTestKitDir(File("build", "gradle-test-kit").absoluteFile) .withArguments( listOfNotNull( @@ -62,6 +64,16 @@ abstract class AbstractGradleIntegrationTest : AbstractIntegrationTest() { } } +private fun GradleRunner.withJetBrainsCachedGradleVersion(version: GradleVersion): GradleRunner { + return withGradleDistribution( + URI.create( + "https://cache-redirector.jetbrains.com/" + + "services.gradle.org/distributions/" + + "gradle-${version.version}-bin.zip" + ) + ) +} + private fun Throwable.withAllCauses(): Sequence<Throwable> { val root = this return sequence { |