generated from JavierSegoviaCordoba/kotlin-template-javiersc
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve Kotlin Multiplatform functional test
- Loading branch information
1 parent
e40c755
commit 1134f79
Showing
7 changed files
with
74 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
kopy-gradle-plugin/testFunctional/resources/kotlin-multiplatform/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
plugins { | ||
id("org.jetbrains.kotlin.multiplatform") apply false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,10 @@ plugins { | |
} | ||
|
||
kotlin { | ||
jvm() | ||
linuxArm64() | ||
linuxX64() | ||
macosArm64() | ||
mingwX64() | ||
} | ||
|
||
kopy { | ||
|
18 changes: 18 additions & 0 deletions
18
kopy-gradle-plugin/testFunctional/resources/kotlin-multiplatform/lib-a/src/main/kotlin/A.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.javiersc.kotlin.kopy.functional.test.lib.a | ||
|
||
import com.javiersc.kotlin.kopy.Kopy | ||
|
||
fun a() { | ||
val house = House( | ||
squareMeters = 53, | ||
kitchen = Kitchen( | ||
squareMeters = 10, | ||
), | ||
) | ||
house.copy { | ||
kitchen.squareMeters = 77 | ||
} | ||
} | ||
|
||
@Kopy data class House(val squareMeters: Int, val kitchen: Kitchen) | ||
@Kopy data class Kitchen(val squareMeters: Int) |
23 changes: 23 additions & 0 deletions
23
kopy-gradle-plugin/testFunctional/resources/kotlin-multiplatform/lib-b/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
plugins { | ||
id("com.javiersc.kotlin.kopy") | ||
id("org.jetbrains.kotlin.multiplatform") | ||
} | ||
|
||
kotlin { | ||
jvm() | ||
linuxArm64() | ||
macosArm64() | ||
mingwX64() | ||
|
||
sourceSets { | ||
commonMain { | ||
dependencies { | ||
implementation(project(":lib-a")) | ||
} | ||
} | ||
} | ||
} | ||
|
||
kopy { | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
kopy-gradle-plugin/testFunctional/resources/kotlin-multiplatform/lib-b/src/main/kotlin/B.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.javiersc.kotlin.kopy.functional.test.lib.b | ||
|
||
import com.javiersc.kotlin.kopy.functional.test.lib.a.House | ||
import com.javiersc.kotlin.kopy.functional.test.lib.a.Kitchen | ||
import com.javiersc.kotlin.kopy.Kopy | ||
|
||
fun b() { | ||
val street = Street( | ||
house = House( | ||
squareMeters = 53, | ||
kitchen = Kitchen( | ||
squareMeters = 10, | ||
), | ||
), | ||
) | ||
street.copy { | ||
house.kitchen.squareMeters = 77 | ||
} | ||
} | ||
|
||
@Kopy data class Street(val house: House) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,8 @@ dependencyResolutionManagement { | |
} | ||
} | ||
} | ||
|
||
include( | ||
":lib-a", | ||
// ":lib-b", | ||
) |