Colton Idle
10/12/2021, 1:30 PMCompilation is not supported for following modules: rollertoaster.desktop.commonMain, rollertoaster.commoncomposables.androidAndroidTestRelease, rollertoaster.commoncomposables.androidTestFixtures, rollertoaster.commoncomposables.androidTestFixturesDebug, rollertoaster.commoncomposables.androidTestFixturesRelease, rollertoaster.commoncomposables.commonMain, rollertoaster.commoncomposables.commonTest, rollertoaster.commoncomposables.desktopMain, rollertoaster.commoncomposables.desktopTest. Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project.
Did I setup something incorrectly? Maybe that's the reason why I'm seeing this error? https://github.com/JetBrains/compose-jb/issues/1132Javier
10/12/2021, 1:35 PMColton Idle
10/12/2021, 3:02 PMJavier
10/12/2021, 4:37 PMColton Idle
10/12/2021, 8:55 PMimport org.jetbrains.compose.compose
plugins {
id("com.android.library")
kotlin("multiplatform")
id("org.jetbrains.compose")
}
kotlin {
android()
jvm("desktop")
sourceSets {
named("commonMain") {
dependencies {
api(compose.runtime)
api(compose.foundation)
api(compose.animation)
api(compose.ui)
api(compose.uiTooling)
api(compose.material)
api(compose.materialIconsExtended)
implementation(compose("org.jetbrains.compose.ui:ui-util"))
}
}
named("androidMain") {
dependencies {
// Compose helpers
implementation("com.google.accompanist:accompanist-insets:0.19.0")
implementation("com.google.accompanist:accompanist-pager:0.19.0")
implementation("com.google.accompanist:accompanist-pager-indicators:0.19.0")
val coilVersion = "1.4.0"
implementation("io.coil-kt:coil-compose-base:$coilVersion")
implementation("io.coil-kt:coil-svg:$coilVersion")
}
}
}
}
android {
compileSdk = 31
defaultConfig {
minSdk = 24
targetSdk = 30
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("<http://consumer-rules.pro|consumer-rules.pro>")
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "<http://proguard-rules.pro|proguard-rules.pro>")
}
}
lint {
warningsAsErrors = true
}
sourceSets {
named("main") {
manifest.srcFile("src/androidMain/AndroidManifest.xml")
res.srcDirs("src/androidMain/res")
}
}
dependencies {
lintChecks(project(":lint"))
}
}Javier
10/12/2021, 11:24 PMimplementation(compose("org.jetbrains.compose.ui:ui-util")) this is strangeJavier
10/12/2021, 11:25 PMimplementation("org.jetbrains.compose.ui:ui-util")Javier
10/12/2021, 11:25 PMColton Idle
10/12/2021, 11:39 PMuli
10/13/2021, 5:38 AMimplementation(compose("ui-util"))uli
10/13/2021, 5:41 AMcompose function and it will become clear.Igor Demin
10/13/2021, 8:41 AMcompose("org.jetbrains.compose.ui:ui-util"). It will be transformed into org.jetbrains.compose.ui:ui-util:1.0.0-alpha4-buildXXX
It shouldn't be the reason, why you are seeing Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project
This error usually happens when you apply com.android.library (or com.android.application) and java plugins in the same module.
But your kts file looks fine. Do you have any code in buildSrc? Maybe it interferes.Colton Idle
10/13/2021, 2:03 PMColton Idle
10/15/2021, 1:52 PMColton Idle
10/15/2021, 1:56 PMplugins {
id("com.android.library")
id("kotlin-android")
}
and
plugins {
id("com.android.library")
id("kotlin-android")
kotlin("kapt")
id("dagger.hilt.android.plugin")
id("org.jetbrains.kotlin.android")
id("app.cash.exhaustive")
id("org.jetbrains.compose")
}
and
plugins {
id("com.android.library")
id("kotlin-android")
id("org.jetbrains.compose")
}
and
plugins {
id("java-library")
id("kotlin")
}
and
plugins {
kotlin("multiplatform") // kotlin("jvm") doesn't work well in IDEA/AndroidStudio
// (<https://github.com/JetBrains/compose-jb/issues/22>)
id("org.jetbrains.compose")
}Igor Demin
10/15/2021, 3:12 PMany other ideasNo, unfortunately. Without a reproducer it is difficult to figure out what is wrong. Your modules look fine.
I just updated to latest AS canaryIs it only AS issue, or
./gradlew assembleRelease in the console will print the same error?Colton Idle
10/18/2021, 9:53 PM