Browse Source

Fix MPP CI issues (#1645)

* Fix compilation of SplitPane

* Fix Gradle tests
pull/1658/head
Alexey Tsvetkov 3 years ago committed by Alexey Tsvetkov
parent
commit
11918f3e8a
  1. 4
      components/build.gradle.kts
  2. 7
      gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/gradle/GradlePluginTest.kt
  3. 5
      gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/TestKotlinVersion.kt
  4. 4
      gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/TestProject.kt
  5. 8
      gradle-plugins/compose/src/test/test-projects/application/defaultArgs/build.gradle
  6. 8
      gradle-plugins/compose/src/test/test-projects/application/javaLogger/build.gradle
  7. 2
      gradle-plugins/compose/src/test/test-projects/application/jvm/build.gradle
  8. 2
      gradle-plugins/compose/src/test/test-projects/application/jvmKotlinDsl/build.gradle.kts
  9. 8
      gradle-plugins/compose/src/test/test-projects/application/macOptions/build.gradle
  10. 8
      gradle-plugins/compose/src/test/test-projects/application/macSign/build.gradle
  11. 14
      gradle-plugins/compose/src/test/test-projects/application/moduleClashCli/build.gradle
  12. 9
      gradle-plugins/compose/src/test/test-projects/application/mpp/build.gradle
  13. 8
      gradle-plugins/compose/src/test/test-projects/application/optionsWithSpaces/build.gradle
  14. 8
      gradle-plugins/compose/src/test/test-projects/application/resources/build.gradle
  15. 8
      gradle-plugins/compose/src/test/test-projects/application/unpackSkiko/build.gradle
  16. 34
      gradle-plugins/compose/src/test/test-projects/init.gradle
  17. 7
      gradle-plugins/compose/src/test/test-projects/misc/jsMpp/build.gradle
  18. 10
      gradle-plugins/compose/src/test/test-projects/misc/jvmPreview/build.gradle

4
components/build.gradle.kts

@ -17,6 +17,10 @@ subprojects {
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>() {
kotlinOptions.jvmTarget = "11"
}
plugins.withId("maven-publish") {
configureIfExists<PublishingExtension> {
repositories {

7
gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/gradle/GradlePluginTest.kt

@ -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)
}

5
gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/TestKotlinVersion.kt

@ -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")
}

4
gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/TestProject.kt

@ -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()) {

8
gradle-plugins/compose/src/test/test-projects/application/defaultArgs/build.gradle

@ -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

8
gradle-plugins/compose/src/test/test-projects/application/javaLogger/build.gradle

@ -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

2
gradle-plugins/compose/src/test/test-projects/application/jvm/build.gradle

@ -6,8 +6,6 @@ plugins {
}
repositories {
google()
mavenCentral()
jetbrainsCompose()
}

2
gradle-plugins/compose/src/test/test-projects/application/jvmKotlinDsl/build.gradle.kts

@ -7,8 +7,6 @@ plugins {
}
repositories {
google()
mavenCentral()
jetbrainsCompose()
}

8
gradle-plugins/compose/src/test/test-projects/application/macOptions/build.gradle

@ -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

8
gradle-plugins/compose/src/test/test-projects/application/macSign/build.gradle

@ -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

14
gradle-plugins/compose/src/test/test-projects/application/moduleClashCli/build.gradle

@ -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"
}
}
}

9
gradle-plugins/compose/src/test/test-projects/application/mpp/build.gradle

@ -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"

8
gradle-plugins/compose/src/test/test-projects/application/optionsWithSpaces/build.gradle

@ -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

8
gradle-plugins/compose/src/test/test-projects/application/resources/build.gradle

@ -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

8
gradle-plugins/compose/src/test/test-projects/application/unpackSkiko/build.gradle

@ -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

@ -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")
}
}

7
gradle-plugins/compose/src/test/test-projects/misc/jsMpp/build.gradle

@ -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()

10
gradle-plugins/compose/src/test/test-projects/misc/jvmPreview/build.gradle

@ -1,10 +0,0 @@
subprojects {
repositories {
mavenLocal()
mavenCentral()
maven {
url 'https://maven.pkg.jetbrains.space/public/p/compose/dev'
}
google()
}
}
Loading…
Cancel
Save