Create android source root test added
This commit is contained in:
+17
@@ -479,6 +479,23 @@ class NewMultiplatformProjectImportingTest : MultiplePluginVersionGradleImportin
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDetectAndroidSources() {
|
||||
configureByFiles()
|
||||
createProjectSubFile(
|
||||
"local.properties",
|
||||
"sdk.dir=/${KotlinTestUtils.getAndroidSdkSystemIndependentPath()}"
|
||||
)
|
||||
importProject(true)
|
||||
checkProjectStructure(exhaustiveModuleList = false, exhaustiveDependencyList = false, exhaustiveSourceSourceRootList = false) {
|
||||
module("multiplatformb") {
|
||||
sourceFolder("multiplatformb/src/androidMain/kotlin", JavaSourceRootType.SOURCE)
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This test is inherited form testPlatformToCommonExpectedByInComposite and actually tests
|
||||
* dependencies in multiplatform project included in composite build
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
buildscript {
|
||||
apply from: "include.gradle"
|
||||
def kotlinVersion = gradleKotlinPluginVersion('1.3.21')
|
||||
|
||||
|
||||
ext.kotlin_version = "$kotlinVersion"
|
||||
repositories {
|
||||
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
|
||||
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.2.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
|
||||
|
||||
google()
|
||||
jcenter()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
Vendored
+39
@@ -0,0 +1,39 @@
|
||||
plugins {
|
||||
id 'kotlin-multiplatform'
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 26
|
||||
defaultConfig {
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 26
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
android("android")
|
||||
jvm("jvm")
|
||||
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib-common')
|
||||
}
|
||||
}
|
||||
androidMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib')
|
||||
}
|
||||
}
|
||||
jvmMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
include(":multiplatformb")
|
||||
Reference in New Issue
Block a user