Switch jps android test to platform 26

This commit is contained in:
Ilya Chernikov
2017-11-30 15:16:37 +01:00
committed by Vyacheslav Gerasimov
parent 7120fe190a
commit febab82c7e
6 changed files with 8 additions and 8 deletions
@@ -4,5 +4,5 @@ import android.view.View
import android.content.Context
open class Activity: Context {
open fun findViewById(id: Int): View? = null
open fun <T : View> findViewById(id: Int): T? = null
}
@@ -3,5 +3,5 @@ package android.app
import android.view.View
open class Dialog {
open fun findViewById(id: Int): View? = null
open fun <T : View> findViewById(id: Int): T? = null
}
@@ -3,5 +3,5 @@ package android.view
import android.content.Context
open class View(ctx: Context) {
open fun findViewById(id: Int): View? = null
open fun <T : View> findViewById(id: Int): T? = null
}
@@ -29,7 +29,7 @@ import java.io.File
abstract class AbstractAndroidJpsTestCase : BaseKotlinJpsBuildTestCase() {
private val SDK_NAME = "Android API 21 Platform"
private val SDK_NAME = "Android API 26 Platform"
fun doTest(path: String) {
addJdkAndAndroidSdk()
@@ -42,10 +42,10 @@ abstract class AbstractAndroidJpsTestCase : BaseKotlinJpsBuildTestCase() {
private fun addJdkAndAndroidSdk(): JpsSdk<JpsSimpleElement<JpsAndroidSdkProperties>> {
val jdkName = "java_sdk"
addJdk(jdkName)
val properties = JpsAndroidSdkProperties("android-23", jdkName)
val properties = JpsAndroidSdkProperties("android-26", jdkName)
val sdkPath = KotlinTestUtils.findAndroidSdk().canonicalPath
val library = myModel.global.addSdk(SDK_NAME, sdkPath, "", JpsAndroidSdkType.INSTANCE, JpsSimpleElementImpl(properties))
library.addRoot(File(sdkPath + "/platforms/android-23/android.jar"), JpsOrderRootType.COMPILED)
library.addRoot(File(sdkPath + "/platforms/android-26/android.jar"), JpsOrderRootType.COMPILED)
return library.properties
}
}
@@ -36,7 +36,7 @@
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
<orderEntry type="jdk" jdkName="Android API 26 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
</component>
@@ -11,7 +11,7 @@
<module fileurl="file://$PROJECT_DIR$/simple.iml" filepath="$PROJECT_DIR$/simple.iml" />
</modules>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="Android API 21 Platform" project-jdk-type="Android SDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="Android API 26 Platform" project-jdk-type="Android SDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>