Skip to content

Commit

Permalink
Add regression test for MPP android source set with resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaroslav Chernyshev authored and Space committed Jun 18, 2021
1 parent 679e768 commit 2ffcc16
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 0 deletions.
Expand Up @@ -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
Expand Down
@@ -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")

0 comments on commit 2ffcc16

Please sign in to comment.