Started buidling sample structure
This commit is contained in:
parent
0a52a55a9d
commit
d81f1eea4b
@ -17,24 +17,20 @@
|
||||
object Versions {
|
||||
val kotlinCoroutines = "1.3.9"
|
||||
val kotlin = "1.4.10"
|
||||
val kotlinSerialization = "1.0.0-RC"
|
||||
val kotlinSerialization = "1.0.0"
|
||||
val kotlinSerializationPlugin = "1.4.10"
|
||||
val atomicfu = "0.14.3-M2-2-SNAPSHOT" //NOTE: my linux arm32 and arm64 build
|
||||
val nodePlugin = "1.3.0"
|
||||
val dokkaPlugin = "1.4.0-rc"
|
||||
val taskTreePlugin = "1.5"
|
||||
|
||||
val kotlinBigNumVersion = "0.2.2"
|
||||
|
||||
val lazySodium = "4.3.1-SNAPSHOT"
|
||||
val jna = "5.5.0"
|
||||
|
||||
val kotlinPoet = "1.6.0"
|
||||
|
||||
val sharedModule = "0.1.0-SNAPSHOT"
|
||||
|
||||
val ktor = "1.3.2"
|
||||
|
||||
val timber = "4.7.1"
|
||||
val kodeinVersion = "7.1.0"
|
||||
|
||||
|
||||
|
||||
@ -52,7 +48,7 @@ object Deps {
|
||||
val test = "test-common"
|
||||
val testAnnotation = "test-annotations-common"
|
||||
val coroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:${Versions.kotlinCoroutines}"
|
||||
val serialization = "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:${Versions.kotlinSerialization}"
|
||||
val serialization = "org.jetbrains.kotlinx:kotlinx-serialization-json:${Versions.kotlinSerialization}"
|
||||
val atomicfu = "com.ionspin.kotlin.atomicfu:atomicfu:${Versions.atomicfu}"
|
||||
|
||||
|
||||
@ -61,6 +57,8 @@ object Deps {
|
||||
val apiProject = ":multiplatform-crypto-api"
|
||||
|
||||
val sharedModule = "com.ionspin.kotlin.crypto.sample:shared:${Versions.sharedModule}"
|
||||
|
||||
val kodein = "org.kodein.di:kodein-di:${Versions.kodeinVersion}"
|
||||
}
|
||||
|
||||
object Js {
|
||||
@ -146,7 +144,7 @@ object Deps {
|
||||
|
||||
|
||||
object PluginsDeps {
|
||||
val kotlinSerializationPlugin = "kotlinx-serialization"
|
||||
val kotlinSerializationPlugin = "plugin.serialization"
|
||||
val multiplatform = "multiplatform"
|
||||
val node = "com.github.node-gradle.node"
|
||||
val mavenPublish = "maven-publish"
|
||||
|
@ -27,6 +27,7 @@ plugins {
|
||||
id(PluginsDeps.kotlinAndroidExtensions)
|
||||
id(PluginsDeps.mavenPublish)
|
||||
id(PluginsDeps.signing)
|
||||
kotlin(PluginsDeps.kotlinSerializationPlugin) version Versions.kotlinSerializationPlugin
|
||||
|
||||
}
|
||||
org.jetbrains.kotlin.gradle.targets.js.npm.NpmResolverPlugin.apply(project)
|
||||
@ -91,12 +92,7 @@ kotlin {
|
||||
// Linux 32 is using target-sysroot-2-raspberrypi which is missing getrandom and explicit_bzero in stdlib
|
||||
// so konanc can't build klib because getrandom missing will cause sodium_misuse()
|
||||
// so 32bit will be only available from non-delegated flavor
|
||||
// linuxArm32Hfp() {
|
||||
// binaries {
|
||||
// executable {
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
linuxArm64() {
|
||||
binaries {
|
||||
executable {
|
||||
@ -172,6 +168,7 @@ kotlin {
|
||||
implementation(kotlin(Deps.Common.stdLib))
|
||||
implementation(kotlin(Deps.Common.test))
|
||||
implementation(Deps.Common.kotlinBigNum)
|
||||
implementation(Deps.Common.serialization)
|
||||
implementation(project(":multiplatform-crypto-libsodium-bindings"))
|
||||
}
|
||||
}
|
||||
@ -242,10 +239,7 @@ kotlin {
|
||||
dependencies {
|
||||
implementation(kotlin(Deps.Js.stdLib))
|
||||
implementation(Deps.Js.coroutines)
|
||||
// implementation(Deps.Js.serialization)
|
||||
// implementation(Deps.Js.ktorClient)
|
||||
// implementation(Deps.Js.ktorClientSerialization)
|
||||
// implementation(Deps.Js.ktorClientWebSockets)
|
||||
|
||||
// React
|
||||
implementation(Deps.Js.React.react)
|
||||
implementation(Deps.Js.React.reactDom)
|
||||
@ -256,12 +250,7 @@ kotlin {
|
||||
implementation(Deps.Js.React.styled)
|
||||
implementation(npm(Deps.Js.Npm.styledComponentsPair.first, Deps.Js.Npm.styledComponentsPair.second))
|
||||
implementation(npm(Deps.Js.Npm.inlineStylePrefixesPair.first, Deps.Js.Npm.inlineStylePrefixesPair.second))
|
||||
// Webpack ktor missing deps
|
||||
// implementation(npm("text-encoding", "0.7.0"))
|
||||
// implementation(npm("abort-controller", "3.0.0"))
|
||||
// implementation(npm("bufferutil", "4.0.1"))
|
||||
// implementation(npm("utf-8-validate", "5.0.2"))
|
||||
// implementation(npm("fs"))
|
||||
|
||||
}
|
||||
}
|
||||
val jsTest by getting {
|
||||
@ -275,12 +264,7 @@ kotlin {
|
||||
val linuxTest by getting {
|
||||
dependsOn(nativeTest)
|
||||
}
|
||||
// val linuxArm32HfpMain by getting {
|
||||
// dependsOn(nativeMain)
|
||||
// }
|
||||
// val linuxArm32HfpTest by getting {
|
||||
// dependsOn(nativeTest)
|
||||
// }
|
||||
|
||||
val linuxArm64Main by getting {
|
||||
dependsOn(nativeMain)
|
||||
}
|
||||
|
@ -0,0 +1,28 @@
|
||||
package com.ionspin.kotlin.crypto.sample.di
|
||||
|
||||
import kotlinx.serialization.json.Json
|
||||
|
||||
/**
|
||||
* Created by Ugljesa Jovanovic
|
||||
* ugljesa.jovanovic@ionspin.com
|
||||
* on 17-Oct-2020
|
||||
*/
|
||||
object ServiceLocator : ServiceLocatorInterface {
|
||||
override val Storage: StorageModule = StorageModule.StorageServiceLocator()
|
||||
|
||||
|
||||
}
|
||||
|
||||
interface ServiceLocatorInterface {
|
||||
val Storage: StorageModule
|
||||
}
|
||||
|
||||
interface StorageModule {
|
||||
val json: Json
|
||||
|
||||
class StorageServiceLocator : StorageModule {
|
||||
override val json = Json {
|
||||
prettyPrint = true
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.ionspin.kotlin.crypto.sample.ui
|
||||
|
||||
/**
|
||||
* Created by Ugljesa Jovanovic
|
||||
* ugljesa.jovanovic@ionspin.com
|
||||
* on 17-Oct-2020
|
||||
*/
|
||||
class LandingController {
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user