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 {
9
9
10
10
11
11
kotlin {
12
+
12
13
targets {
13
14
fromPreset(presets. android, ' android' )
14
15
final def iOSTarget = System . getenv(' SDK_NAME' )?. startsWith(" iphoneos" ) \
15
16
? presets. iosArm64 : presets. iosX64
16
17
17
18
fromPreset(iOSTarget, ' ios' ) {
19
+
18
20
binaries {
19
21
framework(' common' , [DEBUG ])
20
22
}
23
+ compilations. main. extraOpts " -Xobjc-generics"
21
24
}
22
25
23
26
// fromPreset(presets.iosArm64, 'ios') {
@@ -76,6 +79,7 @@ kotlin {
76
79
}
77
80
78
81
}
82
+
79
83
}
80
84
81
85
android {
Original file line number Diff line number Diff line change 1
1
package com.example.common
2
2
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
2
1
distributionBase =GRADLE_USER_HOME
3
2
distributionPath =wrapper/dists
3
+ distributionUrl =https\://services.gradle.org/distributions/gradle-5.6-rc-2-bin.zip
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =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 1
1
#! /usr/bin/env sh
2
2
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
+
3
19
# #############################################################################
4
20
# #
5
21
# # Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
28
44
APP_BASE_NAME=` basename " $0 " `
29
45
30
46
# 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" '
32
48
33
49
# Use the maximum available, or set MAX_FD != -1 to use that value.
34
50
MAX_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
+
1
17
@ if " %DEBUG% " == " " @ echo off
2
18
@ rem ##########################################################################
3
19
@ rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
14
30
set APP_HOME = %DIRNAME%
15
31
16
32
@ 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 "
18
34
19
35
@ rem Find java.exe
20
36
if defined JAVA_HOME goto findJavaFromJavaHome
You can’t perform that action at this time.
0 commit comments