Restore testOmittedStdlibVersion originally added in commit 15feeddc
This commit is contained in:
+32
@@ -405,6 +405,38 @@ open class KotlinAndroid32GradleIT : KotlinAndroid3GradleIT() {
|
||||
assertTasksUpToDate(javacTasks + kaptTasks)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testOmittedStdlibVersion() = Project("AndroidProject").run {
|
||||
setupWorkingDir()
|
||||
|
||||
gradleBuildScript("Lib").modify {
|
||||
it.checkedReplace("kotlin-stdlib:\$kotlin_version", "kotlin-stdlib") + "\n" + """
|
||||
apply plugin: 'maven'
|
||||
group 'com.example'
|
||||
version '1.0'
|
||||
android {
|
||||
defaultPublishConfig 'flavor1Debug'
|
||||
}
|
||||
uploadArchives {
|
||||
repositories {
|
||||
mavenDeployer {
|
||||
repository(url: "file://${'$'}buildDir/repo")
|
||||
}
|
||||
}
|
||||
}
|
||||
""".trimIndent()
|
||||
}
|
||||
|
||||
build(":Lib:assembleFlavor1Debug", ":Lib:uploadArchives") {
|
||||
assertSuccessful()
|
||||
assertTasksExecuted(":Lib:compileFlavor1DebugKotlin", ":Lib:uploadArchives")
|
||||
val pomLines = File(projectDir, "Lib/build/repo/com/example/Lib/1.0/Lib-1.0.pom").readLines()
|
||||
val stdlibVersionLineNumber = pomLines.indexOfFirst { "<artifactId>kotlin-stdlib</artifactId>" in it } + 1
|
||||
val versionLine = pomLines[stdlibVersionLineNumber]
|
||||
assertTrue { "<version>${defaultBuildOptions().kotlinVersion}</version>" in versionLine }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
abstract class KotlinAndroid3GradleIT : AbstractKotlinAndroidGradleTests() {
|
||||
|
||||
Reference in New Issue
Block a user