mirror of
https://github.com/jlengrand/compose-multiplatform.git
synced 2026-03-10 15:48:51 +00:00
Fix MPP CI issues (#1645)
* Fix compilation of SplitPane * Fix Gradle tests
This commit is contained in:
committed by
Alexey Tsvetkov
parent
8e335c9d21
commit
11918f3e8a
@@ -17,6 +17,10 @@ subprojects {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>() {
|
||||
kotlinOptions.jvmTarget = "11"
|
||||
}
|
||||
|
||||
plugins.withId("maven-publish") {
|
||||
configureIfExists<PublishingExtension> {
|
||||
repositories {
|
||||
|
||||
@@ -24,12 +24,7 @@ import kotlin.concurrent.thread
|
||||
class GradlePluginTest : GradlePluginTestBase() {
|
||||
@Test
|
||||
fun jsMppIsNotBroken() =
|
||||
with(
|
||||
testProject(
|
||||
TestProjects.jsMpp,
|
||||
testEnvironment = defaultTestEnvironment.copy(kotlinVersion = TestKotlinVersion.V1_5_20)
|
||||
)
|
||||
) {
|
||||
with(testProject(TestProjects.jsMpp)) {
|
||||
gradle(":compileKotlinJs").build().checks { check ->
|
||||
check.taskOutcome(":compileKotlinJs", TaskOutcome.SUCCESS)
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ package org.jetbrains.compose.test
|
||||
|
||||
@Suppress("EnumEntryName")
|
||||
enum class TestKotlinVersion(val versionString: String) {
|
||||
Default("1.6.10"),
|
||||
V1_5_31("1.5.31"),
|
||||
V1_5_20("1.5.20")
|
||||
}
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
Default("1.6.10")
|
||||
}
|
||||
@@ -19,13 +19,15 @@ class TestProject(
|
||||
private val name: String,
|
||||
private val testEnvironment: TestEnvironment
|
||||
) {
|
||||
private val testProjectsRootDir = File("src/test/test-projects")
|
||||
private val additionalArgs = listOf(
|
||||
"--stacktrace",
|
||||
"--init-script", testProjectsRootDir.resolve("init.gradle").absolutePath,
|
||||
"-P${ComposeProperties.VERBOSE}=true"
|
||||
)
|
||||
|
||||
init {
|
||||
val originalTestRoot = File("src/test/test-projects").resolve(name).also {
|
||||
val originalTestRoot = testProjectsRootDir.resolve(name).also {
|
||||
check(it.exists()) { "Test project is not found: ${it.absolutePath}" }
|
||||
}
|
||||
for (orig in originalTestRoot.walk()) {
|
||||
|
||||
@@ -5,14 +5,6 @@ plugins {
|
||||
id "org.jetbrains.compose"
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://maven.pkg.jetbrains.space/public/p/compose/dev"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
implementation compose.desktop.currentOs
|
||||
@@ -27,4 +19,4 @@ compose.desktop {
|
||||
packageName = "Test Package"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,14 +3,6 @@ plugins {
|
||||
id "org.jetbrains.compose"
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://maven.pkg.jetbrains.space/public/p/compose/dev"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
implementation compose.desktop.currentOs
|
||||
|
||||
@@ -6,8 +6,6 @@ plugins {
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
jetbrainsCompose()
|
||||
}
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@ plugins {
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
jetbrainsCompose()
|
||||
}
|
||||
|
||||
|
||||
@@ -5,14 +5,6 @@ plugins {
|
||||
id "org.jetbrains.compose"
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://maven.pkg.jetbrains.space/public/p/compose/dev"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
implementation compose.desktop.currentOs
|
||||
|
||||
@@ -5,14 +5,6 @@ plugins {
|
||||
id "org.jetbrains.compose"
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://maven.pkg.jetbrains.space/public/p/compose/dev"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
implementation compose.desktop.currentOs
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.jvm" apply false
|
||||
id "org.jetbrains.compose" apply false
|
||||
}
|
||||
|
||||
subprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://maven.pkg.jetbrains.space/public/p/compose/dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,14 +5,6 @@ plugins {
|
||||
id "org.jetbrains.compose"
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://maven.pkg.jetbrains.space/public/p/compose/dev"
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm {
|
||||
}
|
||||
@@ -26,7 +18,6 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
compose.desktop {
|
||||
application {
|
||||
mainClass = "MainKt"
|
||||
|
||||
@@ -5,14 +5,6 @@ plugins {
|
||||
id "org.jetbrains.compose"
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://maven.pkg.jetbrains.space/public/p/compose/dev"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
implementation compose.desktop.currentOs
|
||||
|
||||
@@ -5,14 +5,6 @@ plugins {
|
||||
id "org.jetbrains.compose"
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://maven.pkg.jetbrains.space/public/p/compose/dev"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
implementation compose.desktop.currentOs
|
||||
|
||||
@@ -5,14 +5,6 @@ plugins {
|
||||
id "org.jetbrains.compose"
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://maven.pkg.jetbrains.space/public/p/compose/dev"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
implementation compose.desktop.currentOs
|
||||
|
||||
34
gradle-plugins/compose/src/test/test-projects/init.gradle
Normal file
34
gradle-plugins/compose/src/test/test-projects/init.gradle
Normal file
@@ -0,0 +1,34 @@
|
||||
def jvmTargetForKotlinCompile(Project project, String jvmTarget) {
|
||||
project.tasks.all {
|
||||
// tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) fails for init scripts
|
||||
if (it.class.name == "org.jetbrains.kotlin.gradle.tasks.KotlinCompile_Decorated") {
|
||||
kotlinOptions.jvmTarget = "11"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url 'https://maven.pkg.jetbrains.space/public/p/compose/dev'
|
||||
}
|
||||
google()
|
||||
}
|
||||
|
||||
plugins.withId("java-base") {
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
}
|
||||
|
||||
plugins.withId("org.jetbrains.kotlin.jvm") {
|
||||
jvmTargetForKotlinCompile(project, "11")
|
||||
}
|
||||
|
||||
plugins.withId("org.jetbrains.kotlin.multiplatform") {
|
||||
jvmTargetForKotlinCompile(project, "11")
|
||||
}
|
||||
}
|
||||
@@ -5,13 +5,6 @@ plugins {
|
||||
id "org.jetbrains.compose"
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven { url "https://maven.pkg.jetbrains.space/public/p/compose/dev" }
|
||||
maven { url "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev" }
|
||||
}
|
||||
|
||||
kotlin {
|
||||
js(IR) {
|
||||
browser()
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
subprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url 'https://maven.pkg.jetbrains.space/public/p/compose/dev'
|
||||
}
|
||||
google()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user