Add support for the Android test plugin.
#KT-11767 fixed
This commit is contained in:
committed by
Alexey Tsvetkov
parent
060c285715
commit
c199fd25e6
+2
-1
@@ -325,7 +325,8 @@ open class KotlinAndroidPlugin @Inject constructor(val scriptHandler: ScriptHand
|
||||
project.afterEvaluate { project ->
|
||||
if (project != null) {
|
||||
val plugin = (project.plugins.findPlugin("android")
|
||||
?: project.plugins.findPlugin("android-library")) as BasePlugin
|
||||
?: project.plugins.findPlugin("android-library")
|
||||
?: project.plugins.findPlugin("com.android.test")) as BasePlugin
|
||||
|
||||
val variantManager = AndroidGradleWrapper.getVariantDataManager(plugin)
|
||||
processVariantData(variantManager.variantDataList, project,
|
||||
|
||||
+2
@@ -25,6 +25,7 @@ abstract class AbstractKotlinAndroidGradleTests(
|
||||
project.build("build") {
|
||||
assertSuccessful()
|
||||
assertContains(":Lib:compileReleaseKotlin",
|
||||
":Test:compileReleaseKotlin",
|
||||
":compileFlavor1DebugKotlin",
|
||||
":compileFlavor2DebugKotlin",
|
||||
":compileFlavor1JnidebugKotlin",
|
||||
@@ -50,6 +51,7 @@ abstract class AbstractKotlinAndroidGradleTests(
|
||||
project.build("build", "--rerun-tasks") {
|
||||
assertSuccessful()
|
||||
assertContains(":Lib:compileReleaseKotlin",
|
||||
":Test:compileReleaseKotlin",
|
||||
":compileFlavor1DebugKotlin",
|
||||
":compileFlavor2DebugKotlin",
|
||||
":compileFlavor1JnidebugKotlin",
|
||||
|
||||
+2
@@ -38,4 +38,6 @@ android {
|
||||
minSdkVersion 14
|
||||
}
|
||||
}
|
||||
|
||||
publishNonDefault true
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
apply plugin: 'com.android.test'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 22
|
||||
buildToolsVersion "21.1.2"
|
||||
|
||||
sourceSets {
|
||||
main.kotlin.srcDirs += 'root/kotlin'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 7
|
||||
targetSdkVersion 22
|
||||
|
||||
testApplicationId 'org.jetbrains.kotlin.gradle.test.androidalfa'
|
||||
}
|
||||
|
||||
targetProjectPath ':Android'
|
||||
targetVariant 'debug'
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
<manifest package="org.jetbrains.kotlin.gradle.test.android.test"/>
|
||||
+1
-1
@@ -1 +1 @@
|
||||
include ':Android', ':Lib'
|
||||
include ':Android', ':Lib', ':Test'
|
||||
|
||||
Reference in New Issue
Block a user