Add regression test for MPP android source set with resources

This commit is contained in:
Yaroslav Chernyshev
2021-06-11 11:19:06 +03:00
parent f0f01db66e
commit 6e9739caec
6 changed files with 62 additions and 0 deletions
@@ -643,6 +643,22 @@ class NewMultiplatformProjectImportingTest : MultiplePluginVersionGradleImportin
}
}
@Test
@PluginTargetVersions(gradleVersion = "6.0+", pluginVersion = "1.5.20+")
fun testDetectAndroidNonEmptyResources() {
configureByFiles()
createProjectSubFile(
"local.properties",
"sdk.dir=/${KtTestUtil.getAndroidSdkSystemIndependentPath()}"
)
importProject(true)
checkProjectStructure(exhaustiveModuleList = false, exhaustiveDependencyList = false, exhaustiveSourceSourceRootList = false) {
module("project.multiplatformb") {
sourceFolder("multiplatformb/src/androidTest/resources", JavaResourceRootType.TEST_RESOURCE)
}
}
}
/**
* This test is inherited form testPlatformToCommonExpectedByInComposite and actually tests
* dependencies in multiplatform project included in composite build
@@ -0,0 +1,24 @@
buildscript {
def kotlinVersion = "{{kotlin_plugin_version}}"
ext.kotlin_version = "$kotlinVersion"
repositories {
{{kotlin_plugin_repositories}}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
{{kotlin_plugin_repositories}}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
@@ -0,0 +1,21 @@
plugins {
id 'kotlin-multiplatform'
}
apply plugin: 'com.android.library'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
}
kotlin {
android("android")
}
@@ -0,0 +1 @@
include(":multiplatformb")