diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index cff91fe5bd9..77db0e187be 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -72,10 +72,11 @@ val intellijUltimateEnabled by extra(kotlinBuildProperties.intellijUltimateEnabl val intellijSeparateSdks by extra(project.getBooleanProperty("intellijSeparateSdks") ?: false) val verifyDependencyOutput by extra( getBooleanProperty("kotlin.build.dependency.output.verification") ?: isTeamcityBuild) -extra["intellijReleaseType"] = if (extra["versions.intellijSdk"]?.toString()?.endsWith("SNAPSHOT") == true) - "snapshots" -else - "releases" +extra["intellijReleaseType"] = when { + extra["versions.intellijSdk"]?.toString()?.contains("-EAP-") == true -> "snapshots" + extra["versions.intellijSdk"]?.toString()?.endsWith("SNAPSHOT") == true -> "nightly" + else -> "releases" +} extra["versions.androidDxSources"] = "5.0.0_r2" diff --git a/buildSrc/src/main/kotlin/dependencies.kt b/buildSrc/src/main/kotlin/dependencies.kt index 7e3422d075c..f05a08d431f 100644 --- a/buildSrc/src/main/kotlin/dependencies.kt +++ b/buildSrc/src/main/kotlin/dependencies.kt @@ -14,9 +14,15 @@ import org.gradle.kotlin.dsl.extra import org.gradle.kotlin.dsl.project import java.io.File -val Project.isSnapshotIntellij get() = rootProject.extra["versions.intellijSdk"].toString().endsWith("SNAPSHOT") +private val Project.isEAPIntellij get() = rootProject.extra["versions.intellijSdk"].toString().contains("-EAP-") +private val Project.isNightlyIntellij get() = rootProject.extra["versions.intellijSdk"].toString().endsWith("SNAPSHOT") && !isEAPIntellij -val Project.intellijRepo get() = "https://www.jetbrains.com/intellij-repository/" + if (isSnapshotIntellij) "snapshots" else "releases" +val Project.intellijRepo get() = + when { + isEAPIntellij -> "https://www.jetbrains.com/intellij-repository/snapshots" + isNightlyIntellij -> "https://www.jetbrains.com/intellij-repository/nightly" + else -> "https://www.jetbrains.com/intellij-repository/releases" + } fun Project.commonDep(coord: String): String { val parts = coord.split(':')