Add possibility to depend on nightly repository
This commit is contained in:
committed by
Nikolay Krasko
parent
95b2a583ae
commit
eca562a006
@@ -72,10 +72,11 @@ val intellijUltimateEnabled by extra(kotlinBuildProperties.intellijUltimateEnabl
|
|||||||
val intellijSeparateSdks by extra(project.getBooleanProperty("intellijSeparateSdks") ?: false)
|
val intellijSeparateSdks by extra(project.getBooleanProperty("intellijSeparateSdks") ?: false)
|
||||||
val verifyDependencyOutput by extra( getBooleanProperty("kotlin.build.dependency.output.verification") ?: isTeamcityBuild)
|
val verifyDependencyOutput by extra( getBooleanProperty("kotlin.build.dependency.output.verification") ?: isTeamcityBuild)
|
||||||
|
|
||||||
extra["intellijReleaseType"] = if (extra["versions.intellijSdk"]?.toString()?.endsWith("SNAPSHOT") == true)
|
extra["intellijReleaseType"] = when {
|
||||||
"snapshots"
|
extra["versions.intellijSdk"]?.toString()?.contains("-EAP-") == true -> "snapshots"
|
||||||
else
|
extra["versions.intellijSdk"]?.toString()?.endsWith("SNAPSHOT") == true -> "nightly"
|
||||||
"releases"
|
else -> "releases"
|
||||||
|
}
|
||||||
|
|
||||||
extra["versions.androidDxSources"] = "5.0.0_r2"
|
extra["versions.androidDxSources"] = "5.0.0_r2"
|
||||||
|
|
||||||
|
|||||||
@@ -14,9 +14,15 @@ import org.gradle.kotlin.dsl.extra
|
|||||||
import org.gradle.kotlin.dsl.project
|
import org.gradle.kotlin.dsl.project
|
||||||
import java.io.File
|
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 {
|
fun Project.commonDep(coord: String): String {
|
||||||
val parts = coord.split(':')
|
val parts = coord.split(':')
|
||||||
|
|||||||
Reference in New Issue
Block a user