mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[gui-test] Simplified test configuration: isConfiguredManually removed, if kotlin.artifact.version not specified kotlin.plugin.version.main is used
This commit is contained in:
+1
-8
@@ -27,7 +27,7 @@ object KotlinTestProperties {
|
||||
* in the variable `kotlin_version`
|
||||
*/
|
||||
private val art_version_from_env = getPropertyValue(
|
||||
"kotlin.artifact.version")
|
||||
"kotlin.artifact.version", kotlin_plugin_version_main)
|
||||
private var art_version_from_test: String? = null
|
||||
var kotlin_artifact_version: String
|
||||
set(value) {
|
||||
@@ -48,13 +48,6 @@ object KotlinTestProperties {
|
||||
get() = getPropertyValue("kotlin.artifact.isPresentInConfigureDialog",
|
||||
"true").toBoolean()
|
||||
|
||||
/**
|
||||
* @return true - if artifact with version specified by kotlin_artifact_version is present in the `Configure Kotlin` dialog
|
||||
*/
|
||||
val isArtifactConfiguredManually: Boolean
|
||||
get() = getPropertyValue("kotlin.artifact.isConfiguredManually",
|
||||
"false").toBoolean()
|
||||
|
||||
/**
|
||||
* @return true - if artifact with version specified by kotlin_artifact_version is uploaded to the bintray, so no additional repositories are required
|
||||
*/
|
||||
|
||||
+6
-5
@@ -698,23 +698,24 @@ fun KotlinGuiTestCase.editBuildGradle(kotlinVersion: String,
|
||||
vararg projectName: String) {
|
||||
// if project is configured to old Kotlin version, it must be released and no changes are required in the build.gradle file
|
||||
if (!KotlinTestProperties.isActualKotlinUsed()) return
|
||||
if (KotlinTestProperties.isArtifactConfiguredManually || KotlinTestProperties.isArtifactOnlyInDevRep || isKotlinDslUsed)
|
||||
if (KotlinTestProperties.isArtifactOnlyInDevRep || isKotlinDslUsed || KotlinTestProperties.kotlin_plugin_version_main != KotlinTestProperties.kotlin_artifact_version)
|
||||
openBuildGradle(isKotlinDslUsed, *projectName)
|
||||
if (isKotlinDslUsed) changePluginsInBuildGradle(kotlinKind)
|
||||
if (KotlinTestProperties.isArtifactOnlyInDevRep) addDevRepositoryToBuildGradle(isKotlinDslUsed)
|
||||
if (KotlinTestProperties.isArtifactConfiguredManually && KotlinTestProperties.kotlin_artifact_version != KotlinTestProperties.kotlin_plugin_version_main)
|
||||
if (KotlinTestProperties.kotlin_plugin_version_main != KotlinTestProperties.kotlin_artifact_version)
|
||||
changeKotlinVersionInBuildGradle(isKotlinDslUsed, kotlinVersion)
|
||||
}
|
||||
|
||||
fun KotlinGuiTestCase.editPomXml(kotlinVersion: String,
|
||||
kotlinKind: KotlinKind,
|
||||
vararg projectName: String) {
|
||||
// if project is configured to old Kotlin version, it must be released and no changes are required in the build.gradle file
|
||||
// if project is configured to old Kotlin version, it must be released and no changes are required in the pom.xml file
|
||||
if (!KotlinTestProperties.isActualKotlinUsed()) return
|
||||
if (KotlinTestProperties.isArtifactConfiguredManually || KotlinTestProperties.isArtifactOnlyInDevRep)
|
||||
if (KotlinTestProperties.isArtifactOnlyInDevRep || KotlinTestProperties.kotlin_plugin_version_main != KotlinTestProperties.kotlin_artifact_version)
|
||||
openPomXml(*projectName)
|
||||
if (KotlinTestProperties.isArtifactOnlyInDevRep) addDevRepositoryToPomXml()
|
||||
if (KotlinTestProperties.isArtifactConfiguredManually) changeKotlinVersionInPomXml(kotlinVersion)
|
||||
if (KotlinTestProperties.kotlin_plugin_version_main != KotlinTestProperties.kotlin_artifact_version)
|
||||
changeKotlinVersionInPomXml(kotlinVersion)
|
||||
}
|
||||
|
||||
fun getVersionFromString(versionString: String): LanguageVersion {
|
||||
|
||||
Reference in New Issue
Block a user