Skip to content

Commit b1b647d

Browse files
authored
Merge pull request #847 from icerockdev/develop
Release 0.25.1
2 parents e385988 + 910bae1 commit b1b647d

10 files changed

Lines changed: 47 additions & 47 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ buildscript {
6565
}
6666
6767
dependencies {
68-
classpath "dev.icerock.moko:resources-generator:0.25.0"
68+
classpath "dev.icerock.moko:resources-generator:0.25.1"
6969
}
7070
}
7171
@@ -83,10 +83,10 @@ project build.gradle
8383
apply plugin: "dev.icerock.mobile.multiplatform-resources"
8484
8585
dependencies {
86-
commonMainApi("dev.icerock.moko:resources:0.25.0")
87-
commonMainApi("dev.icerock.moko:resources-compose:0.25.0") // for compose multiplatform
86+
commonMainApi("dev.icerock.moko:resources:0.25.1")
87+
commonMainApi("dev.icerock.moko:resources-compose:0.25.1") // for compose multiplatform
8888
89-
commonTestImplementation("dev.icerock.moko:resources-test:0.25.0")
89+
commonTestImplementation("dev.icerock.moko:resources-test:0.25.1")
9090
}
9191
9292
multiplatformResources {
@@ -133,7 +133,7 @@ should [add `export` declarations](https://kotlinlang.org/docs/multiplatform-bui
133133

134134
```
135135
framework {
136-
export("dev.icerock.moko:resources:0.25.0")
136+
export("dev.icerock.moko:resources:0.25.1")
137137
export("dev.icerock.moko:graphics:0.9.0") // toUIColor here
138138
}
139139
```

gradle/moko.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[versions]
2-
resourcesVersion = "0.25.0"
2+
resourcesVersion = "0.25.1"
33

44
[libraries]
55
resources = { module = "dev.icerock.moko:resources", version.ref = "resourcesVersion" }

resources-build-logic/src/main/kotlin/apple-bundle-searcher-convention.gradle.kts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ kotlin.targets
105105

106106
fun KonanTarget.getAppleSdk(): String {
107107
return when (this) {
108-
KonanTarget.IOS_ARM32,
109108
KonanTarget.IOS_ARM64 -> "iphoneos"
110109

111110
KonanTarget.IOS_SIMULATOR_ARM64,
@@ -124,16 +123,14 @@ fun KonanTarget.getAppleSdk(): String {
124123

125124
KonanTarget.WATCHOS_ARM64,
126125
KonanTarget.WATCHOS_SIMULATOR_ARM64,
127-
KonanTarget.WATCHOS_X64,
128-
KonanTarget.WATCHOS_X86 -> "watchsimulator"
126+
KonanTarget.WATCHOS_X64 -> "watchsimulator"
129127

130128
else -> error("Unsupported target for selecting SDK: $this")
131129
}
132130
}
133131

134132
fun KonanTarget.getClangTarget(): String {
135133
return when (this) {
136-
KonanTarget.IOS_ARM32 -> "armv7-apple-ios"
137134
KonanTarget.IOS_ARM64 -> "aarch64-apple-ios"
138135
KonanTarget.IOS_SIMULATOR_ARM64 -> "aarch64-apple-ios-simulator"
139136
KonanTarget.IOS_X64 -> "x86_64-apple-ios-simulator"
@@ -150,7 +147,6 @@ fun KonanTarget.getClangTarget(): String {
150147
KonanTarget.WATCHOS_DEVICE_ARM64 -> "aarch64-apple-watchos"
151148
KonanTarget.WATCHOS_SIMULATOR_ARM64 -> "aarch64-apple-watchos-simulator"
152149
KonanTarget.WATCHOS_X64 -> "x86_64-apple-watchos-simulator"
153-
KonanTarget.WATCHOS_X86 -> "i386-apple-watchos"
154150

155151
else -> error("Unsupported target for selecting clang target: $this")
156152
}

resources-generator/src/main/kotlin/dev/icerock/gradle/utils/AppleSdk.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ internal object AppleSdk {
2323
targets.addAll(archs.map { arch ->
2424
when (arch) {
2525
"arm64", "arm64e" -> KonanTarget.IOS_ARM64
26-
"armv7", "armv7s" -> KonanTarget.IOS_ARM32
2726
else -> throw UnknownArchitectureException(platform, arch)
2827
}
2928
})
@@ -51,7 +50,6 @@ internal object AppleSdk {
5150
targets.addAll(archs.map { arch ->
5251
when (arch) {
5352
"arm64", "arm64e" -> KonanTarget.WATCHOS_SIMULATOR_ARM64
54-
"i386" -> KonanTarget.WATCHOS_X86
5553
"x86_64" -> KonanTarget.WATCHOS_X64
5654
else -> throw UnknownArchitectureException(platform, arch)
5755
}

resources-generator/src/main/kotlin/dev/icerock/gradle/utils/createByPlatform.kt

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ internal fun <T> createByPlatform(
2626
KotlinPlatformType.androidJvm -> createAndroid()
2727
KotlinPlatformType.js -> createJs()
2828
KotlinPlatformType.native -> when (konanTarget()) {
29-
KonanTarget.IOS_ARM32,
3029
KonanTarget.IOS_ARM64,
3130
KonanTarget.IOS_SIMULATOR_ARM64,
3231
KonanTarget.IOS_X64,
@@ -42,26 +41,9 @@ internal fun <T> createByPlatform(
4241
KonanTarget.WATCHOS_ARM64,
4342
KonanTarget.WATCHOS_DEVICE_ARM64,
4443
KonanTarget.WATCHOS_SIMULATOR_ARM64,
45-
KonanTarget.WATCHOS_X64,
46-
KonanTarget.WATCHOS_X86 -> createApple()
44+
KonanTarget.WATCHOS_X64 -> createApple()
4745

48-
KonanTarget.ANDROID_ARM32,
49-
KonanTarget.ANDROID_ARM64,
50-
KonanTarget.ANDROID_X64,
51-
KonanTarget.ANDROID_X86,
52-
53-
KonanTarget.LINUX_ARM32_HFP,
54-
KonanTarget.LINUX_ARM64,
55-
KonanTarget.LINUX_MIPS32,
56-
KonanTarget.LINUX_MIPSEL32,
57-
KonanTarget.LINUX_X64,
58-
59-
KonanTarget.MINGW_X64,
60-
KonanTarget.MINGW_X86,
61-
62-
KonanTarget.WASM32,
63-
64-
is KonanTarget.ZEPHYR -> error("$konanTarget not supported by moko-resources now")
46+
else -> error("${konanTarget()} not supported by moko-resources now")
6547
}
6648

6749
KotlinPlatformType.wasm -> createWasm()
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
allprojects {
2-
repositories {
3-
google()
4-
mavenCentral()
5-
mavenLocal()
6-
}
7-
}
8-
91
plugins {
102
alias(libs.plugins.android.application) apply false
113
alias(libs.plugins.android.library) apply false
@@ -15,7 +7,12 @@ plugins {
157
alias(libs.plugins.kotlin.native.cocoapods) apply false
168
alias(libs.plugins.sqldelight) apply false
179
alias(libs.plugins.compose.multiplatform) apply false
18-
alias(libs.plugins.moko.resources) apply false
1910
alias(libs.plugins.paparazzi) apply false
2011
alias(libs.plugins.licenses) apply false
2112
}
13+
14+
buildscript{
15+
dependencies {
16+
classpath(moko.resourcesGradlePlugin)
17+
}
18+
}

samples/kotlin-2-tests/gradle/libs.versions.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ uuid = "0.8.4"
1010
kodein = "7.23.1"
1111
moko-resources = "0.24.5"
1212
wrappers = "1.0.0-pre.839"
13-
kotlin = "2.1.0"
13+
kotlin = "2.2.20"
1414
compose-multiplatform = "1.7.1"
1515
paparazzi = "1.3.4"
1616
kotest = "5.9.1"
@@ -60,7 +60,6 @@ robolectric = { group = "org.robolectric", name = "robolectric", version.ref = "
6060
android-application = { id = "com.android.application", version.ref = "agp" }
6161
android-library = { id = "com.android.library", version.ref = "agp" }
6262
sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }
63-
moko-resources = { id = "dev.icerock.mobile.multiplatform-resources", version.ref = "moko-resources" }
6463
compose-multiplatform = { id = "org.jetbrains.compose", version.ref = "compose-multiplatform" }
6564
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
6665
kotlin-plugin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }

samples/kotlin-2-tests/local-check.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,19 @@ log() {
88
echo "\033[0;32m> $1\033[0m"
99
}
1010

11-
./gradlew clean build
12-
log "kotlin-2-test build success"
11+
./gradlew clean assembleDebug
12+
log "kotlin-2-tests mobile android success"
13+
14+
if ! command -v xcodebuild &> /dev/null
15+
then
16+
log "xcodebuild could not be found, skip ios checks"
17+
18+
./gradlew test lint
19+
log "kotlin-2-tests test success"
20+
21+
./gradlew assembleDebug assembleRelease jsJar jvmJar
22+
log "kotlin-2-tests build success"
23+
else
24+
./gradlew build
25+
log "kotlin-2-tests success"
26+
fi

samples/kotlin-2-tests/settings.gradle.kts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,17 @@ pluginManagement {
88
mavenLocal()
99
}
1010
}
11+
12+
dependencyResolutionManagement {
13+
repositories {
14+
google()
15+
mavenCentral()
16+
mavenLocal()
17+
}
18+
19+
versionCatalogs {
20+
create("moko") {
21+
from(files("../../gradle/moko.versions.toml"))
22+
}
23+
}
24+
}

samples/kotlin-2-tests/shared/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
alias(libs.plugins.android.library)
33
alias(libs.plugins.kotlin.multiplatform)
4-
alias(libs.plugins.moko.resources)
4+
id("dev.icerock.mobile.multiplatform-resources")
55
}
66

77
kotlin {

0 commit comments

Comments
 (0)