File tree Expand file tree Collapse file tree 10 files changed +64
-296
lines changed
src/commonMain/kotlin/com/example/common
KmpStarterSwiftUi.xcodeproj Expand file tree Collapse file tree 10 files changed +64
-296
lines changed Original file line number Diff line number Diff line change @@ -9,15 +9,18 @@ xcode {
99
1010
1111kotlin {
12+
1213 targets {
1314 fromPreset(presets. android, ' android' )
1415 final def iOSTarget = System . getenv(' SDK_NAME' )?. startsWith(" iphoneos" ) \
1516 ? presets. iosArm64 : presets. iosX64
1617
1718 fromPreset(iOSTarget, ' ios' ) {
19+
1820 binaries {
1921 framework(' common' , [DEBUG ])
2022 }
23+ compilations. main. extraOpts " -Xobjc-generics"
2124 }
2225
2326// fromPreset(presets.iosArm64, 'ios') {
@@ -76,6 +79,7 @@ kotlin {
7679 }
7780
7881 }
82+
7983}
8084
8185android {
Original file line number Diff line number Diff line change 11package com.example.common
22
3- val helloWordText = " Hello Kotlin MP"
3+ import org.reduxkotlin.Reducer
4+ import org.reduxkotlin.createStore
5+
6+ val helloWordText = " Hello Kotlin MP"
7+
8+ data class AppState (val count : Int = 0 )
9+
10+ class ButtonTap
11+
12+ val reducer: Reducer <AppState > = {state, action ->
13+ when (action) {
14+ is ButtonTap -> state.copy(count = state.count + 1 )
15+ else -> state
16+ }
17+ }
18+
19+ val store = createStore(reducer, AppState ())
20+
21+ data class MainViewState (val counterText : String )
22+
23+ fun AppState.toMainViewState () = MainViewState (count.toString())
24+
25+
Original file line number Diff line number Diff line change 1- # Wed Aug 07 15:37:14 EDT 2019
21distributionBase =GRADLE_USER_HOME
32distributionPath =wrapper/dists
3+ distributionUrl =https\://services.gradle.org/distributions/gradle-5.6-rc-2-bin.zip
44zipStoreBase =GRADLE_USER_HOME
55zipStorePath =wrapper/dists
6- distributionUrl =https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
Original file line number Diff line number Diff line change 11#! /usr/bin/env sh
22
3+ #
4+ # Copyright 2015 the original author or authors.
5+ #
6+ # Licensed under the Apache License, Version 2.0 (the "License");
7+ # you may not use this file except in compliance with the License.
8+ # You may obtain a copy of the License at
9+ #
10+ # http://www.apache.org/licenses/LICENSE-2.0
11+ #
12+ # Unless required by applicable law or agreed to in writing, software
13+ # distributed under the License is distributed on an "AS IS" BASIS,
14+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ # See the License for the specific language governing permissions and
16+ # limitations under the License.
17+ #
18+
319# #############################################################################
420# #
521# # Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
2844APP_BASE_NAME=` basename " $0 " `
2945
3046# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31- DEFAULT_JVM_OPTS=" "
47+ DEFAULT_JVM_OPTS=' "-Xmx64m" "-Xms64m" '
3248
3349# Use the maximum available, or set MAX_FD != -1 to use that value.
3450MAX_FD=" maximum"
Original file line number Diff line number Diff line change 1+ @ rem
2+ @ rem Copyright 2015 the original author or authors.
3+ @ rem
4+ @ rem Licensed under the Apache License, Version 2.0 (the "License");
5+ @ rem you may not use this file except in compliance with the License.
6+ @ rem You may obtain a copy of the License at
7+ @ rem
8+ @ rem http://www.apache.org/licenses/LICENSE-2.0
9+ @ rem
10+ @ rem Unless required by applicable law or agreed to in writing, software
11+ @ rem distributed under the License is distributed on an "AS IS" BASIS,
12+ @ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ @ rem See the License for the specific language governing permissions and
14+ @ rem limitations under the License.
15+ @ rem
16+
117@ if " %DEBUG% " == " " @ echo off
218@ rem ##########################################################################
319@ rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
1430set APP_HOME = %DIRNAME%
1531
1632@ rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17- set DEFAULT_JVM_OPTS =
33+ set DEFAULT_JVM_OPTS = " -Xmx64m " " -Xms64m "
1834
1935@ rem Find java.exe
2036if defined JAVA_HOME goto findJavaFromJavaHome
You can’t perform that action at this time.
0 commit comments