├── native
├── KotlinAndroid
│ ├── app
│ │ ├── .gitignore
│ │ ├── src
│ │ │ ├── main
│ │ │ │ ├── res
│ │ │ │ │ ├── values
│ │ │ │ │ │ ├── strings.xml
│ │ │ │ │ │ ├── colors.xml
│ │ │ │ │ │ └── styles.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
│ │ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ │ ├── layout
│ │ │ │ │ │ └── activity_main.xml
│ │ │ │ │ ├── drawable-v24
│ │ │ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ │ └── drawable
│ │ │ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ └── java
│ │ │ │ │ └── com
│ │ │ │ │ └── sample
│ │ │ │ │ └── kotlinandroid
│ │ │ │ │ └── MainActivity.java
│ │ │ ├── test
│ │ │ │ └── java
│ │ │ │ │ └── com
│ │ │ │ │ └── sample
│ │ │ │ │ └── kotlinandroid
│ │ │ │ │ └── ExampleUnitTest.java
│ │ │ └── androidTest
│ │ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── sample
│ │ │ │ └── kotlinandroid
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ ├── proguard-rules.pro
│ │ └── build.gradle
│ ├── settings.gradle
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── .gitignore
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradlew.bat
│ └── gradlew
├── KotlinIOS
│ ├── KotlinIOS
│ │ ├── Assets.xcassets
│ │ │ ├── Contents.json
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── ViewController.swift
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── AppDelegate.swift
│ ├── KotlinIOS.xcodeproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── xcshareddata
│ │ │ └── xcschemes
│ │ │ │ └── KotlinIOS.xcscheme
│ │ └── project.pbxproj
│ └── .gitignore
└── PlatformLib
│ ├── PlatformLib
│ ├── main.c
│ ├── PlatformLib.m
│ ├── Testing.swift
│ ├── PlatformLib.h
│ └── Info.plist
│ ├── PlatformLib.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── PlatformLib.xcscheme
│ └── project.pbxproj
│ └── .gitignore
├── settings.gradle
├── docs
├── Components
│ └── Components.png
└── Components.puml
├── ProjectName
├── src
│ ├── androidMain
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ ├── SampleDate.kt
│ │ │ └── AndroidSpecific.kt
│ │ └── java
│ │ │ └── com
│ │ │ └── sample
│ │ │ └── mobile
│ │ │ └── SampleModule.java
│ ├── commonMain
│ │ └── kotlin
│ │ │ ├── FrameworkSample.kt
│ │ │ └── SampleDate.kt
│ └── iosMain
│ │ └── kotlin
│ │ ├── SampleDate.kt
│ │ └── IOSSpecific.kt
├── PlatformLib.def
└── build.gradle.kts
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── LICENSE.txt
├── gradle.properties
├── gradlew.bat
├── README.md
└── gradlew
/native/KotlinAndroid/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':ProjectName'
2 | include ':native:KotlinAndroid:app'
3 |
4 | enableFeaturePreview('GRADLE_METADATA')
--------------------------------------------------------------------------------
/docs/Components/Components.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/endanke/kotlin-mpp-framework-skeleton/HEAD/docs/Components/Components.png
--------------------------------------------------------------------------------
/native/KotlinIOS/KotlinIOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/ProjectName/src/androidMain/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/endanke/kotlin-mpp-framework-skeleton/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | KotlinAndroid
3 |
4 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/endanke/kotlin-mpp-framework-skeleton/HEAD/native/KotlinAndroid/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/ProjectName/PlatformLib.def:
--------------------------------------------------------------------------------
1 | package = com.platformlib
2 | depends = Foundation
3 | language = Objective-C
4 | headers = PlatformLib.h PlatformLib-Swift.h
5 | linkerOpts = -framework PlatformLib
6 |
7 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/endanke/kotlin-mpp-framework-skeleton/HEAD/native/KotlinAndroid/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/endanke/kotlin-mpp-framework-skeleton/HEAD/native/KotlinAndroid/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ProjectName/src/commonMain/kotlin/FrameworkSample.kt:
--------------------------------------------------------------------------------
1 | package com.sample.mobile
2 |
3 | class FrameworkSample {
4 |
5 | fun getTime(): Long {
6 | return SampleDate().timestamp
7 | }
8 |
9 | }
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/endanke/kotlin-mpp-framework-skeleton/HEAD/native/KotlinAndroid/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/endanke/kotlin-mpp-framework-skeleton/HEAD/native/KotlinAndroid/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/endanke/kotlin-mpp-framework-skeleton/HEAD/native/KotlinAndroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/endanke/kotlin-mpp-framework-skeleton/HEAD/native/KotlinAndroid/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/endanke/kotlin-mpp-framework-skeleton/HEAD/native/KotlinAndroid/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/endanke/kotlin-mpp-framework-skeleton/HEAD/native/KotlinAndroid/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/endanke/kotlin-mpp-framework-skeleton/HEAD/native/KotlinAndroid/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/endanke/kotlin-mpp-framework-skeleton/HEAD/native/KotlinAndroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/ProjectName/src/androidMain/kotlin/SampleDate.kt:
--------------------------------------------------------------------------------
1 | package com.sample.mobile
2 |
3 | import java.util.*
4 |
5 | actual class SampleDate actual constructor() {
6 | actual val timestamp: Long
7 | get() = Date().time
8 |
9 | }
--------------------------------------------------------------------------------
/ProjectName/src/androidMain/kotlin/AndroidSpecific.kt:
--------------------------------------------------------------------------------
1 | package com.sample.mobile
2 |
3 | class AndroidSpecific {
4 |
5 | fun multiply(a: Int, b: Int): Int {
6 | return SampleModule.multiply(a,b)
7 | }
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/native/PlatformLib/PlatformLib/main.c:
--------------------------------------------------------------------------------
1 | //
2 | // main.c
3 | // PlatformLib
4 | //
5 | // Created by Daniel Eke on 2020. 01. 19..
6 | // Copyright © 2020. Sample. All rights reserved.
7 | //
8 |
9 | int main(int argc, char *argv[]) { }
10 |
--------------------------------------------------------------------------------
/native/KotlinIOS/KotlinIOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/native/PlatformLib/PlatformLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ProjectName/src/commonMain/kotlin/SampleDate.kt:
--------------------------------------------------------------------------------
1 | package com.sample.mobile
2 |
3 | // A very basic example of the expect and actual mechanism
4 | // https://kotlinlang.org/docs/reference/platform-specific-declarations.html
5 | expect class SampleDate() {
6 | val timestamp: Long
7 | }
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ProjectName/build
2 | ProjectName/outputs
3 |
4 | native/KotlinIOS/PlatformLib.framework
5 | native/PlatformLib/PlatformLib.framework
6 |
7 | build
8 | .idea
9 | .gradle
10 | **/*.iml
11 |
12 | *.apk
13 | *.ap_
14 | *.dex
15 | *.class
16 | bin/
17 | gen/
18 | local.properties
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Apr 02 21:03:05 EEST 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 |
--------------------------------------------------------------------------------
/native/KotlinIOS/KotlinIOS.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/native/PlatformLib/PlatformLib.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ProjectName/src/iosMain/kotlin/SampleDate.kt:
--------------------------------------------------------------------------------
1 | package com.sample.mobile
2 |
3 | import platform.Foundation.NSDate
4 | import platform.Foundation.timeIntervalSince1970
5 |
6 | actual class SampleDate actual constructor() {
7 | actual val timestamp: Long
8 | get() = NSDate().timeIntervalSince1970.toLong()
9 | }
--------------------------------------------------------------------------------
/native/KotlinAndroid/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Apr 15 16:13:56 EEST 2019
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.10.1-all.zip
7 |
--------------------------------------------------------------------------------
/ProjectName/src/iosMain/kotlin/IOSSpecific.kt:
--------------------------------------------------------------------------------
1 | package com.sample.mobile
2 |
3 | import com.platformlib.PlatformLib
4 | import com.platformlib.Testing
5 |
6 | class IOSSpecific {
7 |
8 | fun sayHello(): String {
9 | return "Hello from Kotlin, " + PlatformLib().test() + ", " + Testing().test()
10 | }
11 |
12 | }
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/native/KotlinIOS/KotlinIOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/native/PlatformLib/PlatformLib.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/native/PlatformLib/PlatformLib/PlatformLib.m:
--------------------------------------------------------------------------------
1 | //
2 | // PlatformLib.m
3 | // PlatformLib
4 | //
5 | // Created by Daniel Eke on 2019. 01. 10..
6 | // Copyright © 2019. Sample. All rights reserved.
7 | //
8 |
9 | #import "PlatformLib.h"
10 | #import
11 |
12 | @implementation PlatformLib
13 |
14 | - (NSString*)test{
15 | return @"Hello from Objc";
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/native/PlatformLib/PlatformLib/Testing.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Testing.swift
3 | // PlatformLib
4 | //
5 | // Created by Daniel Eke on 2019. 01. 10..
6 | // Copyright © 2019. Sample. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | @objc(Testing) @objcMembers public class Testing: NSObject {
12 |
13 | public func test() -> String {
14 | return "Hello from Swift"
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ProjectName/src/androidMain/java/com/sample/mobile/SampleModule.java:
--------------------------------------------------------------------------------
1 | package com.sample.mobile;
2 |
3 | class SampleModule {
4 |
5 | // The library can include existing Java sources in Android,
6 | // if they are placed under the Android target folder.
7 | // Thanks to the language support of Kotlin, they can be directly
8 | // referenced in the Kotlin source.
9 | static Integer multiply(Integer a, Integer b) {
10 | return a * b;
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/test/java/com/sample/kotlinandroid/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.sample.kotlinandroid;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/native/KotlinIOS/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## User settings
6 | xcuserdata/
7 |
8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
9 | *.xcscmblueprint
10 | *.xccheckout
11 |
12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
13 | build/
14 | DerivedData/
15 | *.moved-aside
16 | *.pbxuser
17 | !default.pbxuser
18 | *.mode1v3
19 | !default.mode1v3
20 | *.mode2v3
21 | !default.mode2v3
22 | *.perspectivev3
23 | !default.perspectivev3
24 |
--------------------------------------------------------------------------------
/native/PlatformLib/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## User settings
6 | xcuserdata/
7 |
8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
9 | *.xcscmblueprint
10 | *.xccheckout
11 |
12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
13 | build/
14 | DerivedData/
15 | *.moved-aside
16 | *.pbxuser
17 | !default.pbxuser
18 | *.mode1v3
19 | !default.mode1v3
20 | *.mode2v3
21 | !default.mode2v3
22 | *.perspectivev3
23 | !default.perspectivev3
24 |
--------------------------------------------------------------------------------
/native/PlatformLib/PlatformLib/PlatformLib.h:
--------------------------------------------------------------------------------
1 | //
2 | // PlatformLib.h
3 | // PlatformLib
4 | //
5 | // Created by Daniel Eke on 2019. 01. 08..
6 | // Copyright © 2019. Sample. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | FOUNDATION_EXPORT double PlatformLibVersionNumber;
12 | FOUNDATION_EXPORT const unsigned char PlatformLibVersionString[];
13 |
14 | @interface PlatformLib : NSObject
15 |
16 | - (NSString*)test;
17 |
18 | @end
19 |
20 |
21 |
22 | // In this header, you should import all the public headers of your framework using statements like #import
23 |
24 |
25 |
--------------------------------------------------------------------------------
/native/KotlinIOS/KotlinIOS/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // KotlinIOS
4 | //
5 | // Created by Sample on 26.09.18.
6 | // Copyright © 2018 Sample. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import ProjectName
11 |
12 | class ViewController: UIViewController {
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | let sample1 = FrameworkSample()
18 |
19 | print("Sample1 \(sample1.getTime())")
20 |
21 | let sample2 = IOSSpecific()
22 |
23 | print("Sample2 \(sample2.sayHello())")
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010-2018 JetBrains s.r.o.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | google()
6 | jcenter()
7 |
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.3.0'
11 |
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | jcenter()
21 |
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
19 |
20 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/native/PlatformLib/PlatformLib/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 |
22 |
23 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/java/com/sample/kotlinandroid/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.sample.kotlinandroid;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.util.Log;
6 |
7 | import com.sample.mobile.AndroidSpecific;
8 | import com.sample.mobile.FrameworkSample;
9 |
10 | public class MainActivity extends AppCompatActivity {
11 |
12 | @Override
13 | protected void onCreate(Bundle savedInstanceState) {
14 | super.onCreate(savedInstanceState);
15 | setContentView(R.layout.activity_main);
16 |
17 | FrameworkSample sample1 = new FrameworkSample();
18 | Log.d("Sample1", String.valueOf(sample1.getTime()));
19 |
20 | AndroidSpecific sample2 = new AndroidSpecific();
21 | Log.d("Sample2", String.valueOf(sample2.multiply(2,8)));
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/androidTest/java/com/sample/kotlinandroid/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.sample.kotlinandroid;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.sample.kotlinandroid", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | org.gradle.parallel=true
14 | org.gradle.configureondemand=false
15 | org.gradle.caching=true
16 |
17 | kotlin.incremental.multiplatform = true
18 | kotlin.parallel.tasks.in.project=true
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 28
5 | defaultConfig {
6 | applicationId "com.sample.kotlinandroid"
7 | minSdkVersion 21
8 | targetSdkVersion 28
9 | versionCode 1
10 | versionName "1.0"
11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | implementation fileTree(dir: 'libs', include: ['*.jar'])
23 | implementation 'com.android.support:appcompat-v7:28.0.0'
24 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
25 | testImplementation 'junit:junit:4.12'
26 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
27 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
28 |
29 | implementation project(':ProjectName')
30 | }
31 |
--------------------------------------------------------------------------------
/docs/Components.puml:
--------------------------------------------------------------------------------
1 | @startuml
2 |
3 | frame "Development configuration" {
4 | frame "External iOS sources" {
5 | [PlatformLib]
6 | }
7 |
8 | frame "iOS target folder" {
9 | [IOSSpecific]
10 | [SampleDate] as IOSDATE
11 | }
12 |
13 | frame "Android target folder" {
14 | [SampleModule]
15 | [AndroidSpecific]
16 | [SampleDate] as DROIDATE
17 | }
18 |
19 | frame "Common sources folder" {
20 | [SampleDate] as COMMONDATE
21 | [FrameworkSample]
22 | }
23 | }
24 |
25 | frame "Host applications" {
26 | [iOS library] as LIBIOS
27 | [Android library] as LIBDROID
28 |
29 | [Android application] as DROIDAPP
30 | [iOS application] as IOSAPP
31 | }
32 |
33 |
34 | ' Component relations
35 | [PlatformLib] <--> [IOSSpecific]
36 | [SampleModule] <-left-> [AndroidSpecific]
37 | IOSDATE <--> COMMONDATE
38 | DROIDATE <--> COMMONDATE
39 | COMMONDATE <--> [FrameworkSample]
40 |
41 | [IOSSpecific] <--> LIBIOS
42 | [AndroidSpecific] <--> LIBDROID
43 | [FrameworkSample] <--> LIBDROID
44 | [FrameworkSample] <--> LIBIOS
45 |
46 | LIBIOS <..> IOSAPP
47 | LIBDROID <..> DROIDAPP
48 |
49 | @enduml
--------------------------------------------------------------------------------
/native/KotlinIOS/KotlinIOS/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 |
--------------------------------------------------------------------------------
/native/KotlinIOS/KotlinIOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | NSBluetoothPeripheralUsageDescription
24 | Connect to external devices
25 | UIBackgroundModes
26 |
27 | bluetooth-central
28 | fetch
29 |
30 | UILaunchStoryboardName
31 | LaunchScreen
32 | UIMainStoryboardFile
33 | Main
34 | UIRequiredDeviceCapabilities
35 |
36 | armv7
37 |
38 | UISupportedInterfaceOrientations
39 |
40 | UIInterfaceOrientationPortrait
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | UISupportedInterfaceOrientations~ipad
45 |
46 | UIInterfaceOrientationPortrait
47 | UIInterfaceOrientationPortraitUpsideDown
48 | UIInterfaceOrientationLandscapeLeft
49 | UIInterfaceOrientationLandscapeRight
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/native/KotlinIOS/KotlinIOS/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 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/native/KotlinIOS/KotlinIOS/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // KotlinIOS
4 | //
5 | // Created by Sample on 26.09.18.
6 | // Copyright © 2018 Sample. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // 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.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // 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.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // 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.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // 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.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/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 |
--------------------------------------------------------------------------------
/native/KotlinIOS/KotlinIOS/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 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/native/KotlinIOS/KotlinIOS.xcodeproj/xcshareddata/xcschemes/KotlinIOS.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/ProjectName/build.gradle.kts:
--------------------------------------------------------------------------------
1 | import org.jetbrains.kotlin.gradle.tasks.FatFrameworkTask
2 |
3 | val ideaActive = System.getProperty("idea.active") == "true"
4 |
5 | plugins {
6 | kotlin("multiplatform")
7 | id("com.android.library")
8 | id("kotlin-android-extensions")
9 | }
10 |
11 | val customFrameworksDir = file("${projectDir}/../native/PlatformLib").absolutePath
12 | val customFramework = "PlatformLib"
13 | val targetName = project.findProperty("IOS_TARGET") ?: "iosArm64"
14 |
15 | android {
16 | compileSdkVersion(28)
17 | defaultConfig {
18 | minSdkVersion(18)
19 | targetSdkVersion(28)
20 | versionCode = 1
21 | versionName = "1.0"
22 | }
23 |
24 | sourceSets {
25 | getByName("main") {
26 | manifest.srcFile("src/androidMain/AndroidManifest.xml")
27 | java.srcDir("src/androidMain/java")
28 | }
29 | }
30 | }
31 |
32 | kotlin {
33 | android()
34 |
35 | val iosArm64 = iosArm64("iosArm64")
36 | val iosX64 = iosX64("iosX64")
37 | if (ideaActive) {
38 | iosX64("ios")
39 | }
40 |
41 | val frameworkName = "ProjectName"
42 |
43 | project.configure(listOf(iosArm64, iosX64)) {
44 | binaries.framework {
45 | embedBitcode("disable")
46 | baseName = frameworkName
47 | }
48 |
49 | binaries.all {
50 | linkerOpts("-F${customFrameworksDir}", "-framework", "PlatformLib")
51 | }
52 |
53 | compilations["main"].apply {
54 | cinterops {
55 | val PlatformLib by cinterops.creating {
56 | defFile(project.file("PlatformLib.def"))
57 | compilerOpts("-F${customFrameworksDir} -fmodules -framework PlatformLib")
58 | includeDirs("${customFrameworksDir}/PlatformLib.framework/Headers")
59 | }
60 | }
61 | }
62 | }
63 |
64 | project.tasks.register("debugFatFramework") {
65 | baseName = frameworkName
66 | group = "Universal framework"
67 | destinationDir = buildDir.resolve("xcode-frameworks")
68 | from(iosArm64.binaries.getFramework("DEBUG"), iosX64.binaries.getFramework("DEBUG"))
69 | finalizedBy("packForXCode")
70 | }
71 |
72 | project.tasks.register("releaseFatFramework") {
73 | baseName = frameworkName
74 | group = "Universal framework"
75 | destinationDir = buildDir.resolve("xcode-frameworks")
76 | from(iosArm64.binaries.getFramework("RELEASE"), iosX64.binaries.getFramework("RELEASE"))
77 | finalizedBy("packForXCode")
78 | }
79 |
80 | sourceSets["commonMain"].dependencies {
81 | api("org.jetbrains.kotlin:kotlin-stdlib-common")
82 | }
83 |
84 | sourceSets["androidMain"].dependencies {
85 | api("org.jetbrains.kotlin:kotlin-stdlib-common")
86 | }
87 |
88 | sourceSets {
89 | val iosMain = if (ideaActive) getByName("iosMain") else create("iosMain")
90 | iosMain.dependencies {
91 | api("org.jetbrains.kotlin:kotlin-stdlib")
92 | }
93 | val iosArm64Main by getting
94 | val iosX64Main by getting
95 | configure(listOf(iosArm64Main, iosX64Main)) {
96 | dependsOn(iosMain)
97 | }
98 | }
99 | }
100 |
101 | tasks.register("packForXCode") {
102 | val frameworkDir = file("${buildDir}/xcode-frameworks")
103 |
104 | into(frameworkDir)
105 | // Copy embedded framework into the output framework
106 | into("/${project.name}.framework/Frameworks/${customFramework}.framework") {
107 | from("${customFrameworksDir}/${customFramework}.framework")
108 | }
109 |
110 | doLast {
111 | // Removes the headers from the custom folder to hide the implementation.
112 | delete("${frameworkDir}/${project.name}.framework/Frameworks/${customFramework}.framework/Headers")
113 | delete("${frameworkDir}/${project.name}_${targetName}.framework/Frameworks/${customFramework}.framework/Headers")
114 | }
115 | }
116 |
117 | // Copy outputs to the same directory
118 | tasks.register("copyArtifacts") {
119 | doLast {
120 | copy {
121 | from("${projectDir}/build/outputs/aar/${project.name}-release.aar")
122 | into("${projectDir}/outputs")
123 | rename ("${project.name}-release.aar", "${project.name}.aar")
124 | }
125 | copy {
126 | from("${projectDir}/build/xcode-frameworks/${project.name}.framework")
127 | into("${projectDir}/outputs/${project.name}.framework")
128 | }
129 | }
130 | }
131 |
132 | // Task dependencies
133 | tasks.getByName("build") {
134 | dependsOn ("packForXCode")
135 | finalizedBy("copyArtifacts")
136 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Kotlin MPP framework development skeleton
2 |
3 | This project includes a sample configuration for multi-platform library/framework development in Kotlin, with Android and iOS outputs. It demonstrates how to use existing Java, Objective-C or Swift sources, which are bundled in the output. Also includes the configuration for a fat binary on iOS, which can be useful for the standalone distribution of the framework. Still a work in progress was not tested in release. Feel free to submit issues about any notes or questions!
4 |
5 | ## Background
6 |
7 | During 2019 I have made my master's thesis about the development of a software development kit, which was done in collaboration with a business case provider company. Their goal was to separate the business logic from an existing Android and iOS application in the form of a cross-platform SDK. Kotlin/Native allowed us to reuse parts of the Android implementation on iOS, even though multiplatform programming is still an experimental feature at this point. This repository demonstrates some of the configurations that was required during the development of the SDK.
8 |
9 | For full context, feel free to download my thesis from the following link: https://aaltodoc.aalto.fi/handle/123456789/38944
10 |
11 | ## Updates
12 |
13 | - 2020 April: Upgraded to Kotlin version 1.3.60. Simplified configuration example.
14 |
15 | ## Overview
16 |
17 | #### Source location
18 |
19 | - `/native/KotlinAndroid` - Development Android application
20 | - `/native/KotlinIOS` - Development iOS application
21 | - `/native/PlatformLib` - Wrapper framework for native iOS sources
22 | - `/ProjectName/src/androidMain/java` - Android specific Java sources
23 | - `/ProjectName/src/androidMain/kotlin` - Android specific Kotlin sources
24 | - `/ProjectName/src/commonMain/kotlin` - Shared Kotlin sources
25 | - `/ProjectName/src/iosMain/kotlin` - iOS specific Kotlin sources
26 | - `/ProjectName/outputs` - Contains the release artifacts.
27 |
28 | #### Android library development
29 |
30 | Using existing Android sources in Kotlin/Native is relatively simple. Java can be mixed with Kotlin, so just move the existing code in the respective folders under `/ProjectName/src/androidMain`.
31 |
32 | The default output of the Android target is an AAR library. The release version is automatically copied to the `/ProjectName/outputs` folder after the build.
33 |
34 | #### iOS framework development
35 |
36 | Reusing existing source in the iOS target is slightly more complicated. First, the Objective-C or Swift sources needs to be included in the `/native/PlatformLib` Xcode project. By running the `Archive` process in this target, the configuration generates a fat iOS framework which includes both supported architectures. With a helper script, this is automatically copied into the same path where the Xcode project is located. This framework is used as an input for the Objective-C (or Swift) to Kotlin interoperation process in the main project.
37 |
38 | After a successful build, the classes in `PlatformLib` can be referenced in the Kotlin sources under `/ProjectName/src/iosMain/kotlin`.
39 |
40 | The script of the `ProjectName` framework building process includes custom scripts to generate a fat binary in the output. It also moves the `PlatformLib` framework inside the `ProjectName` framework, which will act as an umbrella. This makes the delivery process easier, as you only have to share the main framework.
41 |
42 | ## Release build
43 |
44 | To generate a release build for iOS, run the `releaseFatFramework` Gradle task. For Android, use the `assembleRelease` task in the ProjectName target.
45 |
46 | ## Sample classes
47 |
48 | This diagram displays the connections between the sample classes and the generated outputs.
49 |
50 | 
51 |
52 | ## Additional notes
53 |
54 | - The API of the kotlin-multiplatform plugin changes frequently, so this sample might be already outdated, as I was working on it a couple months ago. I'll try to update it when I can, but feel free to write me any questions related to the configuration.
55 | - Update: Since 1.3.30 fat framework generation tasks are available. ~~The fat framework generation process of the kotlin-multiplatform output will be easier in the future releases. See: https://github.com/JetBrains/kotlin-native/issues/2574#issuecomment-480264335~~
56 | - Update: Fixed configuration example, no need for generated .def file anymore.~~Currently the .def file for the `PlatformLib` interoperability is generated with a script to include the correct folder paths. This is probably not needed anymore, but I haven't tested a new configuration yet.~~
57 | - On iOS, the simulator architecture probably needs to be removed from the generated fat frameworks before submitting it to the App Store. This wasn't tested, but a similar solution could work: https://medium.com/@crafttang/how-to-upload-an-app-with-universal-framework-to-appstore-49e50a461109
58 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
10 |
12 |
14 |
16 |
18 |
20 |
22 |
24 |
26 |
28 |
30 |
32 |
34 |
36 |
38 |
40 |
42 |
44 |
46 |
48 |
50 |
52 |
54 |
56 |
58 |
60 |
62 |
64 |
66 |
68 |
70 |
72 |
74 |
75 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/native/KotlinAndroid/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 |
--------------------------------------------------------------------------------
/native/PlatformLib/PlatformLib.xcodeproj/xcshareddata/xcschemes/PlatformLib.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
50 |
51 |
52 |
53 |
59 |
60 |
66 |
67 |
68 |
69 |
71 |
72 |
75 |
76 |
78 |
81 |
82 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/native/PlatformLib/PlatformLib.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 30713C2D21E75A960090419F /* Testing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30713C2C21E75A960090419F /* Testing.swift */; };
11 | 308AB43421E4D781007E5ED1 /* PlatformLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 308AB43321E4D781007E5ED1 /* PlatformLib.h */; settings = {ATTRIBUTES = (Public, ); }; };
12 | 308AB47421E735BF007E5ED1 /* PlatformLib.m in Sources */ = {isa = PBXBuildFile; fileRef = 308AB47321E735BF007E5ED1 /* PlatformLib.m */; };
13 | 309C37E323D4F58B0068E072 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 309C37E223D4F58B0068E072 /* main.c */; };
14 | /* End PBXBuildFile section */
15 |
16 | /* Begin PBXFileReference section */
17 | 30713C2C21E75A960090419F /* Testing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Testing.swift; sourceTree = ""; };
18 | 307A22EA21E775C7004D960F /* PlatformLib.private.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = PlatformLib.private.modulemap; sourceTree = ""; };
19 | 308AB40621E485CA007E5ED1 /* PlatformLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PlatformLib.framework; sourceTree = BUILT_PRODUCTS_DIR; };
20 | 308AB40921E485CB007E5ED1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
21 | 308AB43321E4D781007E5ED1 /* PlatformLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformLib.h; sourceTree = ""; };
22 | 308AB47321E735BF007E5ED1 /* PlatformLib.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PlatformLib.m; sourceTree = ""; };
23 | 309C37E223D4F58B0068E072 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; };
24 | 30D3233B221D64E5000AF313 /* PlatformLib.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = PlatformLib.framework; sourceTree = ""; };
25 | /* End PBXFileReference section */
26 |
27 | /* Begin PBXFrameworksBuildPhase section */
28 | 308AB40321E485CA007E5ED1 /* Frameworks */ = {
29 | isa = PBXFrameworksBuildPhase;
30 | buildActionMask = 2147483647;
31 | files = (
32 | );
33 | runOnlyForDeploymentPostprocessing = 0;
34 | };
35 | /* End PBXFrameworksBuildPhase section */
36 |
37 | /* Begin PBXGroup section */
38 | 3046C55921F0615000789D8A /* Frameworks */ = {
39 | isa = PBXGroup;
40 | children = (
41 | );
42 | name = Frameworks;
43 | sourceTree = "";
44 | };
45 | 308AB40721E485CB007E5ED1 /* PlatformLib */ = {
46 | isa = PBXGroup;
47 | children = (
48 | 308AB43321E4D781007E5ED1 /* PlatformLib.h */,
49 | 308AB47321E735BF007E5ED1 /* PlatformLib.m */,
50 | 30713C2C21E75A960090419F /* Testing.swift */,
51 | 309C37E223D4F58B0068E072 /* main.c */,
52 | 308AB40921E485CB007E5ED1 /* Info.plist */,
53 | 307A22EA21E775C7004D960F /* PlatformLib.private.modulemap */,
54 | );
55 | path = PlatformLib;
56 | sourceTree = "";
57 | };
58 | 47CC68B0215C0386001B3A20 = {
59 | isa = PBXGroup;
60 | children = (
61 | 30D3233B221D64E5000AF313 /* PlatformLib.framework */,
62 | 308AB40721E485CB007E5ED1 /* PlatformLib */,
63 | 47CC68BA215C0386001B3A20 /* Products */,
64 | 3046C55921F0615000789D8A /* Frameworks */,
65 | );
66 | sourceTree = "";
67 | };
68 | 47CC68BA215C0386001B3A20 /* Products */ = {
69 | isa = PBXGroup;
70 | children = (
71 | 308AB40621E485CA007E5ED1 /* PlatformLib.framework */,
72 | );
73 | name = Products;
74 | sourceTree = "";
75 | };
76 | /* End PBXGroup section */
77 |
78 | /* Begin PBXHeadersBuildPhase section */
79 | 308AB40121E485CA007E5ED1 /* Headers */ = {
80 | isa = PBXHeadersBuildPhase;
81 | buildActionMask = 2147483647;
82 | files = (
83 | 308AB43421E4D781007E5ED1 /* PlatformLib.h in Headers */,
84 | );
85 | runOnlyForDeploymentPostprocessing = 0;
86 | };
87 | /* End PBXHeadersBuildPhase section */
88 |
89 | /* Begin PBXNativeTarget section */
90 | 308AB40521E485CA007E5ED1 /* PlatformLib */ = {
91 | isa = PBXNativeTarget;
92 | buildConfigurationList = 308AB40F21E485CB007E5ED1 /* Build configuration list for PBXNativeTarget "PlatformLib" */;
93 | buildPhases = (
94 | 308AB40121E485CA007E5ED1 /* Headers */,
95 | 308AB40221E485CA007E5ED1 /* Sources */,
96 | 308AB40321E485CA007E5ED1 /* Frameworks */,
97 | 308AB40421E485CA007E5ED1 /* Resources */,
98 | );
99 | buildRules = (
100 | );
101 | dependencies = (
102 | );
103 | name = PlatformLib;
104 | productName = PlatformLib;
105 | productReference = 308AB40621E485CA007E5ED1 /* PlatformLib.framework */;
106 | productType = "com.apple.product-type.framework";
107 | };
108 | /* End PBXNativeTarget section */
109 |
110 | /* Begin PBXProject section */
111 | 47CC68B1215C0386001B3A20 /* Project object */ = {
112 | isa = PBXProject;
113 | attributes = {
114 | LastSwiftUpdateCheck = 1000;
115 | LastUpgradeCheck = 1000;
116 | ORGANIZATIONNAME = Sample;
117 | TargetAttributes = {
118 | 308AB40521E485CA007E5ED1 = {
119 | CreatedOnToolsVersion = 10.1;
120 | LastSwiftMigration = 1010;
121 | };
122 | };
123 | };
124 | buildConfigurationList = 47CC68B4215C0386001B3A20 /* Build configuration list for PBXProject "PlatformLib" */;
125 | compatibilityVersion = "Xcode 9.3";
126 | developmentRegion = en;
127 | hasScannedForEncodings = 0;
128 | knownRegions = (
129 | en,
130 | Base,
131 | );
132 | mainGroup = 47CC68B0215C0386001B3A20;
133 | productRefGroup = 47CC68BA215C0386001B3A20 /* Products */;
134 | projectDirPath = "";
135 | projectRoot = "";
136 | targets = (
137 | 308AB40521E485CA007E5ED1 /* PlatformLib */,
138 | );
139 | };
140 | /* End PBXProject section */
141 |
142 | /* Begin PBXResourcesBuildPhase section */
143 | 308AB40421E485CA007E5ED1 /* Resources */ = {
144 | isa = PBXResourcesBuildPhase;
145 | buildActionMask = 2147483647;
146 | files = (
147 | );
148 | runOnlyForDeploymentPostprocessing = 0;
149 | };
150 | /* End PBXResourcesBuildPhase section */
151 |
152 | /* Begin PBXSourcesBuildPhase section */
153 | 308AB40221E485CA007E5ED1 /* Sources */ = {
154 | isa = PBXSourcesBuildPhase;
155 | buildActionMask = 2147483647;
156 | files = (
157 | 308AB47421E735BF007E5ED1 /* PlatformLib.m in Sources */,
158 | 30713C2D21E75A960090419F /* Testing.swift in Sources */,
159 | 309C37E323D4F58B0068E072 /* main.c in Sources */,
160 | );
161 | runOnlyForDeploymentPostprocessing = 0;
162 | };
163 | /* End PBXSourcesBuildPhase section */
164 |
165 | /* Begin XCBuildConfiguration section */
166 | 308AB41021E485CB007E5ED1 /* Debug */ = {
167 | isa = XCBuildConfiguration;
168 | buildSettings = {
169 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
170 | CLANG_ENABLE_MODULES = YES;
171 | CODE_SIGN_IDENTITY = "iPhone Developer";
172 | CODE_SIGN_STYLE = Automatic;
173 | CURRENT_PROJECT_VERSION = 1;
174 | DEFINES_MODULE = YES;
175 | DEVELOPMENT_TEAM = BV2J795K69;
176 | DYLIB_COMPATIBILITY_VERSION = 1;
177 | DYLIB_CURRENT_VERSION = 1;
178 | DYLIB_INSTALL_NAME_BASE = "@rpath";
179 | ENABLE_BITCODE = NO;
180 | INFOPLIST_FILE = PlatformLib/Info.plist;
181 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
182 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
183 | LD_RUNPATH_SEARCH_PATHS = (
184 | "$(inherited)",
185 | "@executable_path/Frameworks",
186 | "@loader_path/Frameworks",
187 | );
188 | LIBRARY_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)";
189 | MACH_O_TYPE = mh_dylib;
190 | ONLY_ACTIVE_ARCH = YES;
191 | PRODUCT_BUNDLE_IDENTIFIER = io.sample.PlatformLib;
192 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
193 | SKIP_INSTALL = NO;
194 | SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
195 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
196 | SWIFT_VERSION = 4.2;
197 | TARGETED_DEVICE_FAMILY = "1,2";
198 | VERSIONING_SYSTEM = "apple-generic";
199 | VERSION_INFO_PREFIX = "";
200 | };
201 | name = Debug;
202 | };
203 | 308AB41121E485CB007E5ED1 /* Release */ = {
204 | isa = XCBuildConfiguration;
205 | buildSettings = {
206 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
207 | CLANG_ENABLE_MODULES = YES;
208 | CODE_SIGN_IDENTITY = "iPhone Developer";
209 | CODE_SIGN_STYLE = Automatic;
210 | CURRENT_PROJECT_VERSION = 1;
211 | DEFINES_MODULE = YES;
212 | DEVELOPMENT_TEAM = BV2J795K69;
213 | DYLIB_COMPATIBILITY_VERSION = 1;
214 | DYLIB_CURRENT_VERSION = 1;
215 | DYLIB_INSTALL_NAME_BASE = "@rpath";
216 | ENABLE_BITCODE = NO;
217 | INFOPLIST_FILE = PlatformLib/Info.plist;
218 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
219 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
220 | LD_RUNPATH_SEARCH_PATHS = (
221 | "$(inherited)",
222 | "@executable_path/Frameworks",
223 | "@loader_path/Frameworks",
224 | );
225 | LIBRARY_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)";
226 | MACH_O_TYPE = mh_dylib;
227 | PRODUCT_BUNDLE_IDENTIFIER = io.sample.PlatformLib;
228 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
229 | SKIP_INSTALL = NO;
230 | SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
231 | SWIFT_VERSION = 4.2;
232 | TARGETED_DEVICE_FAMILY = "1,2";
233 | VERSIONING_SYSTEM = "apple-generic";
234 | VERSION_INFO_PREFIX = "";
235 | };
236 | name = Release;
237 | };
238 | 47CC68C9215C0387001B3A20 /* Debug */ = {
239 | isa = XCBuildConfiguration;
240 | buildSettings = {
241 | ALWAYS_SEARCH_USER_PATHS = NO;
242 | CLANG_ANALYZER_NONNULL = YES;
243 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
244 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
245 | CLANG_CXX_LIBRARY = "libc++";
246 | CLANG_ENABLE_MODULES = YES;
247 | CLANG_ENABLE_OBJC_ARC = YES;
248 | CLANG_ENABLE_OBJC_WEAK = YES;
249 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
250 | CLANG_WARN_BOOL_CONVERSION = YES;
251 | CLANG_WARN_COMMA = YES;
252 | CLANG_WARN_CONSTANT_CONVERSION = YES;
253 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
254 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
255 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
256 | CLANG_WARN_EMPTY_BODY = YES;
257 | CLANG_WARN_ENUM_CONVERSION = YES;
258 | CLANG_WARN_INFINITE_RECURSION = YES;
259 | CLANG_WARN_INT_CONVERSION = YES;
260 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
261 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
262 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
263 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
264 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
265 | CLANG_WARN_STRICT_PROTOTYPES = YES;
266 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
267 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
268 | CLANG_WARN_UNREACHABLE_CODE = YES;
269 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
270 | CODE_SIGN_IDENTITY = "iPhone Developer";
271 | COPY_PHASE_STRIP = NO;
272 | DEBUG_INFORMATION_FORMAT = dwarf;
273 | ENABLE_STRICT_OBJC_MSGSEND = YES;
274 | ENABLE_TESTABILITY = YES;
275 | GCC_C_LANGUAGE_STANDARD = gnu11;
276 | GCC_DYNAMIC_NO_PIC = NO;
277 | GCC_NO_COMMON_BLOCKS = YES;
278 | GCC_OPTIMIZATION_LEVEL = 0;
279 | GCC_PREPROCESSOR_DEFINITIONS = (
280 | "DEBUG=1",
281 | "$(inherited)",
282 | );
283 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
284 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
285 | GCC_WARN_UNDECLARED_SELECTOR = YES;
286 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
287 | GCC_WARN_UNUSED_FUNCTION = YES;
288 | GCC_WARN_UNUSED_VARIABLE = YES;
289 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
290 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
291 | MTL_FAST_MATH = YES;
292 | ONLY_ACTIVE_ARCH = YES;
293 | SDKROOT = iphoneos;
294 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
295 | SWIFT_INCLUDE_PATHS = "$(SRCROOT)/MyFramework";
296 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
297 | };
298 | name = Debug;
299 | };
300 | 47CC68CA215C0387001B3A20 /* Release */ = {
301 | isa = XCBuildConfiguration;
302 | buildSettings = {
303 | ALWAYS_SEARCH_USER_PATHS = NO;
304 | CLANG_ANALYZER_NONNULL = YES;
305 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
306 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
307 | CLANG_CXX_LIBRARY = "libc++";
308 | CLANG_ENABLE_MODULES = YES;
309 | CLANG_ENABLE_OBJC_ARC = YES;
310 | CLANG_ENABLE_OBJC_WEAK = YES;
311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
312 | CLANG_WARN_BOOL_CONVERSION = YES;
313 | CLANG_WARN_COMMA = YES;
314 | CLANG_WARN_CONSTANT_CONVERSION = YES;
315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
317 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
318 | CLANG_WARN_EMPTY_BODY = YES;
319 | CLANG_WARN_ENUM_CONVERSION = YES;
320 | CLANG_WARN_INFINITE_RECURSION = YES;
321 | CLANG_WARN_INT_CONVERSION = YES;
322 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
323 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
324 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
325 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
326 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
327 | CLANG_WARN_STRICT_PROTOTYPES = YES;
328 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
329 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
330 | CLANG_WARN_UNREACHABLE_CODE = YES;
331 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
332 | CODE_SIGN_IDENTITY = "iPhone Developer";
333 | COPY_PHASE_STRIP = NO;
334 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
335 | ENABLE_NS_ASSERTIONS = NO;
336 | ENABLE_STRICT_OBJC_MSGSEND = YES;
337 | GCC_C_LANGUAGE_STANDARD = gnu11;
338 | GCC_NO_COMMON_BLOCKS = YES;
339 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
340 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
341 | GCC_WARN_UNDECLARED_SELECTOR = YES;
342 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
343 | GCC_WARN_UNUSED_FUNCTION = YES;
344 | GCC_WARN_UNUSED_VARIABLE = YES;
345 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
346 | MTL_ENABLE_DEBUG_INFO = NO;
347 | MTL_FAST_MATH = YES;
348 | SDKROOT = iphoneos;
349 | SWIFT_COMPILATION_MODE = wholemodule;
350 | SWIFT_INCLUDE_PATHS = "$(SRCROOT)/MyFramework";
351 | SWIFT_OPTIMIZATION_LEVEL = "-O";
352 | VALIDATE_PRODUCT = YES;
353 | };
354 | name = Release;
355 | };
356 | /* End XCBuildConfiguration section */
357 |
358 | /* Begin XCConfigurationList section */
359 | 308AB40F21E485CB007E5ED1 /* Build configuration list for PBXNativeTarget "PlatformLib" */ = {
360 | isa = XCConfigurationList;
361 | buildConfigurations = (
362 | 308AB41021E485CB007E5ED1 /* Debug */,
363 | 308AB41121E485CB007E5ED1 /* Release */,
364 | );
365 | defaultConfigurationIsVisible = 0;
366 | defaultConfigurationName = Release;
367 | };
368 | 47CC68B4215C0386001B3A20 /* Build configuration list for PBXProject "PlatformLib" */ = {
369 | isa = XCConfigurationList;
370 | buildConfigurations = (
371 | 47CC68C9215C0387001B3A20 /* Debug */,
372 | 47CC68CA215C0387001B3A20 /* Release */,
373 | );
374 | defaultConfigurationIsVisible = 0;
375 | defaultConfigurationName = Release;
376 | };
377 | /* End XCConfigurationList section */
378 | };
379 | rootObject = 47CC68B1215C0386001B3A20 /* Project object */;
380 | }
381 |
--------------------------------------------------------------------------------
/native/KotlinIOS/KotlinIOS.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 30D3232D221C5D6C000AF313 /* ProjectName.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30D3232C221C5D6C000AF313 /* ProjectName.framework */; };
11 | 30D3232E221C5D6C000AF313 /* ProjectName.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 30D3232C221C5D6C000AF313 /* ProjectName.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12 | 47CC68BD215C0386001B3A20 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47CC68BC215C0386001B3A20 /* AppDelegate.swift */; };
13 | 47CC68BF215C0386001B3A20 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47CC68BE215C0386001B3A20 /* ViewController.swift */; };
14 | 47CC68C2215C0386001B3A20 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 47CC68C0215C0386001B3A20 /* Main.storyboard */; };
15 | 47CC68C4215C0387001B3A20 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 47CC68C3215C0387001B3A20 /* Assets.xcassets */; };
16 | 47CC68C7215C0387001B3A20 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 47CC68C5215C0387001B3A20 /* LaunchScreen.storyboard */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXCopyFilesBuildPhase section */
20 | 47417630215D147E0075153C /* Embed Frameworks */ = {
21 | isa = PBXCopyFilesBuildPhase;
22 | buildActionMask = 2147483647;
23 | dstPath = "";
24 | dstSubfolderSpec = 10;
25 | files = (
26 | 30D3232E221C5D6C000AF313 /* ProjectName.framework in Embed Frameworks */,
27 | );
28 | name = "Embed Frameworks";
29 | runOnlyForDeploymentPostprocessing = 0;
30 | };
31 | /* End PBXCopyFilesBuildPhase section */
32 |
33 | /* Begin PBXFileReference section */
34 | 30D3232C221C5D6C000AF313 /* ProjectName.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ProjectName.framework; path = "../../ProjectName/build/xcode-frameworks/ProjectName.framework"; sourceTree = ""; };
35 | 47CC68B9215C0386001B3A20 /* KotlinIOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KotlinIOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
36 | 47CC68BC215C0386001B3A20 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
37 | 47CC68BE215C0386001B3A20 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
38 | 47CC68C1215C0386001B3A20 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
39 | 47CC68C3215C0387001B3A20 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
40 | 47CC68C6215C0387001B3A20 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
41 | 47CC68C8215C0387001B3A20 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
42 | /* End PBXFileReference section */
43 |
44 | /* Begin PBXFrameworksBuildPhase section */
45 | 47CC68B6215C0386001B3A20 /* Frameworks */ = {
46 | isa = PBXFrameworksBuildPhase;
47 | buildActionMask = 2147483647;
48 | files = (
49 | 30D3232D221C5D6C000AF313 /* ProjectName.framework in Frameworks */,
50 | );
51 | runOnlyForDeploymentPostprocessing = 0;
52 | };
53 | /* End PBXFrameworksBuildPhase section */
54 |
55 | /* Begin PBXGroup section */
56 | 3046C55921F0615000789D8A /* Frameworks */ = {
57 | isa = PBXGroup;
58 | children = (
59 | );
60 | name = Frameworks;
61 | sourceTree = "";
62 | };
63 | 47CC68B0215C0386001B3A20 = {
64 | isa = PBXGroup;
65 | children = (
66 | 30D3232C221C5D6C000AF313 /* ProjectName.framework */,
67 | 47CC68BB215C0386001B3A20 /* KotlinIOS */,
68 | 47CC68BA215C0386001B3A20 /* Products */,
69 | 3046C55921F0615000789D8A /* Frameworks */,
70 | );
71 | sourceTree = "";
72 | };
73 | 47CC68BA215C0386001B3A20 /* Products */ = {
74 | isa = PBXGroup;
75 | children = (
76 | 47CC68B9215C0386001B3A20 /* KotlinIOS.app */,
77 | );
78 | name = Products;
79 | sourceTree = "";
80 | };
81 | 47CC68BB215C0386001B3A20 /* KotlinIOS */ = {
82 | isa = PBXGroup;
83 | children = (
84 | 47CC68BC215C0386001B3A20 /* AppDelegate.swift */,
85 | 47CC68BE215C0386001B3A20 /* ViewController.swift */,
86 | 47CC68C0215C0386001B3A20 /* Main.storyboard */,
87 | 47CC68C3215C0387001B3A20 /* Assets.xcassets */,
88 | 47CC68C5215C0387001B3A20 /* LaunchScreen.storyboard */,
89 | 47CC68C8215C0387001B3A20 /* Info.plist */,
90 | );
91 | path = KotlinIOS;
92 | sourceTree = "";
93 | };
94 | /* End PBXGroup section */
95 |
96 | /* Begin PBXNativeTarget section */
97 | 47CC68B8215C0386001B3A20 /* KotlinIOS */ = {
98 | isa = PBXNativeTarget;
99 | buildConfigurationList = 47CC68CB215C0387001B3A20 /* Build configuration list for PBXNativeTarget "KotlinIOS" */;
100 | buildPhases = (
101 | 4741762C215D10D70075153C /* Run Script */,
102 | 47CC68B5215C0386001B3A20 /* Sources */,
103 | 47CC68B6215C0386001B3A20 /* Frameworks */,
104 | 47CC68B7215C0386001B3A20 /* Resources */,
105 | 47417630215D147E0075153C /* Embed Frameworks */,
106 | );
107 | buildRules = (
108 | );
109 | dependencies = (
110 | );
111 | name = KotlinIOS;
112 | productName = KotlinIOS;
113 | productReference = 47CC68B9215C0386001B3A20 /* KotlinIOS.app */;
114 | productType = "com.apple.product-type.application";
115 | };
116 | /* End PBXNativeTarget section */
117 |
118 | /* Begin PBXProject section */
119 | 47CC68B1215C0386001B3A20 /* Project object */ = {
120 | isa = PBXProject;
121 | attributes = {
122 | LastSwiftUpdateCheck = 1000;
123 | LastUpgradeCheck = 1000;
124 | ORGANIZATIONNAME = Sample;
125 | TargetAttributes = {
126 | 47CC68B8215C0386001B3A20 = {
127 | CreatedOnToolsVersion = 10.0;
128 | LastSwiftMigration = 1010;
129 | SystemCapabilities = {
130 | com.apple.BackgroundModes = {
131 | enabled = 1;
132 | };
133 | };
134 | };
135 | };
136 | };
137 | buildConfigurationList = 47CC68B4215C0386001B3A20 /* Build configuration list for PBXProject "KotlinIOS" */;
138 | compatibilityVersion = "Xcode 9.3";
139 | developmentRegion = en;
140 | hasScannedForEncodings = 0;
141 | knownRegions = (
142 | en,
143 | Base,
144 | );
145 | mainGroup = 47CC68B0215C0386001B3A20;
146 | productRefGroup = 47CC68BA215C0386001B3A20 /* Products */;
147 | projectDirPath = "";
148 | projectRoot = "";
149 | targets = (
150 | 47CC68B8215C0386001B3A20 /* KotlinIOS */,
151 | );
152 | };
153 | /* End PBXProject section */
154 |
155 | /* Begin PBXResourcesBuildPhase section */
156 | 47CC68B7215C0386001B3A20 /* Resources */ = {
157 | isa = PBXResourcesBuildPhase;
158 | buildActionMask = 2147483647;
159 | files = (
160 | 47CC68C7215C0387001B3A20 /* LaunchScreen.storyboard in Resources */,
161 | 47CC68C4215C0387001B3A20 /* Assets.xcassets in Resources */,
162 | 47CC68C2215C0386001B3A20 /* Main.storyboard in Resources */,
163 | );
164 | runOnlyForDeploymentPostprocessing = 0;
165 | };
166 | /* End PBXResourcesBuildPhase section */
167 |
168 | /* Begin PBXShellScriptBuildPhase section */
169 | 4741762C215D10D70075153C /* Run Script */ = {
170 | isa = PBXShellScriptBuildPhase;
171 | buildActionMask = 2147483647;
172 | files = (
173 | );
174 | inputFileListPaths = (
175 | );
176 | inputPaths = (
177 | );
178 | name = "Run Script";
179 | outputFileListPaths = (
180 | );
181 | outputPaths = (
182 | );
183 | runOnlyForDeploymentPostprocessing = 0;
184 | shellPath = /bin/sh;
185 | shellScript = "# FIXME: Test configuration before use. Until then use IDEA to build the selected architecture.\n#cd $SRCROOT/../../ProjectName/build/xcode-frameworks\n#./gradlew :ProjectName:linkDebugFrameworkIos -PXCODE_CONFIGURATION=${CONFIGURATION}\n\n";
186 | };
187 | /* End PBXShellScriptBuildPhase section */
188 |
189 | /* Begin PBXSourcesBuildPhase section */
190 | 47CC68B5215C0386001B3A20 /* Sources */ = {
191 | isa = PBXSourcesBuildPhase;
192 | buildActionMask = 2147483647;
193 | files = (
194 | 47CC68BF215C0386001B3A20 /* ViewController.swift in Sources */,
195 | 47CC68BD215C0386001B3A20 /* AppDelegate.swift in Sources */,
196 | );
197 | runOnlyForDeploymentPostprocessing = 0;
198 | };
199 | /* End PBXSourcesBuildPhase section */
200 |
201 | /* Begin PBXVariantGroup section */
202 | 47CC68C0215C0386001B3A20 /* Main.storyboard */ = {
203 | isa = PBXVariantGroup;
204 | children = (
205 | 47CC68C1215C0386001B3A20 /* Base */,
206 | );
207 | name = Main.storyboard;
208 | sourceTree = "";
209 | };
210 | 47CC68C5215C0387001B3A20 /* LaunchScreen.storyboard */ = {
211 | isa = PBXVariantGroup;
212 | children = (
213 | 47CC68C6215C0387001B3A20 /* Base */,
214 | );
215 | name = LaunchScreen.storyboard;
216 | sourceTree = "";
217 | };
218 | /* End PBXVariantGroup section */
219 |
220 | /* Begin XCBuildConfiguration section */
221 | 47CC68C9215C0387001B3A20 /* Debug */ = {
222 | isa = XCBuildConfiguration;
223 | buildSettings = {
224 | ALWAYS_SEARCH_USER_PATHS = NO;
225 | CLANG_ANALYZER_NONNULL = YES;
226 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
227 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
228 | CLANG_CXX_LIBRARY = "libc++";
229 | CLANG_ENABLE_MODULES = YES;
230 | CLANG_ENABLE_OBJC_ARC = YES;
231 | CLANG_ENABLE_OBJC_WEAK = YES;
232 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
233 | CLANG_WARN_BOOL_CONVERSION = YES;
234 | CLANG_WARN_COMMA = YES;
235 | CLANG_WARN_CONSTANT_CONVERSION = YES;
236 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
237 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
238 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
239 | CLANG_WARN_EMPTY_BODY = YES;
240 | CLANG_WARN_ENUM_CONVERSION = YES;
241 | CLANG_WARN_INFINITE_RECURSION = YES;
242 | CLANG_WARN_INT_CONVERSION = YES;
243 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
244 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
245 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
246 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
247 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
248 | CLANG_WARN_STRICT_PROTOTYPES = YES;
249 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
250 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
251 | CLANG_WARN_UNREACHABLE_CODE = YES;
252 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
253 | CODE_SIGN_IDENTITY = "iPhone Developer";
254 | COPY_PHASE_STRIP = NO;
255 | DEBUG_INFORMATION_FORMAT = dwarf;
256 | ENABLE_STRICT_OBJC_MSGSEND = YES;
257 | ENABLE_TESTABILITY = YES;
258 | GCC_C_LANGUAGE_STANDARD = gnu11;
259 | GCC_DYNAMIC_NO_PIC = NO;
260 | GCC_NO_COMMON_BLOCKS = YES;
261 | GCC_OPTIMIZATION_LEVEL = 0;
262 | GCC_PREPROCESSOR_DEFINITIONS = (
263 | "DEBUG=1",
264 | "$(inherited)",
265 | );
266 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
267 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
268 | GCC_WARN_UNDECLARED_SELECTOR = YES;
269 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
270 | GCC_WARN_UNUSED_FUNCTION = YES;
271 | GCC_WARN_UNUSED_VARIABLE = YES;
272 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
273 | MODULEMAP_PRIVATE_FILE = "$(SRCROOT)/PlatformLib/PlatformLib.private.modulemap";
274 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
275 | MTL_FAST_MATH = YES;
276 | ONLY_ACTIVE_ARCH = YES;
277 | SDKROOT = iphoneos;
278 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
279 | SWIFT_INCLUDE_PATHS = "$(SRCROOT)/MyFramework";
280 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
281 | };
282 | name = Debug;
283 | };
284 | 47CC68CA215C0387001B3A20 /* Release */ = {
285 | isa = XCBuildConfiguration;
286 | buildSettings = {
287 | ALWAYS_SEARCH_USER_PATHS = NO;
288 | CLANG_ANALYZER_NONNULL = YES;
289 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
290 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
291 | CLANG_CXX_LIBRARY = "libc++";
292 | CLANG_ENABLE_MODULES = YES;
293 | CLANG_ENABLE_OBJC_ARC = YES;
294 | CLANG_ENABLE_OBJC_WEAK = YES;
295 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
296 | CLANG_WARN_BOOL_CONVERSION = YES;
297 | CLANG_WARN_COMMA = YES;
298 | CLANG_WARN_CONSTANT_CONVERSION = YES;
299 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
300 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
301 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
302 | CLANG_WARN_EMPTY_BODY = YES;
303 | CLANG_WARN_ENUM_CONVERSION = YES;
304 | CLANG_WARN_INFINITE_RECURSION = YES;
305 | CLANG_WARN_INT_CONVERSION = YES;
306 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
307 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
308 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
309 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
310 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
311 | CLANG_WARN_STRICT_PROTOTYPES = YES;
312 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
313 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
314 | CLANG_WARN_UNREACHABLE_CODE = YES;
315 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
316 | CODE_SIGN_IDENTITY = "iPhone Developer";
317 | COPY_PHASE_STRIP = NO;
318 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
319 | ENABLE_NS_ASSERTIONS = NO;
320 | ENABLE_STRICT_OBJC_MSGSEND = YES;
321 | GCC_C_LANGUAGE_STANDARD = gnu11;
322 | GCC_NO_COMMON_BLOCKS = YES;
323 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
324 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
325 | GCC_WARN_UNDECLARED_SELECTOR = YES;
326 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
327 | GCC_WARN_UNUSED_FUNCTION = YES;
328 | GCC_WARN_UNUSED_VARIABLE = YES;
329 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
330 | MODULEMAP_PRIVATE_FILE = "$(SRCROOT)/PlatformLib/PlatformLib.private.modulemap";
331 | MTL_ENABLE_DEBUG_INFO = NO;
332 | MTL_FAST_MATH = YES;
333 | SDKROOT = iphoneos;
334 | SWIFT_COMPILATION_MODE = wholemodule;
335 | SWIFT_INCLUDE_PATHS = "$(SRCROOT)/MyFramework";
336 | SWIFT_OPTIMIZATION_LEVEL = "-O";
337 | VALIDATE_PRODUCT = YES;
338 | };
339 | name = Release;
340 | };
341 | 47CC68CC215C0387001B3A20 /* Debug */ = {
342 | isa = XCBuildConfiguration;
343 | buildSettings = {
344 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
345 | CLANG_ENABLE_MODULES = YES;
346 | CODE_SIGN_STYLE = Automatic;
347 | DEVELOPMENT_TEAM = RCHSJ9829S;
348 | ENABLE_BITCODE = NO;
349 | FRAMEWORK_SEARCH_PATHS = (
350 | "$(SRCROOT)/../../ProjectName/build/xcode-frameworks",
351 | "$(PROJECT_DIR)",
352 | );
353 | INFOPLIST_FILE = KotlinIOS/Info.plist;
354 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
355 | LD_RUNPATH_SEARCH_PATHS = (
356 | "$(inherited)",
357 | "@executable_path/Frameworks",
358 | "@loader_path/Frameworks",
359 | );
360 | MODULEMAP_PRIVATE_FILE = "";
361 | PRODUCT_BUNDLE_IDENTIFIER = io.sample.KotlinIOS;
362 | PRODUCT_NAME = "$(TARGET_NAME)";
363 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
364 | SWIFT_VERSION = 4.2;
365 | TARGETED_DEVICE_FAMILY = "1,2";
366 | };
367 | name = Debug;
368 | };
369 | 47CC68CD215C0387001B3A20 /* Release */ = {
370 | isa = XCBuildConfiguration;
371 | buildSettings = {
372 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
373 | CLANG_ENABLE_MODULES = YES;
374 | CODE_SIGN_STYLE = Automatic;
375 | DEVELOPMENT_TEAM = RCHSJ9829S;
376 | ENABLE_BITCODE = NO;
377 | FRAMEWORK_SEARCH_PATHS = (
378 | "$(SRCROOT)/../../ProjectName/build/xcode-frameworks",
379 | "$(PROJECT_DIR)",
380 | );
381 | INFOPLIST_FILE = KotlinIOS/Info.plist;
382 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
383 | LD_RUNPATH_SEARCH_PATHS = (
384 | "$(inherited)",
385 | "@executable_path/Frameworks",
386 | "@loader_path/Frameworks",
387 | );
388 | MODULEMAP_PRIVATE_FILE = "";
389 | PRODUCT_BUNDLE_IDENTIFIER = io.sample.KotlinIOS;
390 | PRODUCT_NAME = "$(TARGET_NAME)";
391 | SWIFT_VERSION = 4.2;
392 | TARGETED_DEVICE_FAMILY = "1,2";
393 | };
394 | name = Release;
395 | };
396 | /* End XCBuildConfiguration section */
397 |
398 | /* Begin XCConfigurationList section */
399 | 47CC68B4215C0386001B3A20 /* Build configuration list for PBXProject "KotlinIOS" */ = {
400 | isa = XCConfigurationList;
401 | buildConfigurations = (
402 | 47CC68C9215C0387001B3A20 /* Debug */,
403 | 47CC68CA215C0387001B3A20 /* Release */,
404 | );
405 | defaultConfigurationIsVisible = 0;
406 | defaultConfigurationName = Release;
407 | };
408 | 47CC68CB215C0387001B3A20 /* Build configuration list for PBXNativeTarget "KotlinIOS" */ = {
409 | isa = XCConfigurationList;
410 | buildConfigurations = (
411 | 47CC68CC215C0387001B3A20 /* Debug */,
412 | 47CC68CD215C0387001B3A20 /* Release */,
413 | );
414 | defaultConfigurationIsVisible = 0;
415 | defaultConfigurationName = Release;
416 | };
417 | /* End XCConfigurationList section */
418 | };
419 | rootObject = 47CC68B1215C0386001B3A20 /* Project object */;
420 | }
421 |
--------------------------------------------------------------------------------