11repositories {
22 maven { url " https://dl.bintray.com/spekframework/spek-dev" }
33}
4- apply plugin : ' java '
4+ apply plugin : ' com.android.library '
55apply plugin : ' kotlin-multiplatform'
66
77archivesBaseName = ' presenter-middleware'
88
99group ' org.reduxkotlin'
10- version ' 0.2'
10+ version ' 0.2.9 '
1111
1212kotlin {
13- jvm()
14- js() {
15- [compileKotlinJs, compileTestKotlinJs]. each { configuration ->
16- configuration. kotlinOptions {
17- moduleKind = ' umd'
18- sourceMap = true
19- metaInfo = true
20- }
21- }
13+ targets {
14+ fromPreset(presets. android, ' android' )
2215 }
16+ jvm()
17+ // commented targets are unsupported with current coroutine version 1.2.2
18+ // js() {
19+ // [compileKotlinJs, compileTestKotlinJs].each { configuration ->
20+ // configuration.kotlinOptions {
21+ // moduleKind = 'umd'
22+ // sourceMap = true
23+ // metaInfo = true
24+ // }
25+ // }
26+ // }
2327 // -module-name args are needed to prevent circular deps bug on native platforms
28+
2429 iosArm64(" ios" ) {
2530 compilations. main. extraOpts. addAll([" -module-name" , " presenter-middleware" ])
2631 }
2732
2833 iosX64(" iosSim" ) {
2934 compilations. main. extraOpts. addAll([" -module-name" , " presenter-middleware" ])
3035 }
31- macosX64(" macos" ) {
32- compilations. main. extraOpts. addAll([" -module-name" , " presenter-middleware" ])
33- }
34-
35- mingwX64(" win" ) {
36- compilations. main. extraOpts. addAll([" -module-name" , " presenter-middleware" ])
37- }
38-
39- wasm32(" wasm" ) {
40- compilations. main. extraOpts. addAll([" -module-name" , " presenter-middleware" ])
41- }
42-
43- linuxArm32Hfp(" linArm32" ) {
44- compilations. main. extraOpts. addAll([" -module-name" , " presenter-middleware" ])
45- }
46-
47- linuxMips32(" linMips32" ) {
48- compilations. main. extraOpts. addAll([" -module-name" , " presenter-middleware" ])
49- }
50-
51- linuxMipsel32(" linMipsel32" ) {
52- compilations. main. extraOpts. addAll([" -module-name" , " presenter-middleware" ])
53- }
54-
55- linuxX64(" lin64" ) {
56- compilations. main. extraOpts. addAll([" -module-name" , " presenter-middleware" ])
57- }
36+ // macosX64("macos") {
37+ // compilations.main.extraOpts.addAll(["-module-name", "presenter-middleware"])
38+ // }
39+ //
40+ // mingwX64("win") {
41+ // compilations.main.extraOpts.addAll(["-module-name", "presenter-middleware"])
42+ // }
43+ //
44+ // wasm32("wasm") {
45+ // compilations.main.extraOpts.addAll(["-module-name", "presenter-middleware"])
46+ // }
47+ //
48+ // linuxArm32Hfp("linArm32") {
49+ // compilations.main.extraOpts.addAll(["-module-name", "presenter-middleware"])
50+ // }
51+ //
52+ // linuxMips32("linMips32") {
53+ // compilations.main.extraOpts.addAll(["-module-name", "presenter-middleware"])
54+ // }
55+ //
56+ // linuxMipsel32("linMipsel32") {
57+ // compilations.main.extraOpts.addAll(["-module-name", "presenter-middleware"])
58+ // }
59+ //
60+ // linuxX64("lin64") {
61+ // compilations.main.extraOpts.addAll(["-module-name", "presenter-middleware"])
62+ // }
5863
5964
6065 sourceSets {
6166 commonMain {
6267 dependencies {
6368 implementation kotlin(" stdlib-common" )
64- implementation " org.reduxkotlin:redux-kotlin-reselect:0.2.6 "
65- implementation " org.reduxkotlin:redux-kotlin:0.2.4 "
69+ implementation " org.reduxkotlin:redux-kotlin-reselect:0.2.9 "
70+ implementation " org.reduxkotlin:redux-kotlin:0.2.6 "
6671 implementation " org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$project . versions . coroutinesVersion "
6772 }
6873 }
@@ -77,16 +82,26 @@ kotlin {
7782 }
7883 }
7984
85+ androidMain {
86+ dependencies {
87+ api " org.jetbrains.kotlin:kotlin-stdlib:$project . versions . kotlinVersion "
88+ implementation " org.jetbrains.kotlinx:kotlinx-coroutines-core:$project . versions . coroutinesVersion "
89+ implementation ' androidx.appcompat:appcompat:1.1.0-rc01'
90+ }
91+ }
92+
8093 jvmMain {
8194 kotlin. srcDir(' src/jvmMain/kotlin' )
8295 dependencies {
8396 implementation kotlin(" stdlib" )
97+ implementation " org.jetbrains.kotlinx:kotlinx-coroutines-core:$project . versions . coroutinesVersion "
8498 }
8599 }
86100 jvmTest {
87101 dependencies {
88102 implementation kotlin(" test" )
89103 implementation kotlin(" test-junit" )
104+ implementation " org.jetbrains.kotlinx:kotlinx-coroutines-core:$project . versions . coroutinesVersion "
90105 implementation " org.spekframework.spek2:spek-dsl-jvm:$project . versions . spek "
91106 implementation " ch.tutteli.atrium:atrium-cc-en_GB-robstoll:$project . versions . atrium "
92107 implementation " io.mockk:mockk:1.9.3"
@@ -95,33 +110,60 @@ kotlin {
95110 runtimeOnly ' org.jetbrains.kotlin:kotlin-reflect'
96111 }
97112 }
98- jsMain {
99- kotlin. srcDir(' src/jsMain/kotlin' )
113+ // jsMain {
114+ // kotlin.srcDir('src/jsMain/kotlin')
115+ // dependencies {
116+ // implementation kotlin("stdlib-js")
117+ // }
118+ // compileKotlinJs {
119+ // kotlinOptions.metaInfo = true
120+ // kotlinOptions.sourceMap = true
121+ // kotlinOptions.suppressWarnings = true
122+ // kotlinOptions.verbose = true
123+ // kotlinOptions.main = "call"
124+ // kotlinOptions.moduleKind = "umd"
125+ // }
126+ // }
127+ // jsTest {
128+ // dependencies {
129+ // implementation kotlin("test-js")
130+ // implementation kotlin("stdlib-js")
131+ // }
132+ // }
133+ iosMain {
100134 dependencies {
101- implementation kotlin(" stdlib-js" )
102- }
103- compileKotlinJs {
104- kotlinOptions. metaInfo = true
105- kotlinOptions. sourceMap = true
106- kotlinOptions. suppressWarnings = true
107- kotlinOptions. verbose = true
108- kotlinOptions. main = " call"
109- kotlinOptions. moduleKind = " umd"
110- }
111- }
112- jsTest {
113- dependencies {
114- implementation kotlin(" test-js" )
115- implementation kotlin(" stdlib-js" )
135+ implementation " org.jetbrains.kotlinx:kotlinx-coroutines-core-native:$project . versions . coroutinesVersion "
116136 }
117137 }
118138
119139 iosSimMain. dependsOn iosMain
120140 iosSimTest. dependsOn iosTest
141+ lin64Main. dependsOn iosMain
142+ linArm32Main. dependsOn iosMain
143+ linMips32Main. dependsOn iosMain
144+ linMipsel32Main. dependsOn iosMain
121145
122146 }
123147}
124148
149+ android {
150+ compileSdkVersion 29
151+ defaultConfig {
152+ minSdkVersion 15
153+ }
154+ buildTypes {
155+ // This is for MultiplatformSettings
156+ debug {
157+ // MPP libraries don't currently get this resolution automatically
158+ matchingFallbacks = [' release' ]
159+ }
160+ release {
161+ minifyEnabled true
162+ proguardFiles getDefaultProguardFile(' proguard-android-optimize.txt' ), ' proguard-rules.pro'
163+ }
164+ }
165+ }
166+
125167
126168afterEvaluate {
127169 // Alias the task names we use elsewhere to the new task names.
0 commit comments