-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02093a9
commit f140c30
Showing
30 changed files
with
2,112 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ build/ | |
|
||
#Kotlin | ||
.kotlin | ||
kotlin-js-store | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
|
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
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
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
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
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
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
4 changes: 4 additions & 0 deletions
4
compiler-plugin/src/main/kotlin/tech/mappie/util/ListExtensions.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,4 @@ | ||
package tech.mappie.util | ||
|
||
fun <T> Collection<List<T>>.filterSingle(): List<T> = | ||
filter { it.size == 1 }.map { it.single() } |
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
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
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
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
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
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
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
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
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
13 changes: 13 additions & 0 deletions
13
...in/src/test/kotlin/tech/mappie/testing/compatibility/gradle/Gradle810CompatibilityTest.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,13 @@ | ||
package tech.mappie.testing.compatibility.gradle | ||
|
||
import org.junit.jupiter.api.Test | ||
|
||
class Gradle810CompatibilityTest : GradleCompatibilityTestBase() { | ||
|
||
override val gradleVersion = "8.10.2" | ||
|
||
@Test | ||
fun `test compatibility with gradle 8_10_2`() { | ||
runner.withArguments("build").build() | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...in/src/test/kotlin/tech/mappie/testing/compatibility/gradle/Gradle811CompatibilityTest.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,13 @@ | ||
package tech.mappie.testing.compatibility.gradle | ||
|
||
import org.junit.jupiter.api.Test | ||
|
||
class Gradle811CompatibilityTest : GradleCompatibilityTestBase() { | ||
|
||
override val gradleVersion = "8.11.1" | ||
|
||
@Test | ||
fun `test compatibility with gradle 8_11_1`() { | ||
runner.withArguments("build").build() | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...gin/src/test/kotlin/tech/mappie/testing/compatibility/gradle/Gradle88CompatibilityTest.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,13 @@ | ||
package tech.mappie.testing.compatibility.gradle | ||
|
||
import org.junit.jupiter.api.Test | ||
|
||
class Gradle88CompatibilityTest : GradleCompatibilityTestBase() { | ||
|
||
override val gradleVersion = "8.8" | ||
|
||
@Test | ||
fun `test compatibility with gradle 8_8`() { | ||
runner.withArguments("build").build() | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...gin/src/test/kotlin/tech/mappie/testing/compatibility/gradle/Gradle89CompatibilityTest.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,13 @@ | ||
package tech.mappie.testing.compatibility.gradle | ||
|
||
import org.junit.jupiter.api.Test | ||
|
||
class Gradle89CompatibilityTest : GradleCompatibilityTestBase() { | ||
|
||
override val gradleVersion = "8.9" | ||
|
||
@Test | ||
fun `test compatibility with gradle 8_9`() { | ||
runner.withArguments("build").build() | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...n/src/test/kotlin/tech/mappie/testing/compatibility/gradle/GradleCompatibilityTestBase.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,37 @@ | ||
package tech.mappie.testing.compatibility.gradle | ||
|
||
import org.junit.jupiter.api.BeforeEach | ||
import tech.mappie.testing.TestBase | ||
|
||
abstract class GradleCompatibilityTestBase : TestBase() { | ||
|
||
@BeforeEach | ||
fun files() { | ||
kotlin( | ||
"src/main/kotlin/Mapper.kt", | ||
""" | ||
import tech.mappie.api.ObjectMappie | ||
data class Input(val value: String) | ||
data class Output(val value: String) | ||
object Mapper : ObjectMappie<Input, Output>() | ||
""".trimIndent() | ||
) | ||
|
||
kotlin( | ||
"src/test/kotlin/MapperTest.kt", | ||
""" | ||
import kotlin.test.* | ||
class MapperTest { | ||
@Test | ||
fun map() { | ||
assertEquals(Output("test"), Mapper.map(Input("test"))) | ||
} | ||
} | ||
""".trimIndent() | ||
) | ||
} | ||
} |
Oops, something went wrong.