Wizard: Do not add bintray repoitory for eap versions

This commit is contained in:
anastasiia.spaseeva
2020-12-07 11:50:31 +03:00
parent 2d8a8d252b
commit 71459db9dd
77 changed files with 35 additions and 382 deletions
@@ -336,44 +336,6 @@ class CodeConformanceTest : TestCase() {
)
),
RepoAllowList("https://cache-redirector.jetbrains.com/dl.bintray.com/kotlin/kotlin-dev", root, setOf()),
RepoAllowList(
// Please use cache-redirector for importing in tests
"https://dl.bintray.com/kotlin/kotlin-eap", root, setOf(
"kotlin-ultimate/ide/android-studio-native/testData/wizard/expected/app/build.gradle.kts",
"kotlin-ultimate/ide/android-studio-native/testData/wizard/expected/shared/build.gradle.kts",
"kotlin-ultimate/ide/android-studio-native/testData/wizard/expected/build.gradle.kts",
"kotlin-ultimate/ide/android-studio-native/testData/wizard/expected/settings.gradle.kts",
"kotlin-ultimate/ide/android-studio-native/src/com/jetbrains/kmm/wizard/templates/buildFile.kt",
"libraries/scripting/dependencies-maven/test/kotlin/script/experimental/test/MavenResolverTest.kt",
"idea/testData/configuration/gradle/eapVersion/build_after.gradle",
"idea/testData/configuration/gradle/rcVersion/build_after.gradle",
"idea/testData/configuration/gradle/m04Version/build_after.gradle",
"idea/testData/configuration/gsk/eapVersion/build_after.gradle.kts",
"idea/testData/configuration/gsk/eap11Version/build_after.gradle.kts",
"idea/idea-jvm/src/org/jetbrains/kotlin/idea/configuration/ConfigureKotlinInProjectUtils.kt",
"gradle/cacheRedirector.gradle.kts",
"idea/idea-maven/testData/configurator/jvm/simpleProjectEAP/pom_after.xml",
"idea/idea-maven/testData/configurator/jvm/simpleProjectRc/pom_after.xml",
"idea/idea-maven/testData/maven-inspections/deprecatedJre.fixed.1.xml",
"idea/idea-maven/testData/maven-inspections/deprecatedJre.xml",
"idea/idea-maven/testData/maven-inspections/deprecatedKotlinxCoroutines.fixed.1.xml",
"idea/idea-maven/testData/maven-inspections/deprecatedKotlinxCoroutines.xml",
"idea/idea-maven/testData/maven-inspections/deprecatedKotlinxCoroutinesNoError.xml",
"idea/testData/gradle/configurator/configureJsEAPWithBuildGradle/build.gradle.after",
"idea/testData/gradle/configurator/configureJsEAPWithBuildGradleKts/build.gradle.kts.after",
"idea/testData/gradle/configurator/configureJvmEAPWithBuildGradle/build.gradle.after",
"idea/testData/gradle/configurator/configureJvmEAPWithBuildGradleKts/build.gradle.kts.after",
"idea/testData/gradle/nativeRunConfiguration/customEntryPointWithoutRunGutter/build.gradle.kts",
"idea/testData/gradle/nativeRunConfiguration/customEntryPointWithoutRunGutter/settings.gradle.kts",
"idea/testData/gradle/nativeRunConfiguration/multiplatformNativeRunGutter/build.gradle.kts",
"idea/testData/gradle/nativeRunConfiguration/multiplatformNativeRunGutter/settings.gradle.kts",
"idea/testData/perfTest/native/_common/settings.gradle.kts",
"kotlin-ultimate/gradle/cidrPluginTools.gradle.kts",
"libraries/tools/new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/core/service/KotlinVersionProviderService.kt",
"idea/testData/perfTest/native/_common/build.gradle.kts.header"
)
),
RepoAllowList("https://cache-redirector.jetbrains.com/dl.bintray.com/kotlin/kotlin-eap", root, setOf()),
RepoAllowList(
// Please use cache-redirector for importing in tests
"https://dl.bintray.com/kotlin/kotlin-bootstrap", root, setOf(
-1
View File
@@ -23,7 +23,6 @@ val mirroredUrls = listOf(
"https://dl.bintray.com/kodein-framework/Kodein-DI",
"https://dl.bintray.com/konsoletyper/teavm",
"https://dl.bintray.com/kotlin/kotlin-dev",
"https://dl.bintray.com/kotlin/kotlin-eap",
"https://dl.bintray.com/kotlin/kotlinx.html",
"https://dl.bintray.com/kotlin/kotlinx",
"https://dl.bintray.com/kotlin/ktor",
@@ -83,7 +83,6 @@ abstract class MultiplePluginVersionGradleImportingTestCase : GradleImportingTes
fun repositories(useKts: Boolean): String {
val customRepositories = arrayOf(
"https://dl.bintray.com/kotlin/kotlin-dev",
"http://dl.bintray.com/kotlin/kotlin-eap"
)
val customMavenRepositories = customRepositories.map { if (useKts) "maven(\"$it\")" else "maven { url '$it' } " }.joinToString("\n")
return """
@@ -59,14 +59,6 @@ val SNAPSHOT_REPOSITORY = RepositoryDescription(
isSnapshot = true
)
val EAP_REPOSITORY = RepositoryDescription(
"bintray.kotlin.eap",
"Bintray Kotlin EAP Repository",
"https://dl.bintray.com/kotlin/kotlin-eap",
"https://bintray.com/kotlin/kotlin-eap/kotlin/",
isSnapshot = false
)
val DEFAULT_GRADLE_PLUGIN_REPOSITORY = RepositoryDescription(
"default.gradle.plugins",
"Default Gradle Plugin Repository",
@@ -113,7 +105,6 @@ fun RepositoryDescription.toKotlinRepositorySnippet() = "maven(\"$url\")"
fun getRepositoryForVersion(version: String): RepositoryDescription? = when {
isSnapshot(version) -> SNAPSHOT_REPOSITORY
isEap(version) -> EAP_REPOSITORY
isDev(version) -> devRepository(version)
else -> null
}
@@ -26,34 +26,6 @@
</dependency>
</dependencies>
<repositories>
<repository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray.kotlin.eap</id>
<name>Bintray Kotlin EAP Repository</name>
<url>https://dl.bintray.com/kotlin/kotlin-eap</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray.kotlin.eap</id>
<name>Bintray Kotlin EAP Repository</name>
<url>https://dl.bintray.com/kotlin/kotlin-eap</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory></sourceDirectory>
<plugins>
@@ -26,34 +26,6 @@
</dependency>
</dependencies>
<repositories>
<repository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray.kotlin.eap</id>
<name>Bintray Kotlin EAP Repository</name>
<url>https://dl.bintray.com/kotlin/kotlin-eap</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray.kotlin.eap</id>
<name>Bintray Kotlin EAP Repository</name>
<url>https://dl.bintray.com/kotlin/kotlin-eap</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory></sourceDirectory>
<plugins>
@@ -26,27 +26,6 @@
</dependency>
</dependencies>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-kotlin-kotlin-eap</id>
<name>bintray</name>
<url>https://dl.bintray.com/kotlin/kotlin-eap</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-kotlin-kotlin-eap</id>
<name>bintray-plugins</name>
<url>https://dl.bintray.com/kotlin/kotlin-eap</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
@@ -26,27 +26,6 @@
</dependency>
</dependencies>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-kotlin-kotlin-eap</id>
<name>bintray</name>
<url>https://dl.bintray.com/kotlin/kotlin-eap</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-kotlin-kotlin-eap</id>
<name>bintray-plugins</name>
<url>https://dl.bintray.com/kotlin/kotlin-eap</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
@@ -27,14 +27,6 @@
</dependencies>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-kotlin-kotlin-eap</id>
<name>bintray</name>
<url>https://dl.bintray.com/kotlin/kotlin-eap</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
@@ -44,16 +36,6 @@
<url>https://kotlin.bintray.com/kotlinx</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-kotlin-kotlin-eap</id>
<name>bintray-plugins</name>
<url>https://dl.bintray.com/kotlin/kotlin-eap</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
@@ -27,14 +27,6 @@
</dependencies>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-kotlin-kotlin-eap</id>
<name>bintray</name>
<url>https://dl.bintray.com/kotlin/kotlin-eap</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
@@ -44,16 +36,6 @@
<url>https://kotlin.bintray.com/kotlinx</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-kotlin-kotlin-eap</id>
<name>bintray-plugins</name>
<url>https://dl.bintray.com/kotlin/kotlin-eap</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
@@ -27,14 +27,6 @@
</dependencies>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-kotlin-kotlin-eap</id>
<name>bintray</name>
<url>https://dl.bintray.com/kotlin/kotlin-eap</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
@@ -44,16 +36,6 @@
<url>https://kotlin.bintray.com/kotlinx</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-kotlin-kotlin-eap</id>
<name>bintray-plugins</name>
<url>https://dl.bintray.com/kotlin/kotlin-eap</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
@@ -6,7 +6,6 @@ version = '1.0'
repositories {
mavenCentral()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
dependencies {
@@ -16,7 +15,6 @@ dependencies {
buildscript {
ext.kotlin_version = '$VERSION$'
repositories {
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
mavenCentral()
}
dependencies {
@@ -6,7 +6,6 @@ version = '1.0'
repositories {
mavenCentral()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
dependencies {
@@ -16,7 +15,6 @@ dependencies {
buildscript {
ext.kotlin_version = '$VERSION$'
repositories {
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
mavenCentral()
}
dependencies {
@@ -6,7 +6,6 @@ version = '1.0'
repositories {
mavenCentral()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
dependencies {
@@ -16,7 +15,6 @@ dependencies {
buildscript {
ext.kotlin_version = '$VERSION$'
repositories {
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
mavenCentral()
}
dependencies {
@@ -12,7 +12,6 @@ application {
repositories {
jcenter()
maven("https://dl.bintray.com/kotlin/kotlin-eap")
}
dependencies {
@@ -11,7 +11,6 @@ application {
repositories {
jcenter()
maven("https://dl.bintray.com/kotlin/kotlin-eap")
}
dependencies {
@@ -6,8 +6,7 @@ version '1.0-SNAPSHOT'
repositories {
mavenCentral()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-js"
}
}
@@ -6,8 +6,7 @@ version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven("https://dl.bintray.com/kotlin/kotlin-eap")
}
dependencies {
implementation(kotlin("stdlib-js"))
}
}
@@ -10,7 +10,6 @@ sourceCompatibility = 1.8
repositories {
mavenCentral()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
dependencies {
@@ -26,4 +25,4 @@ compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
@@ -10,7 +10,6 @@ version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven("https://dl.bintray.com/kotlin/kotlin-eap")
}
dependencies {
@@ -1,7 +1,6 @@
pluginManagement {
repositories {
maven {
url 'http://dl.bintray.com/kotlin/kotlin-eap'
}
}
}
@@ -2,7 +2,6 @@ plugins {
id("org.jetbrains.kotlin.multiplatform") version ("{{kotlin_plugin_version}}")
}
repositories {
maven("https://dl.bintray.com/kotlin/kotlin-eap")
maven("https://dl.bintray.com/kotlin/kotlin-dev")
mavenLocal()
}
@@ -1,6 +1,5 @@
pluginManagement {
repositories {
maven("https://dl.bintray.com/kotlin/kotlin-eap")
maven("https://dl.bintray.com/kotlin/kotlin-dev")
mavenLocal()
gradlePluginPortal()
@@ -2,7 +2,6 @@ plugins {
id("org.jetbrains.kotlin.multiplatform") version ("{{kotlin_plugin_version}}")
}
repositories {
maven("https://dl.bintray.com/kotlin/kotlin-eap")
maven("https://dl.bintray.com/kotlin/kotlin-dev")
mavenLocal()
}
@@ -1,6 +1,5 @@
pluginManagement {
repositories {
maven("https://dl.bintray.com/kotlin/kotlin-eap")
maven("https://dl.bintray.com/kotlin/kotlin-dev")
mavenLocal()
gradlePluginPortal()
@@ -2,7 +2,6 @@ buildscript {
repositories {
mavenCentral()
maven("https://dl.bintray.com/kotlin/kotlin-dev")
maven("https://dl.bintray.com/kotlin/kotlin-eap")
}
val kotlin_version: String by rootProject
@@ -18,7 +17,6 @@ plugins {
repositories {
mavenCentral()
maven("https://dl.bintray.com/kotlin/kotlin-dev")
maven("https://dl.bintray.com/kotlin/kotlin-eap")
}
// "kotlin" section goes under this line
@@ -11,6 +11,5 @@ pluginManagement {
repositories {
gradlePluginPortal()
maven("https://dl.bintray.com/kotlin/kotlin-dev")
maven("https://dl.bintray.com/kotlin/kotlin-eap")
}
}
@@ -95,11 +95,10 @@ class MavenResolverTest : ResolversTestBase() {
)
)
// @Repository("https://dl.bintray.com/kotlin/kotlin-eap", "https://dl.bintray.com/jakubriegel/kotlin-shell")
// @Repository( "https://dl.bintray.com/jakubriegel/kotlin-shell")
val repositories = repositoryConstructor.callBy(
mapOf(
repositoryConstructor.parameters.first() to arrayOf(
"https://dl.bintray.com/kotlin/kotlin-eap",
"https://dl.bintray.com/jakubriegel/kotlin-shell"
)
)
@@ -14,6 +14,7 @@ dependencies {
testImplementation(project(":kotlin-test:kotlin-test-junit"))
implementation(kotlinxCollectionsImmutable())
implementation("com.google.code.gson:gson:2.8.6")
}
sourceSets {
@@ -22,19 +22,8 @@
<id>mavenCentral</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>src/main/kotlin</sourceDirectory>
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
@@ -22,19 +22,8 @@
<id>mavenCentral</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>src/main/kotlin</sourceDirectory>
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
@@ -22,19 +22,8 @@
<id>mavenCentral</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>src/main/kotlin</sourceDirectory>
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
@@ -22,19 +22,8 @@
<id>mavenCentral</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>src/main/kotlin</sourceDirectory>
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
@@ -21,18 +21,8 @@
<id>mavenCentral</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</pluginRepository>
</pluginRepositories>
<modules>
<module>a</module>
<module>b</module>
@@ -22,19 +22,8 @@
<id>mavenCentral</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>src/main/kotlin</sourceDirectory>
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
@@ -22,18 +22,8 @@
<id>mavenCentral</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>src/main/kotlin</sourceDirectory>
@@ -22,19 +22,8 @@
<id>mavenCentral</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>src/main/kotlin</sourceDirectory>
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
@@ -22,19 +22,8 @@
<id>mavenCentral</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>src/main/kotlin</sourceDirectory>
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
@@ -9,7 +9,6 @@ version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
dependencies {
@@ -22,16 +22,12 @@
<id>mavenCentral</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
<id>mavenCentral</id>
<url>https://repo1.maven.org/maven2/</url>
</pluginRepository>
</pluginRepositories>
@@ -2,7 +2,6 @@ pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
}
@@ -10,7 +10,6 @@ version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
dependencies {
@@ -22,16 +22,12 @@
<id>mavenCentral</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>bintray.kotlin.kotlin-eap</id>
<url>KOTLIN_REPO</url>
<id>mavenCentral</id>
<url>https://repo1.maven.org/maven2/</url>
</pluginRepository>
</pluginRepositories>
@@ -2,7 +2,6 @@ pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
}
@@ -8,7 +8,6 @@ version = '1.0-SNAPSHOT'
repositories {
jcenter()
mavenCentral()
maven { url 'KOTLIN_REPO' }
}
dependencies {
@@ -8,7 +8,6 @@ version = "1.0-SNAPSHOT"
repositories {
jcenter()
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
dependencies {
@@ -2,7 +2,6 @@ pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven { url 'KOTLIN_REPO' }
}
}
@@ -2,7 +2,6 @@ pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
}
@@ -11,7 +11,6 @@ version = '1.0-SNAPSHOT'
repositories {
jcenter()
mavenCentral()
maven { url 'KOTLIN_REPO' }
maven { url 'https://dl.bintray.com/kotlin/kotlin-js-wrappers' }
maven { url 'https://dl.bintray.com/kotlin/kotlinx' }
maven { url 'https://dl.bintray.com/kotlin/ktor' }
@@ -11,7 +11,6 @@ version = "1.0-SNAPSHOT"
repositories {
jcenter()
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
maven { url = uri("https://dl.bintray.com/kotlin/kotlin-js-wrappers") }
maven { url = uri("https://dl.bintray.com/kotlin/kotlinx") }
maven { url = uri("https://dl.bintray.com/kotlin/ktor") }
@@ -2,7 +2,6 @@ pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven { url 'KOTLIN_REPO' }
}
}
@@ -2,7 +2,6 @@ pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
}
@@ -7,7 +7,6 @@ version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
maven { url 'KOTLIN_REPO' }
}
kotlin {
@@ -7,7 +7,6 @@ version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
kotlin {
@@ -2,7 +2,6 @@ pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven { url 'KOTLIN_REPO' }
}
}
@@ -2,7 +2,6 @@ pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
}
@@ -9,7 +9,6 @@ version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
maven { url 'KOTLIN_REPO' }
}
kotlin {
@@ -7,7 +7,6 @@ version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
kotlin {
@@ -2,7 +2,6 @@ pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven { url 'KOTLIN_REPO' }
}
}
@@ -2,7 +2,6 @@ pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
}
@@ -3,7 +3,7 @@ buildscript {
gradlePluginPortal()
jcenter()
google()
maven { url 'KOTLIN_REPO' }
mavenCentral()
}
dependencies {
classpath('org.jetbrains.kotlin:kotlin-gradle-plugin:KOTLIN_VERSION')
@@ -19,6 +19,5 @@ allprojects {
google()
jcenter()
mavenCentral()
maven { url 'KOTLIN_REPO' }
}
}
@@ -3,7 +3,7 @@ buildscript {
gradlePluginPortal()
jcenter()
google()
maven { url = uri("KOTLIN_REPO") }
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:KOTLIN_VERSION")
@@ -19,6 +19,5 @@ allprojects {
google()
jcenter()
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
}
@@ -4,7 +4,6 @@ pluginManagement {
jcenter()
gradlePluginPortal()
mavenCentral()
maven { url 'KOTLIN_REPO' }
}
}
@@ -4,7 +4,6 @@ pluginManagement {
jcenter()
gradlePluginPortal()
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
}
@@ -11,7 +11,6 @@ repositories {
google()
jcenter()
mavenCentral()
maven { url 'KOTLIN_REPO' }
}
kotlin {
@@ -11,7 +11,6 @@ repositories {
google()
jcenter()
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
kotlin {
@@ -4,7 +4,6 @@ pluginManagement {
jcenter()
gradlePluginPortal()
mavenCentral()
maven { url 'KOTLIN_REPO' }
}
resolutionStrategy {
eachPlugin {
@@ -4,7 +4,6 @@ pluginManagement {
jcenter()
gradlePluginPortal()
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
resolutionStrategy {
eachPlugin {
@@ -9,7 +9,6 @@ version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
maven { url 'KOTLIN_REPO' }
}
kotlin {
@@ -7,7 +7,6 @@ version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
kotlin {
@@ -2,7 +2,6 @@ pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven { url 'KOTLIN_REPO' }
}
}
@@ -2,7 +2,6 @@ pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
}
@@ -53,9 +53,7 @@ abstract class AbstractBuildFileGenerationTest : UsefulTestCase() {
KOTLIN_VERSION_PLACEHOLDER
).replaceAllTo(
listOf(
Repositories.KOTLIN_EAP_BINTRAY.url,
Repositories.KOTLIN_DEV_BINTRAY.url,
KotlinVersionProviderTestWizardService.KOTLIN_EAP_BINTRAY_WITH_CACHE_REDIRECTOR.url,
KotlinVersionProviderTestWizardService.KOTLIN_DEV_BINTRAY_WITH_CACHE_REDIRECTOR.url,
),
KOTLIN_REPO_PLACEHOLDER
@@ -36,15 +36,14 @@ class KotlinVersionProviderTestWizardService() : KotlinVersionProviderService(),
private fun getKotlinVersionRepositoryWithCacheRedirector(versionKind: KotlinVersionKind): Repository = when (versionKind) {
KotlinVersionKind.STABLE -> DefaultRepository.MAVEN_CENTRAL
KotlinVersionKind.EAP -> KOTLIN_EAP_BINTRAY_WITH_CACHE_REDIRECTOR
KotlinVersionKind.EAP -> DefaultRepository.MAVEN_CENTRAL
KotlinVersionKind.DEV -> KOTLIN_DEV_BINTRAY_WITH_CACHE_REDIRECTOR
KotlinVersionKind.M -> KOTLIN_EAP_BINTRAY_WITH_CACHE_REDIRECTOR
KotlinVersionKind.M -> DefaultRepository.MAVEN_CENTRAL
}
companion object {
private const val CACHE_REDIRECTOR_BINTRAY_URL = "https://cache-redirector.jetbrains.com/dl.bintray.com"
val KOTLIN_EAP_BINTRAY_WITH_CACHE_REDIRECTOR = BintrayRepository("kotlin/kotlin-eap", CACHE_REDIRECTOR_BINTRAY_URL)
val KOTLIN_DEV_BINTRAY_WITH_CACHE_REDIRECTOR = BintrayRepository("kotlin/kotlin-dev", CACHE_REDIRECTOR_BINTRAY_URL)
@@ -5,6 +5,8 @@
package org.jetbrains.kotlin.tools.projectWizard.core.service
import com.google.gson.JsonObject
import com.google.gson.JsonParser.parseString
import org.jetbrains.annotations.NonNls
import org.jetbrains.kotlin.tools.projectWizard.Versions
import org.jetbrains.kotlin.tools.projectWizard.core.TaskResult
@@ -33,9 +35,7 @@ abstract class KotlinVersionProviderService : WizardService {
)
protected open fun getKotlinVersionRepository(versionKind: KotlinVersionKind): Repository = when (versionKind) {
KotlinVersionKind.STABLE -> DefaultRepository.MAVEN_CENTRAL
KotlinVersionKind.EAP -> Repositories.KOTLIN_EAP_BINTRAY
KotlinVersionKind.M -> Repositories.KOTLIN_EAP_BINTRAY
KotlinVersionKind.STABLE, KotlinVersionKind.EAP, KotlinVersionKind.M -> DefaultRepository.MAVEN_CENTRAL
KotlinVersionKind.DEV -> Repositories.KOTLIN_DEV_BINTRAY
}
@@ -69,13 +69,28 @@ val KotlinVersionKind.isStable
get() = this == KotlinVersionKind.STABLE
object EapVersionDownloader {
fun getLatestEapVersion() = downloadVersions(EAP_URL).firstOrNull()
fun getLatestEapVersion() = downloadVersionFromMavenCentral(EAP_URL).firstOrNull()
fun getLatestDevVersion() = downloadVersions(DEV_URL).firstOrNull()
private fun downloadPage(url: String): TaskResult<String> = safe {
BufferedReader(InputStreamReader(URL(url).openStream())).lines().collect(Collectors.joining("\n"))
}
@Suppress("SameParameterValue")
private fun downloadVersionFromMavenCentral(url: String) = compute {
val (text) = downloadPage(url)
val (versionString) = parseLatestVersionFromJson(text)
if (versionString.isNotEmpty())
listOf(Version.fromString(versionString))
else
emptyList()
}.asNullable.orEmpty()
private fun parseLatestVersionFromJson(text: String) = safe {
val json = parseString(text) as JsonObject
json.get("response").asJsonObject.get("docs").asJsonArray.get(0).asJsonObject.get("latestVersion").asString
}
@Suppress("SameParameterValue")
private fun downloadVersions(url: String): List<Version> = compute {
val (text) = downloadPage(url)
@@ -88,7 +103,7 @@ object EapVersionDownloader {
}.asNullable.orEmpty()
@NonNls
private val EAP_URL = "https://dl.bintray.com/kotlin/kotlin-eap/org/jetbrains/kotlin/jvm/org.jetbrains.kotlin.jvm.gradle.plugin/"
private val EAP_URL = "https://search.maven.org/solrsearch/select?q=g:org.jetbrains.kotlin%20AND%20a:kotlin-gradle-plugin"
@NonNls
private val DEV_URL = "https://dl.bintray.com/kotlin/kotlin-dev/org/jetbrains/kotlin/jvm/org.jetbrains.kotlin.jvm.gradle.plugin/"
@@ -16,7 +16,6 @@ import org.jetbrains.kotlin.tools.projectWizard.ir.buildsystem.BuildFileIR
import org.jetbrains.kotlin.tools.projectWizard.ir.buildsystem.RepositoryIR
import org.jetbrains.kotlin.tools.projectWizard.ir.buildsystem.withIrs
import org.jetbrains.kotlin.tools.projectWizard.moduleConfigurators.ModuleConfigurator
import org.jetbrains.kotlin.tools.projectWizard.moduleConfigurators.inContextOfModuleConfigurator
import org.jetbrains.kotlin.tools.projectWizard.phases.GenerationPhase
import org.jetbrains.kotlin.tools.projectWizard.plugins.StructurePlugin
import org.jetbrains.kotlin.tools.projectWizard.plugins.buildSystem.BuildSystemPlugin
@@ -56,7 +55,7 @@ class KotlinPlugin(context: Context) : Plugin(context) {
val version by property(
// todo do not hardcode kind & repository
WizardKotlinVersion(Versions.KOTLIN, KotlinVersionKind.M, Repositories.KOTLIN_EAP_BINTRAY)
WizardKotlinVersion(Versions.KOTLIN, KotlinVersionKind.M, Repositories.KOTLIN_EAP_MAVEN_CENTRAL)
)
val initKotlinVersions by pipelineTask(GenerationPhase.PREPARE_GENERATION) {
@@ -48,7 +48,7 @@ object Repositories {
val KTOR_BINTRAY = BintrayRepository("kotlin/ktor")
val KOTLINX = BintrayRepository("kotlin/kotlinx")
val KOTLIN_JS_WRAPPERS_BINTRAY = BintrayRepository("kotlin/kotlin-js-wrappers")
val KOTLIN_EAP_BINTRAY = BintrayRepository("kotlin/kotlin-eap")
val KOTLIN_EAP_MAVEN_CENTRAL = DefaultRepository.MAVEN_CENTRAL
val KOTLIN_DEV_BINTRAY = BintrayRepository("kotlin/kotlin-dev")
val JETBRAINS_COMPOSE_DEV = JetBrainsSpace("compose/dev")
}