mirror of
https://github.com/InsanusMokrassar/KotlinMultiplatformProjectTemplate.git
synced 2025-09-04 15:49:36 +00:00
update android part
This commit is contained in:
18
README.md
18
README.md
@@ -26,17 +26,21 @@ this case you must rename it in `settings.gradle` file.
|
||||
## JVM sources in Android target
|
||||
|
||||
By default JVM code is not included in Android target. In case you wish to include JVM sources in Android build, use
|
||||
next method in the end of your `build.gradle`:
|
||||
next method in the `sourceSets` section of your `build.gradle`:
|
||||
|
||||
```groovy
|
||||
enableIncludingJvmCodeInAndroidPart()
|
||||
kotlin {
|
||||
sourceSets {
|
||||
// Some other code
|
||||
androidMain {
|
||||
// Some other code (like dependencies)
|
||||
dependsOn jvmMain
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
In case when you need to be sure that JVM sources are not included in Android part, use this snippet:
|
||||
|
||||
```groovy
|
||||
disableIncludingJvmCodeInAndroidPart()
|
||||
```
|
||||
In case when you need to be sure that JVM sources are not included in Android part, just remove line with `dependsOn jvmMain`
|
||||
|
||||
## Types of projects
|
||||
|
||||
|
Reference in New Issue
Block a user