├── .gitignore
├── README.md
├── build.gradle
├── consoleout.png
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── notepad
├── android
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ ├── co
│ │ │ └── touchlab
│ │ │ │ └── kurgan
│ │ │ │ └── play
│ │ │ │ └── notepad
│ │ │ │ └── Methods.kt
│ │ └── org
│ │ │ └── konan
│ │ │ └── calculator
│ │ │ └── MainActivity.kt
│ │ └── res
│ │ ├── drawable-hdpi
│ │ ├── app_notes.png
│ │ ├── ic_menu_compose.png
│ │ ├── ic_menu_delete.png
│ │ ├── ic_menu_edit.png
│ │ ├── ic_menu_revert.png
│ │ ├── ic_menu_save.png
│ │ └── live_folder_notes.png
│ │ ├── drawable-ldpi
│ │ ├── app_notes.png
│ │ └── live_folder_notes.png
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── app_notes.png
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_menu_compose.png
│ │ ├── ic_menu_delete.png
│ │ ├── ic_menu_edit.png
│ │ ├── ic_menu_revert.png
│ │ ├── ic_menu_save.png
│ │ └── live_folder_notes.png
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ ├── note_editor.xml
│ │ ├── noteslist_item.xml
│ │ └── title_editor.xml
│ │ ├── menu
│ │ ├── editor_options_menu.xml
│ │ ├── list_context_menu.xml
│ │ └── list_options_menu.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── ios
│ ├── build.gradle
│ ├── calculator.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ ├── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── xcuserdata
│ │ │ │ └── kgalligan.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── xcuserdata
│ │ │ └── kgalligan.xcuserdatad
│ │ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ │ └── xcschemes
│ │ │ └── xcschememanagement.plist
│ ├── calculator
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ ├── ioslibs
│ │ └── libdbarch.a
│ ├── klibrepo
│ │ ├── ios_arm64
│ │ │ ├── kurgan.klib
│ │ │ ├── objcsrc.klib
│ │ │ └── objcsrc.klib-build
│ │ │ │ ├── kotlin
│ │ │ │ └── objcsrc
│ │ │ │ │ └── objcsrc.kt
│ │ │ │ └── manifest.properties
│ │ └── ios_x64
│ │ │ ├── kurgan.klib
│ │ │ ├── objcsrc.klib
│ │ │ └── objcsrc.klib-build
│ │ │ ├── kotlin
│ │ │ └── objcsrc
│ │ │ │ └── objcsrc.kt
│ │ │ └── manifest.properties
│ └── src
│ │ └── main
│ │ └── kotlin
│ │ └── co
│ │ └── touchlab
│ │ └── kurgan
│ │ └── play
│ │ ├── PlayRuntime.kt
│ │ └── notepad
│ │ └── Methods.kt
└── src
│ └── main
│ ├── kotlin
│ └── co
│ │ └── touchlab
│ │ └── kurgan
│ │ └── play
│ │ └── notepad
│ │ └── Methods.kt
│ └── sqldelight
│ └── co
│ └── touchlab
│ └── kurgan
│ └── play
│ └── notepad
│ └── Note.sq
├── settings.gradle
└── simulatorscreen.png
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .idea/shelf
3 | *.iml
4 | /dependencies/all
5 | dist
6 | kotlin-native-*.tar.gz
7 | translator/src/test/kotlin/tests/*/linked
8 | out
9 | tmp
10 | workspace.xml
11 | *.versionsBackup
12 |
13 | local.properties
14 | .gradle
15 | build
16 | translator/.gradle/2.9/taskArtifacts
17 |
18 | kotstd/kotstd.iml
19 |
20 | # test suit products.
21 | *.bc
22 | *.bc.o
23 | *.kt.S
24 | *.kt.exe
25 | *.log
26 | test.output
27 | *.kexe
28 |
29 | # Ignore Gradle GUI config
30 | gradle-app.setting
31 |
32 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
33 | !gradle-wrapper.jar
34 |
35 | # Cache of project
36 | .gradletasknamecache
37 |
38 | # local project files
39 | lib/
40 | .idea/
41 | proto/compiler/protoc-artifacts
42 | proto/compiler/tests
43 |
44 | proto/compiler/google/src/google/protobuf/compiler/kotlin/bin
45 | proto/compiler/google/src/google/protobuf/compiler/kotlin/protoc
46 |
47 | peformance/build
48 |
49 | # translator auto generated artifacts
50 | kotstd/ll
51 |
52 | # test teamcity property: commitable only with -f
53 | backend.native/tests/teamcity-test.property
54 |
55 | # Sample output
56 | samples/**/*.kt.bc-build
57 | samples/androidNativeActivity/Polyhedron
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SQLite & SQLDelight Sample
2 |
3 | This example shows a first pass on creating a Kotlin/Native SQLite interface and common interface that is a stand in for Android's
4 | SQLite stack. It also includes SQLDelight's Kotlin Common source gen which allows multiplatform database development.
5 |
6 | ## Notes
7 |
8 | This is super, super early. The app does nothing except insert and query a bunch of data. Some of the architecture needs a rethink
9 | due to the threading model of Kotlin/Native. All the rest of the notes in [blog post](https://medium.com/@kpgalligan/sqlite-sqldelight-%EF%B8%8F-kotlin-multiplatform-f24fe7cba338)/video.
10 |
11 | ## Building
12 |
13 | Right now (11:19am Friday) the Android app compiles but won't actually do anything. May fix but that's not the interesting part of
14 | the demo, and I promised to publish this by today, so priorities.
15 |
16 | 1: Clone Kotlin/Native: https://github.com/JetBrains/kotlin-native.
17 |
18 | 2: Modify some source in Kotlin/Native. I've filed [an issue](https://github.com/JetBrains/kotlin-native/issues/1539),
19 | but for now, you need to remove the check code. Open the file:
20 | ```
21 | backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InteropLowering.kt
22 | ```
23 |
24 | Comment out a block starting at line 521 (example below starts at 519 for context).
25 |
26 | ```kotlin
27 | val initMethod = expression.descriptor.getObjCInitMethod()!!
28 |
29 | /*if (!expression.descriptor.objCConstructorIsDesignated()) {
30 | context.reportCompilationError(
31 | "Unable to call non-designated initializer as super constructor",
32 | currentFile,
33 | expression
34 | )
35 | }*/
36 |
37 | val initMethodInfo = initMethod.getExternalObjCMethodInfo()!!
38 | ```
39 |
40 | 3: Run the Kotlin/Native build steps:
41 | ```bash
42 | ./gradlew dependencies:update
43 | ./gradlew bundle
44 | ```
45 |
46 | 3a: Optional, but poke around some of the samples and make sure they work. The 'calculator' samples specifically. This is
47 | built on that.
48 |
49 | 4: Add that dir to your environment variables (I put in ~/.bash_profile)
50 | ```
51 | export KOTLIN_NATIVE_DIR=[Your path]
52 | ```
53 |
54 | 5: Download [J2objc 2.1.1](https://github.com/google/j2objc/releases/tag/2.1.1). Unzip to a local path. If you're not the
55 | self sabotaging type, I'd suggest a path with no spaces.
56 |
57 | 6: Add that to environment variables
58 | ```
59 | export J2OBJC_RUNTIME=[unzip path]
60 | ```
61 |
62 | ### Sanity Check!
63 |
64 | Here's my ~/.bash_profile
65 | ```
66 | export J2OBJC_RUNTIME=/Users/kgalligan/bin/j2objc-2.1.1
67 | export KOTLIN_NATIVE_DIR=/Users/kgalligan/temp2/kotlin-native
68 | ```
69 |
70 | I didn't mention it above, but you've got Xcode installed and you've built a few things with it. Especially something
71 | that will force the command line tools to be installed. If you haven't done options step 3a above, I'd say do it. Really
72 | shouldn't be optional.
73 |
74 | ### More Steps
75 |
76 | 7: Open Intellij and open this sample project in it. **Intellij**, not Android Studio. Might be OK, but haven't tried.
77 |
78 | 8: Manually run the task to generate the SQLDelight interfaces: generateSqlDelightInterface. I've been running that from the Gradle UI
79 | ":notepad>Tasks>sqldelight>generateSqlDelightInterface". Verify that those are built by looking in notepad/build/sqldelight. If not,
80 | you're probably not getting to the next steps.
81 |
82 | 9: Build the ios app specifically.
83 |
84 | ```bash
85 | ./gradlew :notepad:ios:build
86 | ```
87 |
88 | 10: Open the Xcode project. It's in 'notepad/ios'. Open 'calculator.xcodeproj' (For the non-Xcode crowd, it's a folder, but sort of not really)
89 |
90 | 11: Select a simulator profile, and run. It'll take *a while*. When it's done, you should see the following.
91 |
92 | 
93 |
94 | There are 2 buttons and a label. The "Insert Stuff" button will run the shared code found in:
95 |
96 | ```
97 | notepad/src/main/kotlin/co/touchlab/kurgan/play/notepad/Methods.kt
98 | ```
99 |
100 | This creates the database, then schedules 3 inserts of 15000 rows each, followed by a select of 10 rows. All is written to
101 | the console output, which should look like this.
102 |
103 | 
104 |
105 | What does "Memory" button do? Well, you'll need to learn how Kotlin/Native handles memory to fully understand, but it
106 | runs the insert loops and only cleans up memory at the end of it, as opposed to the first button with cleans on each loop.
107 | If you're interested, open the project in Instruments and open in "Leaks" profile. The first button will be flat. Second will
108 | have a sawtooth. Not super important for the demo, but interesting.
109 |
110 | ## FAQ
111 |
112 | Q: Can I try this in my app?
113 | A: Sure, but don't.
114 |
115 | Q: Where's the SQLite source?
116 | A: Well, I've learned quite a bit about Kotlin/Native architecture and threads, and there's some refactoring that's needed anyway. For example,
117 | you can get a blob from results, but can't pass one to a query. I'll have another release in a few weeks with other bits. The actual SQLite
118 | code is from Doppl, so you can see that [here](https://doppllib.github.io/).
119 |
120 | Q: The generated SQLDelight isn't compiling!
121 | A: SQLdelight with Kotlin is being heavily developed, and to get the Kotlin/Native build, I need source, so the runtime is copy/pasted, but
122 | the generator code is looking at a SNAPSHOT. If that's been updated, it might break (it did for me 2 hours before my talk). Ping me on
123 | twitter at [@kpgalligan](https://twitter.com/kpgalligan) if this is happening and I'll republish.
124 |
125 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.buildConfig = [
3 | 'compileSdk': 27,
4 | 'minSdk' : 24,
5 | 'targetSdk' : 27,
6 |
7 | 'version' : [
8 | 'major': 1,
9 | 'minor': 2,
10 | 'patch': 1,
11 | 'build': 0,
12 | ],
13 | ]
14 |
15 | ext.versions = [
16 | 'supportLibrary' : '27.1.0',
17 | 'kotlin' : '1.2.41',
18 | 'kotlinCoroutines': '0.22.5',
19 | 'sqldelight' : '1.0.0-SNAPSHOT'
20 | ]
21 |
22 | ext.deps = [
23 | 'kotlin' : [
24 | 'stdlib' : [
25 | 'common': "org.jetbrains.kotlin:kotlin-stdlib-common:${versions.kotlin}",
26 | 'jdk' : "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}",
27 | 'js' : "org.jetbrains.kotlin:kotlin-stdlib-js:${versions.kotlin}",
28 | ],
29 | 'coroutines': [
30 | 'common' : "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:${versions.kotlinCoroutines}",
31 | 'jdk' : "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.kotlinCoroutines}",
32 | 'js' : "org.jetbrains.kotlinx:kotlinx-coroutines-core-js:${versions.kotlinCoroutines}",
33 | 'android': "org.jetbrains.kotlinx:kotlinx-coroutines-android:${versions.kotlinCoroutines}",
34 | 'rx2' : "org.jetbrains.kotlinx:kotlinx-coroutines-rx2:${versions.kotlinCoroutines}",
35 | ],
36 | ],
37 | 'android' : [
38 | 'arch': [
39 | 'dbFramework': 'android.arch.persistence:db-framework:1.0.0',
40 | ],
41 | ],
42 |
43 | 'sqldelight': [
44 | 'android': "com.squareup.sqldelight:android-driver:${versions.sqldelight}",
45 | 'runtime': "com.squareup.sqldelight:runtime:${versions.sqldelight}",
46 | ]
47 | ]
48 |
49 | repositories {
50 | jcenter()
51 | google()
52 | maven { url "https://kotlin.bintray.com/kotlinx" }
53 | gradlePluginPortal()
54 | maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
55 | maven { url 'https://dl.bintray.com/doppllib/j2objc' }
56 | // maven { url j2objcMavenDeploy }
57 | }
58 |
59 | dependencies {
60 | classpath 'com.android.tools.build:gradle:3.2.0-alpha08'
61 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
62 | classpath "com.squareup.sqldelight:gradle-plugin:${versions.sqldelight}"
63 | classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:${project.property('konan.plugin.version')}"
64 | }
65 | }
66 |
67 | allprojects {
68 | repositories {
69 | jcenter()
70 | google()
71 | maven { url "https://kotlin.bintray.com/kotlinx" }
72 | maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
73 | maven { url 'https://dl.bintray.com/doppllib/j2objc' }
74 | // maven { url j2objcMavenDeploy }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/consoleout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/consoleout.png
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | konan.home=/Users/kgalligan/temp3/kotlin-native/dist
2 | #konan.version=0.7
3 | konan.plugin.version=+
4 | j2objc_runtime=2.1.1
5 | org.gradle.configureondemand=false
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 18 10:33:08 EDT 2018
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # 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=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @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=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/notepad/android/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | //apply plugin: 'org.jetbrains.kotlin.platform.common'
3 | //apply plugin: 'kotlin-platform-android'
4 | apply plugin: 'org.jetbrains.kotlin.platform.android'
5 | apply plugin: 'kotlin-kapt'
6 |
7 | android {
8 | compileSdkVersion buildConfig.compileSdk
9 |
10 | defaultConfig {
11 | minSdkVersion buildConfig.minSdk
12 |
13 | testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
14 | }
15 |
16 | compileOptions {
17 | sourceCompatibility JavaVersion.VERSION_1_8
18 | targetCompatibility JavaVersion.VERSION_1_8
19 | }
20 |
21 | }
22 |
23 | dependencies {
24 | expectedBy project(':notepad')
25 |
26 | implementation deps.kotlin.stdlib.jdk
27 | implementation deps.sqldelight.android
28 | implementation deps.android.arch.dbFramework
29 |
30 | implementation "com.android.support:appcompat-v7:27.1.1"
31 | }
32 |
33 | kotlin {
34 | experimental {
35 | coroutines 'enable'
36 | }
37 | }
38 |
39 | tasks.getByName("preBuild").dependsOn(":notepad:generateSqlDelightInterface")
40 |
--------------------------------------------------------------------------------
/notepad/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
11 |
12 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/notepad/android/src/main/kotlin/co/touchlab/kurgan/play/notepad/Methods.kt:
--------------------------------------------------------------------------------
1 | package co.touchlab.kurgan.play.notepad
2 |
3 | import java.util.concurrent.*
4 | import co.touchlab.kurgan.architecture.database.sqldelight.SqlDelightDatabaseHelper
5 |
6 | actual fun memzy(body: () -> Unit) = body()
7 |
8 | private val executorService = Executors.newSingleThreadExecutor()
9 | private val mainHandler = android.os.Handler(android.os.Looper.getMainLooper())
10 |
11 |
12 | actual fun runOnBackground(workerData: WorkerData){
13 | executorService.execute {
14 | r.run()
15 | }
16 | }
17 |
18 | actual fun createHolder(db: SqlDelightDatabaseHelper)= HelperHolder(db)
19 |
20 | /*
21 | actual fun runOnMain(r:Runner){
22 | mainHandler.post {
23 | r.run()
24 | }
25 | }*/
26 |
--------------------------------------------------------------------------------
/notepad/android/src/main/kotlin/org/konan/calculator/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package org.konan.calculator
2 |
3 | import android.os.Bundle
4 | import android.support.v7.app.AppCompatActivity
5 | import android.widget.EditText
6 | import android.widget.TextView
7 | import co.touchlab.kurgan.play.notepad.Note
8 | //import org.konan.arithmeticparser.parseAndCompute
9 |
10 | class MainActivity : AppCompatActivity() {
11 |
12 | override fun onCreate(savedInstanceState: Bundle?) {
13 | super.onCreate(savedInstanceState)
14 |
15 | val notez:Note? = null
16 |
17 | setContentView(R.layout.activity_main)
18 |
19 | val resultView = findViewById(R.id.computed_result)
20 |
21 | val input = findViewById(R.id.input)
22 | input.setOnEditorActionListener { input, _, _ ->
23 | val inputText = input.text.toString()
24 | /*val result = parseAndCompute(inputText).expression
25 | with(resultView) {
26 | text = if (result != null) inputText + " = " + result.toString() else "Unable to parse " + inputText
27 | }*/
28 | true
29 | }
30 | }
31 |
32 | }
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable-hdpi/app_notes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/drawable-hdpi/app_notes.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable-hdpi/ic_menu_compose.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/drawable-hdpi/ic_menu_compose.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable-hdpi/ic_menu_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/drawable-hdpi/ic_menu_delete.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable-hdpi/ic_menu_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/drawable-hdpi/ic_menu_edit.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable-hdpi/ic_menu_revert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/drawable-hdpi/ic_menu_revert.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable-hdpi/ic_menu_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/drawable-hdpi/ic_menu_save.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable-hdpi/live_folder_notes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/drawable-hdpi/live_folder_notes.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable-ldpi/app_notes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/drawable-ldpi/app_notes.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable-ldpi/live_folder_notes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/drawable-ldpi/live_folder_notes.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable/app_notes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/drawable/app_notes.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable/ic_menu_compose.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/drawable/ic_menu_compose.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable/ic_menu_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/drawable/ic_menu_delete.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable/ic_menu_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/drawable/ic_menu_edit.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable/ic_menu_revert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/drawable/ic_menu_revert.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable/ic_menu_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/drawable/ic_menu_save.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/drawable/live_folder_notes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/drawable/live_folder_notes.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
19 |
20 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/notepad/android/src/main/res/layout/note_editor.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
29 |
--------------------------------------------------------------------------------
/notepad/android/src/main/res/layout/noteslist_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
26 |
--------------------------------------------------------------------------------
/notepad/android/src/main/res/layout/title_editor.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
24 |
25 |
35 |
36 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/notepad/android/src/main/res/menu/editor_options_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/notepad/android/src/main/res/menu/list_context_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/notepad/android/src/main/res/menu/list_options_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/notepad/android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/notepad/android/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/notepad/android/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/notepad/android/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/notepad/android/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 | NotePad
19 | Notes
20 |
21 | Note title:
22 | New note
23 | Edit: %1$s
24 | Notes
25 |
26 | New note
27 | Save
28 | Delete
29 | Open
30 | Revert changes
31 | Copy
32 | Paste
33 |
34 | OK
35 | Title:
36 |
37 | Edit note
38 | Edit title
39 |
40 | Error
41 | Error loading note
42 | There is nothing to save
43 | Blank title not saved
44 |
--------------------------------------------------------------------------------
/notepad/android/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/notepad/build.gradle:
--------------------------------------------------------------------------------
1 | //apply plugin: 'kotlin-platform-common'
2 | apply plugin: 'org.jetbrains.kotlin.platform.common'
3 | apply plugin: 'com.squareup.sqldelight'
4 |
5 | //group = 'org.jetbrains.kotlin.konan.samples'
6 |
7 | dependencies {
8 | implementation deps.kotlin.stdlib.common
9 | implementation deps.sqldelight.runtime
10 | implementation "co.touchlab.kurgan:kurgan-common:0.1"
11 | }
12 |
13 | kotlin {
14 | experimental {
15 | coroutines 'enable'
16 | }
17 | }
18 |
19 | sqldelight {
20 | packageName = "co.touchlab.kurgan.play.notepad"
21 | }
22 |
23 | //compileKotlinCommon.dependsOn("generateSqlDelightInterface")
24 | //tasks.findByName("compileKotlinCommon")?.dependsOn(tasks.findByName("generateSqlDelightInterface"))
25 | //tasks.getByName("build").dependsOn("generateSqlDelightInterface")
--------------------------------------------------------------------------------
/notepad/ios/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'konan'
2 |
3 | konan.targets = ['iphone', 'iphone_sim']
4 |
5 | def j2objcRuntime = System.getenv('J2OBJC_RUNTIME')
6 |
7 | konanArtifacts {
8 | framework('KotlinArithmeticParser') {
9 | target('iphone') {
10 | libraries {
11 | klib 'kurgan'
12 | klib 'objcsrc'
13 |
14 | useRepo 'klibrepo/ios_arm64'
15 | }
16 | }
17 |
18 | target('iphone_sim') {
19 | libraries {
20 | klib 'kurgan'
21 | klib 'objcsrc'
22 |
23 | useRepo 'klibrepo/ios_x64'
24 | }
25 | }
26 |
27 | linkerOpts "-L${j2objcRuntime}/lib", "-Lioslibs"
28 | enableMultiplatform true
29 | }
30 | }
31 |
32 | dependencies {
33 | expectedBy project(':notepad')
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/notepad/ios/calculator.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 48;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 2C3F38451FD1738300151601 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C3F38441FD1738300151601 /* AppDelegate.swift */; };
11 | 2C3F38471FD1738300151601 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C3F38461FD1738300151601 /* ViewController.swift */; };
12 | 2C3F384A1FD1738300151601 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2C3F38481FD1738300151601 /* Main.storyboard */; };
13 | 2C3F384C1FD1738300151601 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C3F384B1FD1738300151601 /* Assets.xcassets */; };
14 | 2C3F384F1FD1738300151601 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2C3F384D1FD1738300151601 /* LaunchScreen.storyboard */; };
15 | 7FE128BF205854BA0064CE74 /* KotlinArithmeticParser.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7FF94AD92058464C00590D0D /* KotlinArithmeticParser.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
16 | 7FF94AE32058483900590D0D /* KotlinArithmeticParser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7FF94AD92058464C00590D0D /* KotlinArithmeticParser.framework */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXCopyFilesBuildPhase section */
20 | 7FE128BE2058549E0064CE74 /* Embed Frameworks */ = {
21 | isa = PBXCopyFilesBuildPhase;
22 | buildActionMask = 2147483647;
23 | dstPath = "";
24 | dstSubfolderSpec = 10;
25 | files = (
26 | 7FE128BF205854BA0064CE74 /* KotlinArithmeticParser.framework in Embed Frameworks */,
27 | );
28 | name = "Embed Frameworks";
29 | runOnlyForDeploymentPostprocessing = 0;
30 | };
31 | /* End PBXCopyFilesBuildPhase section */
32 |
33 | /* Begin PBXFileReference section */
34 | 2C3F38411FD1738300151601 /* KotlinCalculator.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KotlinCalculator.app; sourceTree = BUILT_PRODUCTS_DIR; };
35 | 2C3F38441FD1738300151601 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
36 | 2C3F38461FD1738300151601 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
37 | 2C3F38491FD1738300151601 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
38 | 2C3F384B1FD1738300151601 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
39 | 2C3F384E1FD1738300151601 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
40 | 2C3F38501FD1738300151601 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
41 | 7FF94AD92058464C00590D0D /* KotlinArithmeticParser.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = KotlinArithmeticParser.framework; sourceTree = BUILT_PRODUCTS_DIR; };
42 | 7FF94AEA2058485300590D0D /* Parser.kt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Parser.kt; sourceTree = ""; };
43 | /* End PBXFileReference section */
44 |
45 | /* Begin PBXFrameworksBuildPhase section */
46 | 2C3F383E1FD1738300151601 /* Frameworks */ = {
47 | isa = PBXFrameworksBuildPhase;
48 | buildActionMask = 2147483647;
49 | files = (
50 | 7FF94AE32058483900590D0D /* KotlinArithmeticParser.framework in Frameworks */,
51 | );
52 | runOnlyForDeploymentPostprocessing = 0;
53 | };
54 | /* End PBXFrameworksBuildPhase section */
55 |
56 | /* Begin PBXGroup section */
57 | 2C3F38381FD1738300151601 = {
58 | isa = PBXGroup;
59 | children = (
60 | 2C3F38431FD1738300151601 /* calculator */,
61 | 7FF94ADA2058464C00590D0D /* KotlinArithmeticParser */,
62 | 2C3F38421FD1738300151601 /* Products */,
63 | 7FF94AE22058483900590D0D /* Frameworks */,
64 | );
65 | sourceTree = "";
66 | };
67 | 2C3F38421FD1738300151601 /* Products */ = {
68 | isa = PBXGroup;
69 | children = (
70 | 2C3F38411FD1738300151601 /* KotlinCalculator.app */,
71 | 7FF94AD92058464C00590D0D /* KotlinArithmeticParser.framework */,
72 | );
73 | name = Products;
74 | sourceTree = "";
75 | };
76 | 2C3F38431FD1738300151601 /* calculator */ = {
77 | isa = PBXGroup;
78 | children = (
79 | 2C3F38441FD1738300151601 /* AppDelegate.swift */,
80 | 2C3F38461FD1738300151601 /* ViewController.swift */,
81 | 2C3F38481FD1738300151601 /* Main.storyboard */,
82 | 2C3F384B1FD1738300151601 /* Assets.xcassets */,
83 | 2C3F384D1FD1738300151601 /* LaunchScreen.storyboard */,
84 | 2C3F38501FD1738300151601 /* Info.plist */,
85 | );
86 | path = calculator;
87 | sourceTree = "";
88 | };
89 | 7FF94ADA2058464C00590D0D /* KotlinArithmeticParser */ = {
90 | isa = PBXGroup;
91 | children = (
92 | 7FF94AE42058485300590D0D /* src */,
93 | );
94 | name = KotlinArithmeticParser;
95 | sourceTree = "";
96 | };
97 | 7FF94AE22058483900590D0D /* Frameworks */ = {
98 | isa = PBXGroup;
99 | children = (
100 | );
101 | name = Frameworks;
102 | sourceTree = "";
103 | };
104 | 7FF94AE42058485300590D0D /* src */ = {
105 | isa = PBXGroup;
106 | children = (
107 | 7FF94AE52058485300590D0D /* main */,
108 | );
109 | name = src;
110 | path = ../common/src;
111 | sourceTree = SOURCE_ROOT;
112 | };
113 | 7FF94AE52058485300590D0D /* main */ = {
114 | isa = PBXGroup;
115 | children = (
116 | 7FF94AE62058485300590D0D /* kotlin */,
117 | );
118 | path = main;
119 | sourceTree = "";
120 | };
121 | 7FF94AE62058485300590D0D /* kotlin */ = {
122 | isa = PBXGroup;
123 | children = (
124 | 7FF94AE72058485300590D0D /* org */,
125 | );
126 | path = kotlin;
127 | sourceTree = "";
128 | };
129 | 7FF94AE72058485300590D0D /* org */ = {
130 | isa = PBXGroup;
131 | children = (
132 | 7FF94AE82058485300590D0D /* konan */,
133 | );
134 | path = org;
135 | sourceTree = "";
136 | };
137 | 7FF94AE82058485300590D0D /* konan */ = {
138 | isa = PBXGroup;
139 | children = (
140 | 7FF94AE92058485300590D0D /* arithmeticparser */,
141 | );
142 | path = konan;
143 | sourceTree = "";
144 | };
145 | 7FF94AE92058485300590D0D /* arithmeticparser */ = {
146 | isa = PBXGroup;
147 | children = (
148 | 7FF94AEA2058485300590D0D /* Parser.kt */,
149 | );
150 | path = arithmeticparser;
151 | sourceTree = "";
152 | };
153 | /* End PBXGroup section */
154 |
155 | /* Begin PBXNativeTarget section */
156 | 2C3F38401FD1738300151601 /* KotlinCalculator */ = {
157 | isa = PBXNativeTarget;
158 | buildConfigurationList = 2C3F38531FD1738300151601 /* Build configuration list for PBXNativeTarget "KotlinCalculator" */;
159 | buildPhases = (
160 | 2C3F383D1FD1738300151601 /* Sources */,
161 | 2C3F383E1FD1738300151601 /* Frameworks */,
162 | 2C3F383F1FD1738300151601 /* Resources */,
163 | 7FE128BE2058549E0064CE74 /* Embed Frameworks */,
164 | );
165 | buildRules = (
166 | );
167 | dependencies = (
168 | );
169 | name = KotlinCalculator;
170 | productName = calculator;
171 | productReference = 2C3F38411FD1738300151601 /* KotlinCalculator.app */;
172 | productType = "com.apple.product-type.application";
173 | };
174 | 7FF94AD82058464C00590D0D /* KotlinArithmeticParser */ = {
175 | isa = PBXNativeTarget;
176 | buildConfigurationList = 7FF94ADE2058464C00590D0D /* Build configuration list for PBXNativeTarget "KotlinArithmeticParser" */;
177 | buildPhases = (
178 | 7FF94AE12058466D00590D0D /* Compile Kotlin/Native */,
179 | );
180 | buildRules = (
181 | );
182 | dependencies = (
183 | );
184 | name = KotlinArithmeticParser;
185 | productName = KotlinArithmeticParser;
186 | productReference = 7FF94AD92058464C00590D0D /* KotlinArithmeticParser.framework */;
187 | productType = "com.apple.product-type.framework";
188 | };
189 | /* End PBXNativeTarget section */
190 |
191 | /* Begin PBXProject section */
192 | 2C3F38391FD1738300151601 /* Project object */ = {
193 | isa = PBXProject;
194 | attributes = {
195 | LastSwiftUpdateCheck = 0900;
196 | LastUpgradeCheck = 0900;
197 | ORGANIZATIONNAME = JetBrains;
198 | TargetAttributes = {
199 | 2C3F38401FD1738300151601 = {
200 | CreatedOnToolsVersion = 9.0;
201 | ProvisioningStyle = Automatic;
202 | };
203 | 7FF94AD82058464C00590D0D = {
204 | CreatedOnToolsVersion = 9.2;
205 | ProvisioningStyle = Automatic;
206 | };
207 | };
208 | };
209 | buildConfigurationList = 2C3F383C1FD1738300151601 /* Build configuration list for PBXProject "calculator" */;
210 | compatibilityVersion = "Xcode 8.0";
211 | developmentRegion = en;
212 | hasScannedForEncodings = 0;
213 | knownRegions = (
214 | en,
215 | Base,
216 | );
217 | mainGroup = 2C3F38381FD1738300151601;
218 | productRefGroup = 2C3F38421FD1738300151601 /* Products */;
219 | projectDirPath = "";
220 | projectRoot = "";
221 | targets = (
222 | 2C3F38401FD1738300151601 /* KotlinCalculator */,
223 | 7FF94AD82058464C00590D0D /* KotlinArithmeticParser */,
224 | );
225 | };
226 | /* End PBXProject section */
227 |
228 | /* Begin PBXResourcesBuildPhase section */
229 | 2C3F383F1FD1738300151601 /* Resources */ = {
230 | isa = PBXResourcesBuildPhase;
231 | buildActionMask = 2147483647;
232 | files = (
233 | 2C3F384F1FD1738300151601 /* LaunchScreen.storyboard in Resources */,
234 | 2C3F384C1FD1738300151601 /* Assets.xcassets in Resources */,
235 | 2C3F384A1FD1738300151601 /* Main.storyboard in Resources */,
236 | );
237 | runOnlyForDeploymentPostprocessing = 0;
238 | };
239 | /* End PBXResourcesBuildPhase section */
240 |
241 | /* Begin PBXShellScriptBuildPhase section */
242 | 7FF94AE12058466D00590D0D /* Compile Kotlin/Native */ = {
243 | isa = PBXShellScriptBuildPhase;
244 | buildActionMask = 2147483647;
245 | files = (
246 | );
247 | inputPaths = (
248 | );
249 | name = "Compile Kotlin/Native";
250 | outputPaths = (
251 | );
252 | runOnlyForDeploymentPostprocessing = 0;
253 | shellPath = /bin/sh;
254 | shellScript = "\"$SRCROOT/../../gradlew\" -p \"$SRCROOT\" \"$KONAN_TASK\" --no-daemon -Pkonan.useEnvironmentVariables=true";
255 | };
256 | /* End PBXShellScriptBuildPhase section */
257 |
258 | /* Begin PBXSourcesBuildPhase section */
259 | 2C3F383D1FD1738300151601 /* Sources */ = {
260 | isa = PBXSourcesBuildPhase;
261 | buildActionMask = 2147483647;
262 | files = (
263 | 2C3F38471FD1738300151601 /* ViewController.swift in Sources */,
264 | 2C3F38451FD1738300151601 /* AppDelegate.swift in Sources */,
265 | );
266 | runOnlyForDeploymentPostprocessing = 0;
267 | };
268 | /* End PBXSourcesBuildPhase section */
269 |
270 | /* Begin PBXVariantGroup section */
271 | 2C3F38481FD1738300151601 /* Main.storyboard */ = {
272 | isa = PBXVariantGroup;
273 | children = (
274 | 2C3F38491FD1738300151601 /* Base */,
275 | );
276 | name = Main.storyboard;
277 | sourceTree = "";
278 | };
279 | 2C3F384D1FD1738300151601 /* LaunchScreen.storyboard */ = {
280 | isa = PBXVariantGroup;
281 | children = (
282 | 2C3F384E1FD1738300151601 /* Base */,
283 | );
284 | name = LaunchScreen.storyboard;
285 | sourceTree = "";
286 | };
287 | /* End PBXVariantGroup section */
288 |
289 | /* Begin XCBuildConfiguration section */
290 | 2C3F38511FD1738300151601 /* Debug */ = {
291 | isa = XCBuildConfiguration;
292 | buildSettings = {
293 | ALWAYS_SEARCH_USER_PATHS = NO;
294 | CLANG_ANALYZER_NONNULL = YES;
295 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
296 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
297 | CLANG_CXX_LIBRARY = "libc++";
298 | CLANG_ENABLE_MODULES = YES;
299 | CLANG_ENABLE_OBJC_ARC = YES;
300 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
301 | CLANG_WARN_BOOL_CONVERSION = YES;
302 | CLANG_WARN_COMMA = YES;
303 | CLANG_WARN_CONSTANT_CONVERSION = YES;
304 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
305 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
306 | CLANG_WARN_EMPTY_BODY = YES;
307 | CLANG_WARN_ENUM_CONVERSION = YES;
308 | CLANG_WARN_INFINITE_RECURSION = YES;
309 | CLANG_WARN_INT_CONVERSION = YES;
310 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
311 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
312 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
313 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
314 | CLANG_WARN_STRICT_PROTOTYPES = YES;
315 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
316 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
317 | CLANG_WARN_UNREACHABLE_CODE = YES;
318 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
319 | CODE_SIGN_IDENTITY = "iPhone Developer";
320 | COPY_PHASE_STRIP = NO;
321 | DEBUG_INFORMATION_FORMAT = dwarf;
322 | ENABLE_STRICT_OBJC_MSGSEND = YES;
323 | ENABLE_TESTABILITY = YES;
324 | GCC_C_LANGUAGE_STANDARD = gnu11;
325 | GCC_DYNAMIC_NO_PIC = NO;
326 | GCC_NO_COMMON_BLOCKS = YES;
327 | GCC_OPTIMIZATION_LEVEL = 0;
328 | GCC_PREPROCESSOR_DEFINITIONS = (
329 | "DEBUG=1",
330 | "$(inherited)",
331 | );
332 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
333 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
334 | GCC_WARN_UNDECLARED_SELECTOR = YES;
335 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
336 | GCC_WARN_UNUSED_FUNCTION = YES;
337 | GCC_WARN_UNUSED_VARIABLE = YES;
338 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
339 | MTL_ENABLE_DEBUG_INFO = YES;
340 | ONLY_ACTIVE_ARCH = YES;
341 | SDKROOT = iphoneos;
342 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
343 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
344 | };
345 | name = Debug;
346 | };
347 | 2C3F38521FD1738300151601 /* Release */ = {
348 | isa = XCBuildConfiguration;
349 | buildSettings = {
350 | ALWAYS_SEARCH_USER_PATHS = NO;
351 | CLANG_ANALYZER_NONNULL = YES;
352 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
353 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
354 | CLANG_CXX_LIBRARY = "libc++";
355 | CLANG_ENABLE_MODULES = YES;
356 | CLANG_ENABLE_OBJC_ARC = YES;
357 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
358 | CLANG_WARN_BOOL_CONVERSION = YES;
359 | CLANG_WARN_COMMA = YES;
360 | CLANG_WARN_CONSTANT_CONVERSION = YES;
361 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
362 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
363 | CLANG_WARN_EMPTY_BODY = YES;
364 | CLANG_WARN_ENUM_CONVERSION = YES;
365 | CLANG_WARN_INFINITE_RECURSION = YES;
366 | CLANG_WARN_INT_CONVERSION = YES;
367 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
368 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
369 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
370 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
371 | CLANG_WARN_STRICT_PROTOTYPES = YES;
372 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
373 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
374 | CLANG_WARN_UNREACHABLE_CODE = YES;
375 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
376 | CODE_SIGN_IDENTITY = "iPhone Developer";
377 | COPY_PHASE_STRIP = NO;
378 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
379 | ENABLE_NS_ASSERTIONS = NO;
380 | ENABLE_STRICT_OBJC_MSGSEND = YES;
381 | GCC_C_LANGUAGE_STANDARD = gnu11;
382 | GCC_NO_COMMON_BLOCKS = YES;
383 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
384 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
385 | GCC_WARN_UNDECLARED_SELECTOR = YES;
386 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
387 | GCC_WARN_UNUSED_FUNCTION = YES;
388 | GCC_WARN_UNUSED_VARIABLE = YES;
389 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
390 | MTL_ENABLE_DEBUG_INFO = NO;
391 | SDKROOT = iphoneos;
392 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
393 | VALIDATE_PRODUCT = YES;
394 | };
395 | name = Release;
396 | };
397 | 2C3F38541FD1738300151601 /* Debug */ = {
398 | isa = XCBuildConfiguration;
399 | buildSettings = {
400 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
401 | CODE_SIGN_STYLE = Automatic;
402 | DEVELOPMENT_TEAM = 2UER9BPG44;
403 | ENABLE_BITCODE = NO;
404 | FRAMEWORK_SEARCH_PATHS = $BUILT_PRODUCTS_DIR;
405 | INFOPLIST_FILE = calculator/Info.plist;
406 | IPHONEOS_DEPLOYMENT_TARGET = 10.3;
407 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
408 | PRODUCT_BUNDLE_IDENTIFIER = org.jetbrains.konan.calculator.kgsizzle2;
409 | PRODUCT_NAME = "$(TARGET_NAME)";
410 | SWIFT_VERSION = 4.0;
411 | TARGETED_DEVICE_FAMILY = "1,2";
412 | VALID_ARCHS = arm64;
413 | };
414 | name = Debug;
415 | };
416 | 2C3F38551FD1738300151601 /* Release */ = {
417 | isa = XCBuildConfiguration;
418 | buildSettings = {
419 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
420 | CODE_SIGN_STYLE = Automatic;
421 | DEVELOPMENT_TEAM = 2UER9BPG44;
422 | ENABLE_BITCODE = NO;
423 | FRAMEWORK_SEARCH_PATHS = $BUILT_PRODUCTS_DIR;
424 | INFOPLIST_FILE = calculator/Info.plist;
425 | IPHONEOS_DEPLOYMENT_TARGET = 10.3;
426 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
427 | PRODUCT_BUNDLE_IDENTIFIER = org.jetbrains.konan.calculator.kgsizzle2;
428 | PRODUCT_NAME = "$(TARGET_NAME)";
429 | SWIFT_VERSION = 4.0;
430 | TARGETED_DEVICE_FAMILY = "1,2";
431 | VALID_ARCHS = arm64;
432 | };
433 | name = Release;
434 | };
435 | 7FF94ADF2058464C00590D0D /* Debug */ = {
436 | isa = XCBuildConfiguration;
437 | buildSettings = {
438 | CODE_SIGN_IDENTITY = "";
439 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
440 | CODE_SIGN_STYLE = Automatic;
441 | CURRENT_PROJECT_VERSION = 1;
442 | DEVELOPMENT_TEAM = "";
443 | DYLIB_COMPATIBILITY_VERSION = 1;
444 | DYLIB_CURRENT_VERSION = 1;
445 | DYLIB_INSTALL_NAME_BASE = "@rpath";
446 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
447 | IPHONEOS_DEPLOYMENT_TARGET = 11.2;
448 | KONAN_ENABLE_OPTIMIZATIONS = NO;
449 | KONAN_TASK = "";
450 | "KONAN_TASK[sdk=iphoneos*]" = compileKonanKotlinArithmeticParserIos_arm64;
451 | "KONAN_TASK[sdk=iphonesimulator*]" = compileKonanKotlinArithmeticParserIos_x64;
452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
453 | OTHER_LDFLAGS = "";
454 | PRODUCT_BUNDLE_IDENTIFIER = JetBrains.KotlinArithmeticParser;
455 | PRODUCT_MODULE_NAME = "_$(PRODUCT_NAME:c99extidentifier)";
456 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
457 | PROVISIONING_PROFILE_SPECIFIER = "";
458 | SKIP_INSTALL = YES;
459 | TARGETED_DEVICE_FAMILY = "1,2";
460 | VALID_ARCHS = arm64;
461 | VERSIONING_SYSTEM = "apple-generic";
462 | VERSION_INFO_PREFIX = "";
463 | };
464 | name = Debug;
465 | };
466 | 7FF94AE02058464C00590D0D /* Release */ = {
467 | isa = XCBuildConfiguration;
468 | buildSettings = {
469 | CODE_SIGN_IDENTITY = "";
470 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
471 | CODE_SIGN_STYLE = Automatic;
472 | CURRENT_PROJECT_VERSION = 1;
473 | DEVELOPMENT_TEAM = "";
474 | DYLIB_COMPATIBILITY_VERSION = 1;
475 | DYLIB_CURRENT_VERSION = 1;
476 | DYLIB_INSTALL_NAME_BASE = "@rpath";
477 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
478 | IPHONEOS_DEPLOYMENT_TARGET = 11.2;
479 | KONAN_ENABLE_OPTIMIZATIONS = YES;
480 | KONAN_TASK = "";
481 | "KONAN_TASK[sdk=iphoneos*]" = compileKonanKotlinArithmeticParserIos_arm64;
482 | "KONAN_TASK[sdk=iphonesimulator*]" = compileKonanKotlinArithmeticParserIos_x64;
483 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
484 | OTHER_LDFLAGS = "";
485 | PRODUCT_BUNDLE_IDENTIFIER = JetBrains.KotlinArithmeticParser;
486 | PRODUCT_MODULE_NAME = "_$(PRODUCT_NAME:c99extidentifier)";
487 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
488 | PROVISIONING_PROFILE_SPECIFIER = "";
489 | SKIP_INSTALL = YES;
490 | TARGETED_DEVICE_FAMILY = "1,2";
491 | VALID_ARCHS = arm64;
492 | VERSIONING_SYSTEM = "apple-generic";
493 | VERSION_INFO_PREFIX = "";
494 | };
495 | name = Release;
496 | };
497 | /* End XCBuildConfiguration section */
498 |
499 | /* Begin XCConfigurationList section */
500 | 2C3F383C1FD1738300151601 /* Build configuration list for PBXProject "calculator" */ = {
501 | isa = XCConfigurationList;
502 | buildConfigurations = (
503 | 2C3F38511FD1738300151601 /* Debug */,
504 | 2C3F38521FD1738300151601 /* Release */,
505 | );
506 | defaultConfigurationIsVisible = 0;
507 | defaultConfigurationName = Release;
508 | };
509 | 2C3F38531FD1738300151601 /* Build configuration list for PBXNativeTarget "KotlinCalculator" */ = {
510 | isa = XCConfigurationList;
511 | buildConfigurations = (
512 | 2C3F38541FD1738300151601 /* Debug */,
513 | 2C3F38551FD1738300151601 /* Release */,
514 | );
515 | defaultConfigurationIsVisible = 0;
516 | defaultConfigurationName = Release;
517 | };
518 | 7FF94ADE2058464C00590D0D /* Build configuration list for PBXNativeTarget "KotlinArithmeticParser" */ = {
519 | isa = XCConfigurationList;
520 | buildConfigurations = (
521 | 7FF94ADF2058464C00590D0D /* Debug */,
522 | 7FF94AE02058464C00590D0D /* Release */,
523 | );
524 | defaultConfigurationIsVisible = 0;
525 | defaultConfigurationName = Release;
526 | };
527 | /* End XCConfigurationList section */
528 | };
529 | rootObject = 2C3F38391FD1738300151601 /* Project object */;
530 | }
531 |
--------------------------------------------------------------------------------
/notepad/ios/calculator.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/notepad/ios/calculator.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/notepad/ios/calculator.xcodeproj/project.xcworkspace/xcuserdata/kgalligan.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/ios/calculator.xcodeproj/project.xcworkspace/xcuserdata/kgalligan.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/notepad/ios/calculator.xcodeproj/xcuserdata/kgalligan.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/notepad/ios/calculator.xcodeproj/xcuserdata/kgalligan.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | KotlinArithmeticParser.xcscheme
8 |
9 | orderHint
10 | 1
11 |
12 | KotlinCalculator.xcscheme
13 |
14 | orderHint
15 | 0
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/notepad/ios/calculator/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // calculator
4 | //
5 | // Created by jetbrains on 01/12/2017.
6 | // Copyright © 2017 JetBrains. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import KotlinArithmeticParser
11 |
12 | @UIApplicationMain
13 | class AppDelegate: UIResponder, UIApplicationDelegate {
14 |
15 | var window: UIWindow?
16 |
17 |
18 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
19 |
20 | return true
21 | }
22 |
23 | func applicationWillResignActive(_ application: UIApplication) {
24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
26 | }
27 |
28 | func applicationDidEnterBackground(_ application: UIApplication) {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | func applicationWillEnterForeground(_ application: UIApplication) {
34 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | func applicationDidBecomeActive(_ application: UIApplication) {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | func applicationWillTerminate(_ application: UIApplication) {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 |
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/notepad/ios/calculator/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | }
88 | ],
89 | "info" : {
90 | "version" : 1,
91 | "author" : "xcode"
92 | }
93 | }
--------------------------------------------------------------------------------
/notepad/ios/calculator/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/notepad/ios/calculator/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
29 |
36 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/notepad/ios/calculator/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | KotlinCalc
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/notepad/ios/calculator/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // calculator
4 | //
5 | // Created by jetbrains on 01/12/2017.
6 | // Copyright © 2017 JetBrains. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import KotlinArithmeticParser
11 |
12 | class ViewController: UIViewController {
13 | var playRuntime: KAPPlayRuntime?
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 | // Do any additional setup after loading the view, typically from a nib.
18 |
19 | }
20 |
21 | override func didReceiveMemoryWarning() {
22 | super.didReceiveMemoryWarning()
23 | // Dispose of any resources that can be recreated.
24 | }
25 | @IBAction func insertStuffAction(_ sender: Any) {
26 | initKotlin()
27 | playRuntime?.helloStart(mems: true)
28 | outputLabel.text = "Ran with memory dumps"
29 | }
30 |
31 | @IBAction func memoryAction(_ sender: Any) {
32 | initKotlin()
33 | playRuntime?.helloStart(mems: false)
34 | outputLabel.text = "Ran without memory dumps"
35 | }
36 |
37 | func initKotlin(){
38 | if(playRuntime == nil){
39 | playRuntime = KAPPlayRuntime()
40 | }
41 | }
42 | @IBOutlet weak var outputLabel: UILabel!
43 | @IBOutlet var partialResult: UILabel!
44 |
45 |
46 |
47 | }
48 |
49 |
50 |
--------------------------------------------------------------------------------
/notepad/ios/ioslibs/libdbarch.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/ios/ioslibs/libdbarch.a
--------------------------------------------------------------------------------
/notepad/ios/klibrepo/ios_arm64/kurgan.klib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/ios/klibrepo/ios_arm64/kurgan.klib
--------------------------------------------------------------------------------
/notepad/ios/klibrepo/ios_arm64/objcsrc.klib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/ios/klibrepo/ios_arm64/objcsrc.klib
--------------------------------------------------------------------------------
/notepad/ios/klibrepo/ios_arm64/objcsrc.klib-build/manifest.properties:
--------------------------------------------------------------------------------
1 | #Wed May 02 17:12:58 EDT 2018
2 | package=objcsrc
3 | interop=true
4 | linkerOpts=-ljre_emul -lz -lsqlite3 -liconv -ldbarch -ObjC -framework Foundation -framework UIKit -framework Security
5 | includedHeaders=b427292a86af689d1e866227887aad07123714b3713d99c27493779e4beb338a 5ecc626e19136e500f961984ef7f81ea46cdf95b4f3f063f740cd343c2ef0781 b4e3a9f4ae501031dc8d112ff46db82e1fb2c8798e283d34aaecc3363c355072 e8145a7ad1fbdaf516ae3fe73cd0ca6d6599e9555142b112beb302770d481b00 350a1e6502f25a03c1ad797467399695b81e3fef99d24c2013e216d3d6765629 a1e4b84fa08e766cdc5347e15f838f2fc3b07e1ac7e9ae6da65cdff6e92abecf 7cd0fc62d4ed50ceaf6cce4ef9fbdfff687d2749707dff0834294b9110251d5f 4f332689a1bdce1d2e905fb2e3aa3667af97a46b0fb150424327464ad5b6816d c2c3f9dd049ecf88ea6762213eb37930ca78b8d373dfac721ab843f63fa5eefe fb6525c8fb7ef62bdf75ada3c8033423683830f2892b859fb08ea86e4c64fd15 9788d18fb0ab93e5ac211b3e6194bde61b4ee82d3c208fcac1e7d1b7cb3e1526 59c2c7cf3266b864c19e29ae0e3db7b24adaef8341ed401d1291b09ead5b8d76 81efc54f75bbe2b9b1f74c1ebd1167e6ab806151f29dfb56c35fcd1f85a279e3 88fbc032aa884cc49a6e55346a07305cc91f3dcf3dfb49ee99a668f5977b2c6b e4efb078f0f0e3243c942d999bd859c64158160111a5a63ff1407a944a23c46a cbca854583ebfa1f3e9e4b45040bc7f987d29f820420aab66972881c86f59e01 3599801ca37100292c13859785d22c6d8e33cce4bf98ddd4d799188524aa96fa f311b060a79dd170d4c38c13b49993a976fbb24cd9930fcd6324568197ac7a68 802cf07cf0e3cde677996d04639a7c48a4bdc35d2f2436ac9ea59c755ae24c45 f162e73b1fb10a8307d180eca6a3cea8051c51ba2b5101ea139cb6f04b1474ed d6b3d2bd55ec6f64123b3a48d59e1930e8af640c8f62bec87b354515de884ffc e8e3cb3d0c61091292c92b63cf07ca6e498430d28b682eac2026d42e326a9119 a3a23a5b839d49378248067219935bbf1a16af0ff4539d27e51f5d94223f9acd 250f0162bca733c09cda5090c3abb430e641bd114f24b66d4b15f50994de1f9f ec1c86a45a5048a24b4a9b315d7481826094a980bcba33c210ba20d8af4c3eee f309203af647392c5f9d4fe57c1fa7bbd3221381ea6474d7e6632efcfdee96cd 0aa6532321f20f0d7612181410eceadaa21294261af22e6fff65d3312c934739 4a5770da36971c661b01b6d0811f58c97b3cc6f40e684722128f7f077e4c3020 cc1f788c49b58918c66f6c913bf7219a57df6a2df9783549dd54acf87cb5e32c 8feaa2c7ee3834090b67da7b9a7cbf790b6ef5a317a8c755c14353d15b70a9b5 add59ddc48789cac1f5172d1b10364eb255a590f2aeea5a53814ff9edc457c3b ceed4467a4585cd2e5b086199da3fa4d0aceadd41ebb33e2cc59045b13def35c ea16c603667d35d5ba03bf4d0282e258231b7a3c08bbd6c250e1fc16b5fb62da b7870d9e34439bd732d9410cb057006092303beed91c11222735a780e8f6e24f 8b7ffaeabde1bfc6f9b48e8ce7dc8bc8d13893e63f020f7ecae3abb5a77fbcb3 68cd8d0db899067b41ce816577617b955a0b549239c9a3440e48aa8af26e2d79 86c56772532bb84356d6624c973174bd2058004c17886315329eb2b9a161acd4 c5ae41a6397e0a386d3cc1b29ef3eb2838aebe80d6731dc4ac7bddc1c1ad8491 2a45332d07b31792f1ef9f7fb2057128ec8881c121d682c7778a94771a16027d 4b0233a0b37dac06b3065d8dcc190289c7052f726b7ceea8bee2c5d84cf0ef41 f4eb5079321206f5928044e4ed62eb8b5e0ac405899524403337257f8c089b09 a10e8b772095396f6a6fc498ffdd41713e63ab6f5da0e20f0636a896307928f5 78b67f03f5b4c0143df2cbbaad1d6e25bb98fff6de1046560929d2e628116a68 adc31a734fd28758be286c280becfe4c6282f7764ce4a0301e90380f2d771702 131fff98e188b186d5293eea1729fdd2d2dadfb588df4ac200d245817bea0d99 57ba9b7d3012869cc5002bd1021ea40547b06af6c158489e0a7b214f472faa62 b12695bc7941970cc3f83415413568ca2ecac372517d553bcf3623dd620d294d 7a1b72d98295a8d41563f6f08558b666eb854c3ca57323d92525c491b4c3af6f 341904670b98e929c363a222379d136ac842e7a961c656facf987b57c28468d0 a418e94a99f30c43bdf13024ae43059e549989fbb91893cec4c1d72b97c72dce e03db6ae9de9e62b6a8e0760beafc6cadf892e8393a783da755dc8a26ebc3cd5 1de1b909e22b1282a7917c871710a4fdad37eea556dd9c2bd8f50b805ccf34d4 8306bf9b35dea83ed6aa765b4b3ed4fde9e1a871eab9c21dcd57ee79b0c107db 930a7298cbfe96b98b79f5963cf613c33824285f0898da9214b7668c57449f88 4f07b3e7be306d16a5334a269cba1de6f95e30d107a405f9f3051f913ea3a481 f0af014dd7d373f731c6f3a12714eda968944ca1fb9333b3d4c740926ac5a172 f953088844a7709f2d6e725116ff0f5bd2c92003ccbdf4c022ead9d732a66f76 2acb750d29739ed6ab0ce8aed54a6a2329c1b349862cbb7a5f5eb470953ced72 c6d2d6af0a2a430a891da1cc61478128f1138daff82ca1f62538b902d89a198d de98d2e512b02d4b6c4a75946e4b00727bd2d5e5369fac57e91845eef0b77ccc
6 | exportForwardDeclarations=
7 | headers=dbarch/mainDependencyOut.h dbarch/mainSourceOut.h java/util/Locale.h java/io/Closeable.h java/util/concurrent/ExecutorService.h java/util/concurrent/Executors.h java/lang/ThreadLocal.h java/lang/Long.h java/lang/System.h java/lang/Integer.h java/lang/Short.h java/lang/Boolean.h java/lang/Byte.h java/lang/Float.h java/lang/Double.h java/util/Set.h java/util/List.h java/io/File.h IOSPrimitiveArray.h IOSClass.h
8 | language=Objective-C
9 |
--------------------------------------------------------------------------------
/notepad/ios/klibrepo/ios_x64/kurgan.klib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/ios/klibrepo/ios_x64/kurgan.klib
--------------------------------------------------------------------------------
/notepad/ios/klibrepo/ios_x64/objcsrc.klib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/notepad/ios/klibrepo/ios_x64/objcsrc.klib
--------------------------------------------------------------------------------
/notepad/ios/klibrepo/ios_x64/objcsrc.klib-build/manifest.properties:
--------------------------------------------------------------------------------
1 | #Wed May 02 17:14:42 EDT 2018
2 | package=objcsrc
3 | interop=true
4 | linkerOpts=-ljre_emul -lz -lsqlite3 -liconv -ldbarch -ObjC -framework Foundation -framework UIKit -framework Security
5 | includedHeaders=b427292a86af689d1e866227887aad07123714b3713d99c27493779e4beb338a 5ecc626e19136e500f961984ef7f81ea46cdf95b4f3f063f740cd343c2ef0781 b4e3a9f4ae501031dc8d112ff46db82e1fb2c8798e283d34aaecc3363c355072 e8145a7ad1fbdaf516ae3fe73cd0ca6d6599e9555142b112beb302770d481b00 350a1e6502f25a03c1ad797467399695b81e3fef99d24c2013e216d3d6765629 a1e4b84fa08e766cdc5347e15f838f2fc3b07e1ac7e9ae6da65cdff6e92abecf 7cd0fc62d4ed50ceaf6cce4ef9fbdfff687d2749707dff0834294b9110251d5f 4f332689a1bdce1d2e905fb2e3aa3667af97a46b0fb150424327464ad5b6816d c2c3f9dd049ecf88ea6762213eb37930ca78b8d373dfac721ab843f63fa5eefe fb6525c8fb7ef62bdf75ada3c8033423683830f2892b859fb08ea86e4c64fd15 9788d18fb0ab93e5ac211b3e6194bde61b4ee82d3c208fcac1e7d1b7cb3e1526 59c2c7cf3266b864c19e29ae0e3db7b24adaef8341ed401d1291b09ead5b8d76 81efc54f75bbe2b9b1f74c1ebd1167e6ab806151f29dfb56c35fcd1f85a279e3 88fbc032aa884cc49a6e55346a07305cc91f3dcf3dfb49ee99a668f5977b2c6b e4efb078f0f0e3243c942d999bd859c64158160111a5a63ff1407a944a23c46a cbca854583ebfa1f3e9e4b45040bc7f987d29f820420aab66972881c86f59e01 3599801ca37100292c13859785d22c6d8e33cce4bf98ddd4d799188524aa96fa f311b060a79dd170d4c38c13b49993a976fbb24cd9930fcd6324568197ac7a68 802cf07cf0e3cde677996d04639a7c48a4bdc35d2f2436ac9ea59c755ae24c45 f162e73b1fb10a8307d180eca6a3cea8051c51ba2b5101ea139cb6f04b1474ed d6b3d2bd55ec6f64123b3a48d59e1930e8af640c8f62bec87b354515de884ffc e8e3cb3d0c61091292c92b63cf07ca6e498430d28b682eac2026d42e326a9119 a3a23a5b839d49378248067219935bbf1a16af0ff4539d27e51f5d94223f9acd 250f0162bca733c09cda5090c3abb430e641bd114f24b66d4b15f50994de1f9f ec1c86a45a5048a24b4a9b315d7481826094a980bcba33c210ba20d8af4c3eee f309203af647392c5f9d4fe57c1fa7bbd3221381ea6474d7e6632efcfdee96cd 0aa6532321f20f0d7612181410eceadaa21294261af22e6fff65d3312c934739 4a5770da36971c661b01b6d0811f58c97b3cc6f40e684722128f7f077e4c3020 cc1f788c49b58918c66f6c913bf7219a57df6a2df9783549dd54acf87cb5e32c 8feaa2c7ee3834090b67da7b9a7cbf790b6ef5a317a8c755c14353d15b70a9b5 add59ddc48789cac1f5172d1b10364eb255a590f2aeea5a53814ff9edc457c3b ceed4467a4585cd2e5b086199da3fa4d0aceadd41ebb33e2cc59045b13def35c ea16c603667d35d5ba03bf4d0282e258231b7a3c08bbd6c250e1fc16b5fb62da b7870d9e34439bd732d9410cb057006092303beed91c11222735a780e8f6e24f 8b7ffaeabde1bfc6f9b48e8ce7dc8bc8d13893e63f020f7ecae3abb5a77fbcb3 68cd8d0db899067b41ce816577617b955a0b549239c9a3440e48aa8af26e2d79 86c56772532bb84356d6624c973174bd2058004c17886315329eb2b9a161acd4 c5ae41a6397e0a386d3cc1b29ef3eb2838aebe80d6731dc4ac7bddc1c1ad8491 2a45332d07b31792f1ef9f7fb2057128ec8881c121d682c7778a94771a16027d 4b0233a0b37dac06b3065d8dcc190289c7052f726b7ceea8bee2c5d84cf0ef41 f4eb5079321206f5928044e4ed62eb8b5e0ac405899524403337257f8c089b09 a10e8b772095396f6a6fc498ffdd41713e63ab6f5da0e20f0636a896307928f5 78b67f03f5b4c0143df2cbbaad1d6e25bb98fff6de1046560929d2e628116a68 adc31a734fd28758be286c280becfe4c6282f7764ce4a0301e90380f2d771702 131fff98e188b186d5293eea1729fdd2d2dadfb588df4ac200d245817bea0d99 57ba9b7d3012869cc5002bd1021ea40547b06af6c158489e0a7b214f472faa62 b12695bc7941970cc3f83415413568ca2ecac372517d553bcf3623dd620d294d 7a1b72d98295a8d41563f6f08558b666eb854c3ca57323d92525c491b4c3af6f 341904670b98e929c363a222379d136ac842e7a961c656facf987b57c28468d0 a418e94a99f30c43bdf13024ae43059e549989fbb91893cec4c1d72b97c72dce e03db6ae9de9e62b6a8e0760beafc6cadf892e8393a783da755dc8a26ebc3cd5 1de1b909e22b1282a7917c871710a4fdad37eea556dd9c2bd8f50b805ccf34d4 8306bf9b35dea83ed6aa765b4b3ed4fde9e1a871eab9c21dcd57ee79b0c107db 930a7298cbfe96b98b79f5963cf613c33824285f0898da9214b7668c57449f88 4f07b3e7be306d16a5334a269cba1de6f95e30d107a405f9f3051f913ea3a481 f0af014dd7d373f731c6f3a12714eda968944ca1fb9333b3d4c740926ac5a172 f953088844a7709f2d6e725116ff0f5bd2c92003ccbdf4c022ead9d732a66f76 2acb750d29739ed6ab0ce8aed54a6a2329c1b349862cbb7a5f5eb470953ced72 c6d2d6af0a2a430a891da1cc61478128f1138daff82ca1f62538b902d89a198d de98d2e512b02d4b6c4a75946e4b00727bd2d5e5369fac57e91845eef0b77ccc
6 | exportForwardDeclarations=
7 | headers=dbarch/mainDependencyOut.h dbarch/mainSourceOut.h java/util/Locale.h java/io/Closeable.h java/util/concurrent/ExecutorService.h java/util/concurrent/Executors.h java/lang/ThreadLocal.h java/lang/Long.h java/lang/System.h java/lang/Integer.h java/lang/Short.h java/lang/Boolean.h java/lang/Byte.h java/lang/Float.h java/lang/Double.h java/util/Set.h java/util/List.h java/io/File.h IOSPrimitiveArray.h IOSClass.h
8 | language=Objective-C
9 |
--------------------------------------------------------------------------------
/notepad/ios/src/main/kotlin/co/touchlab/kurgan/play/PlayRuntime.kt:
--------------------------------------------------------------------------------
1 | package co.touchlab.kurgan.play
2 |
3 | import co.touchlab.kurgan.architecture.*
4 | import co.touchlab.kurgan.play.notepad.*
5 | import co.touchlab.kurgan.architecture.database.sqlite.*
6 | import co.touchlab.kurgan.play.notepad.*
7 | import co.touchlab.kurgan.architecture.database.sqldelight.*
8 | import co.touchlab.kurgan.util.currentTimeMillis
9 | import com.squareup.sqldelight.db.SqlDatabase
10 | //import co.touchlab.kurgan.play.notepad.*
11 | import kotlinx.cinterop.*
12 | import objcsrc.*
13 |
14 | class PlayRuntime(){
15 |
16 | init {
17 | val context = AndroidContentIOSContext()
18 | DopplRuntime.start()
19 | initApplicationDb(context)
20 | }
21 |
22 | fun helloStart(mems:Boolean){
23 | Methods.testInserts(mems)
24 | }
25 |
26 | companion object {
27 | fun hi(mems: Boolean){
28 | val pr = PlayRuntime()
29 | pr.helloStart(mems)
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/notepad/ios/src/main/kotlin/co/touchlab/kurgan/play/notepad/Methods.kt:
--------------------------------------------------------------------------------
1 | package co.touchlab.kurgan.play.notepad
2 |
3 | import kotlinx.cinterop.*
4 | import objcsrc.*
5 | import konan.worker.*
6 | import co.touchlab.kurgan.architecture.database.sqldelight.SqlDelightDatabaseHelper
7 |
8 | actual fun memzy(body: () -> Unit){
9 | memScoped {
10 | autoreleasepool {
11 | body()
12 | }
13 | }
14 | }
15 |
16 | private var myWorker :Worker? = null
17 |
18 |
19 | actual fun runOnBackground(workerData: WorkerData){
20 | if(myWorker == null) {
21 | myWorker = startWorker()
22 | }
23 |
24 | when(workerData){
25 |
26 | is InsertValues -> {
27 | myWorker!!.schedule(TransferMode.CHECKED,{InsertValues(workerData.holder, workerData.count, workerData.mems)}){ input ->
28 | input.runme()
29 | WorkerResult(1234)
30 | }
31 | }
32 | is SelectValues -> {
33 | myWorker!!.schedule(TransferMode.CHECKED,{SelectValues(workerData.holder, workerData.count)}){ input ->
34 | input.runme()
35 | WorkerResult(1234)
36 | }
37 | }
38 | else -> throw IllegalArgumentException("Don't know type of $workerData")
39 | }
40 | }
41 |
42 | actual fun createHolder(db: SqlDelightDatabaseHelper)= HelperHolder(db).freeze()
--------------------------------------------------------------------------------
/notepad/src/main/kotlin/co/touchlab/kurgan/play/notepad/Methods.kt:
--------------------------------------------------------------------------------
1 | package co.touchlab.kurgan.play.notepad
2 |
3 |
4 | import co.touchlab.kurgan.architecture.database.sqldelight.SqlDelightDatabaseHelper
5 | import co.touchlab.kurgan.architecture.database.sqldelight.create
6 | import co.touchlab.kurgan.architecture.database.sqlite.*
7 | import co.touchlab.kurgan.util.currentTimeMillis
8 | import kotlin.coroutines.experimental.*
9 | import kotlin.coroutines.experimental.intrinsics.*
10 |
11 | data class HelperHolder(val dbOpenHelper : SqlDelightDatabaseHelper)
12 |
13 | class Methods{
14 | companion object {
15 | fun testInserts(mems:Boolean){
16 | val callback = object : PlatformSQLiteOpenHelperCallback(4){
17 | override fun onCreate(db: SQLiteDatabase) {
18 | QueryWrapper.onCreate(QueryWrapper.create(db).getConnection())
19 | println("Create table success!!!!!")
20 | }
21 |
22 | override fun onUpgrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {
23 | QueryWrapper.onMigrate(
24 | QueryWrapper.create(db).getConnection(),
25 | oldVersion,
26 | newVersion
27 | )
28 | }
29 | }
30 |
31 | val helperHolder = createHolder(SqlDelightDatabaseHelper(createOpenHelper("binkyiscool", callback, null)))
32 | runOnBackground(InsertValues(helperHolder,15000, mems))
33 | runOnBackground(InsertValues(helperHolder,15000, mems))
34 | runOnBackground(InsertValues(helperHolder, 15000, mems))
35 | runOnBackground(SelectValues(helperHolder, 10))
36 | }
37 | }
38 | }
39 |
40 | expect fun createHolder(db: SqlDelightDatabaseHelper):HelperHolder
41 |
42 | expect fun memzy(body: () -> Unit)
43 |
44 | expect fun runOnBackground(workerData: WorkerData)
45 | //expect fun runOnMain(r:Runner)
46 |
47 |
48 | interface WorkerData{
49 | fun runme()
50 | }
51 |
52 | data class InsertValues(val holder:HelperHolder, val count:Int, val mems:Boolean):WorkerData{
53 | override fun runme() {
54 | val queryWrapper = QueryWrapper(holder.dbOpenHelper)
55 |
56 | val noteQueries = queryWrapper.noteQueries
57 |
58 | println("Total Count: ${noteQueries.count().executeAsOne()}")
59 |
60 | val now = currentTimeMillis()
61 |
62 | noteQueries.transaction {
63 | if(mems) {
64 | for (i in 0 until count) {
65 | memzy {
66 | noteQueries.insertNote("asdf", "qwert 🥃👀", now, now, null)
67 | }
68 | }
69 | }else{
70 | memzy {
71 | for (i in 0 until count) {
72 | noteQueries.insertNote("asdf", "qwert 🥃👀", now, now, null)
73 | }
74 | }
75 | }
76 | }
77 | }
78 | }
79 | data class SelectValues(val holder:HelperHolder, val count:Long):WorkerData{
80 | override fun runme() {
81 | val queryWrapper = QueryWrapper(holder.dbOpenHelper)
82 |
83 | val noteQueries = queryWrapper.noteQueries
84 |
85 | val alls = noteQueries.selectAll(count).executeAsList()
86 | for(row in alls){
87 | println("id: ${row.id}/title: ${row.title}/note: ${row.note}")
88 | }
89 | }
90 | }
91 | data class WorkerResult(val count:Int)
--------------------------------------------------------------------------------
/notepad/src/main/sqldelight/co/touchlab/kurgan/play/notepad/Note.sq:
--------------------------------------------------------------------------------
1 | CREATE TABLE note(
2 | id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
3 | title TEXT NOT NULL,
4 | note TEXT,
5 | created INTEGER NOT NULL,
6 | modified INTEGER NOT NULL,
7 | hiblob BLOB
8 | );
9 |
10 |
11 | insertNote:
12 | INSERT OR FAIL INTO note(title, note, created, modified, hiblob)
13 | VALUES (?, ?, ?, ?, ?)
14 | ;
15 |
16 |
17 | count:
18 | SELECT COUNT(id)
19 | FROM note
20 | ;
21 |
22 | selectAll:
23 | SELECT id, title, note
24 | FROM note
25 | LIMIT ?
26 | ;
27 |
28 |
29 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':notepad'
2 | include ':notepad:android'
3 | include ':notepad:ios'
4 |
5 | def kotlinNativeDir = System.getenv('KOTLIN_NATIVE_DIR')
6 |
7 | includeBuild "${kotlinNativeDir}/shared"
8 | includeBuild "${kotlinNativeDir}/tools/kotlin-native-gradle-plugin"
9 |
--------------------------------------------------------------------------------
/simulatorscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/touchlab-lab/kotlinmultiios/76da577db728297aa31cab5d31f919c8b31d3945/simulatorscreen.png
--------------------------------------------------------------------------------