Browse Source
* Fix cache kind management with nested subprojects Previously, cache kind property management worked incorrectly when Compose Gradle plugin was applied to both parent and child subprojects, e.g. :compose-subproject-1:compose-subproject-2. With this example the plugin would successfully set the property for compose-subproject-1, but then for compose-subproject-2 the following snippet would fail: ``` if (project.hasProperty(targetCacheKindPropertyName)) { project.setProperty(targetCacheKindPropertyName, NONE_VALUE) } ``` because project.hasProperty would have return true (because it checks parent subproject properties too), but project.setProperty would fail, because parent project's properties are read only. Warnings were also handled incorrectly in this case, because during the configuration of compose-subproject-1 we might set `kotlin.native.cacheKind.ios*=none`, which would then cause a warning during the configuration of compose-subproject-2. To avoid incorrect warnings, we now record the snapshot of relevant properties during Compose Multiplatform build service initialization Resolves #3515 * Fix issues from code reviewpull/3527/head
Alexey Tsvetkov
1 year ago
committed by
GitHub
11 changed files with 194 additions and 44 deletions
@ -0,0 +1,27 @@
|
||||
plugins { |
||||
id "org.jetbrains.kotlin.multiplatform" |
||||
id "org.jetbrains.compose" |
||||
} |
||||
|
||||
kotlin { |
||||
iosX64 { |
||||
binaries.framework { |
||||
isStatic = true |
||||
baseName = "shared" |
||||
} |
||||
} |
||||
iosArm64 { |
||||
binaries.framework { |
||||
isStatic = true |
||||
baseName = "shared" |
||||
} |
||||
} |
||||
|
||||
sourceSets { |
||||
commonMain { |
||||
dependencies { |
||||
implementation(compose.runtime) |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,10 @@
|
||||
import androidx.compose.runtime.Composable |
||||
import androidx.compose.runtime.getValue |
||||
import androidx.compose.runtime.mutableStateOf |
||||
import androidx.compose.runtime.remember |
||||
import androidx.compose.runtime.setValue |
||||
|
||||
@Composable |
||||
fun App() { |
||||
var text by remember { mutableStateOf("Hello, World!") } |
||||
} |
@ -0,0 +1,20 @@
|
||||
plugins { |
||||
id "org.jetbrains.kotlin.multiplatform" |
||||
id "org.jetbrains.compose" |
||||
} |
||||
|
||||
kotlin { |
||||
iosX64() |
||||
iosArm64() |
||||
iosSimulatorArm64() |
||||
macosX64() |
||||
macosArm64() |
||||
|
||||
sourceSets { |
||||
commonMain { |
||||
dependencies { |
||||
implementation(compose.runtime) |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,10 @@
|
||||
import androidx.compose.runtime.Composable |
||||
import androidx.compose.runtime.getValue |
||||
import androidx.compose.runtime.mutableStateOf |
||||
import androidx.compose.runtime.remember |
||||
import androidx.compose.runtime.setValue |
||||
|
||||
@Composable |
||||
fun App() { |
||||
var text by remember { mutableStateOf("Hello, World!") } |
||||
} |
Loading…
Reference in new issue