Skip to content

Commit c868e57

Browse files
author
Ugljesa Jovanovic
authored
Merge pull request #12 from ionspin/mac-build
Mac build
2 parents fdb5ca5 + 00ccab1 commit c868e57

File tree

18 files changed

+59
-383
lines changed

18 files changed

+59
-383
lines changed

.travis.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,20 @@ matrix:
22
include:
33
- os: linux
44
language: java
5-
jdk: oraclejdk8
5+
jdk: openjdk12
66
env:
77
KBUILD=linux
88
JAVA_OPTS=-Xmx2g
99
script:
1010
- ./gradlew build
11+
- os: osx
12+
language: java
13+
jdk: openjdk12
14+
env:
15+
KBUILD=linux
16+
JAVA_OPTS=-Xmx2g
17+
script:
18+
- ./gradlew build -x jvmTest -x jsTest
1119
cache:
1220
directories:
1321
- $HOME/.m2/

bignum/build.gradle.kts

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@
1818
@file:Suppress("UnstableApiUsage")
1919

2020
import com.moowork.gradle.node.task.NodeTask
21-
import org.jetbrains.dokka.gradle.DokkaTask
2221
import org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile
2322

2423
plugins {
25-
kotlin(PluginsDeps.multiplatform)
24+
kotlin(PluginsDeps.multiplatform)
2625
id (PluginsDeps.mavenPublish)
2726
id (PluginsDeps.signing)
2827
id (PluginsDeps.node) version Versions.nodePlugin
2928
id (PluginsDeps.dokka) version Versions.dokkaPlugin
3029
}
3130

3231
val sonatypeStaging = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
32+
val sonatypeSnapshots = "https://oss.sonatype.org/content/repositories/snapshots/"
3333

3434
val sonatypePassword : String? by project
3535

@@ -41,7 +41,7 @@ repositories {
4141

4242
}
4343
group = "com.ionspin.kotlin"
44-
version = "0.0.7"
44+
version = "0.0.9-SNAPSHOT"
4545

4646
kotlin {
4747
jvm()
@@ -60,10 +60,20 @@ kotlin {
6060
}
6161
}
6262
}
63-
linuxX64("linux")
63+
linuxX64("linux") {
64+
compilations["main"].outputKinds("static")
65+
}
6466
iosX64("ios") {
6567
compilations["main"].outputKinds("framework")
6668
}
69+
iosArm64("ios64Arm") {
70+
compilations["main"].outputKinds("framework")
71+
}
72+
macosX64() {
73+
compilations["main"].outputKinds("framework")
74+
}
75+
76+
println(targets.names)
6777

6878
sourceSets {
6979
val commonMain by getting {
@@ -107,23 +117,36 @@ kotlin {
107117
implementation(kotlin("test-js"))
108118
}
109119
}
110-
val iosMain by getting {
120+
val nativeMain by creating {
121+
dependsOn(commonMain)
111122
dependencies {
112123
implementation(Deps.Native.coroutines)
113124
}
114125
}
126+
val nativeTest by creating {
127+
128+
}
129+
130+
val iosMain by getting {
131+
dependsOn(nativeMain)
132+
}
115133
val iosTest by getting {
134+
dependsOn(nativeTest)
116135
}
117136

118-
val nativeMain by creating {
119-
dependencies {
120-
implementation(Deps.Native.coroutines)
121-
}
137+
val ios64ArmMain by getting {
138+
dependsOn(nativeMain)
122139
}
123-
val nativeTest by creating {
124-
140+
val ios64ArmTest by getting {
141+
dependsOn(nativeTest)
125142
}
126143

144+
val macosX64Main by getting {
145+
dependsOn(nativeMain)
146+
}
147+
val macosX64Test by getting {
148+
dependsOn(nativeTest)
149+
}
127150
val linuxMain by getting {
128151
dependsOn(nativeMain)
129152
}
@@ -252,6 +275,15 @@ publishing {
252275
password = sonatypePassword ?: ""
253276
}
254277
}
278+
279+
maven {
280+
name = "snapshot"
281+
url = uri(sonatypeSnapshots)
282+
credentials {
283+
username = sonatypeUsername ?: ""
284+
password = sonatypePassword ?: ""
285+
}
286+
}
255287
}
256288
}
257289

bignum/src/commonMain/kotlin/com/ionspin/kotlin/bignum/integer/util/BlockingUtil.kt

Lines changed: 0 additions & 26 deletions
This file was deleted.

bignum/src/commonMain/kotlin/com/ionspin/kotlin/bignum/integer/util/TestUtil.kt

Lines changed: 0 additions & 25 deletions
This file was deleted.

bignum/src/commonTest/kotlin/com/ionspin/kotlin/bignum/integer/arithmetic/BigInteger32MultiplicationTest.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@
1515
*
1616
*/
1717

18-
package com.ionspin.kotlin.bignum.integer
18+
package com.ionspin.kotlin.bignum.integer.arithmetic
1919

2020
import com.ionspin.kotlin.bignum.integer.base32.BigInteger32Arithmetic
21-
import com.ionspin.kotlin.bignum.integer.util.runTest
2221
import kotlinx.coroutines.ExperimentalCoroutinesApi
2322
import kotlin.test.Test
2423
import kotlin.test.assertTrue
@@ -34,7 +33,7 @@ class BigInteger32MultiplicationTest {
3433

3534

3635
@Test
37-
fun quick() = runTest {
36+
fun quick() {
3837
assertTrue {
3938
val a = uintArrayOf(10U)
4039
val b = uintArrayOf(20U)
@@ -47,7 +46,7 @@ class BigInteger32MultiplicationTest {
4746

4847

4948
@Test
50-
fun slow() = runTest {
49+
fun slow() {
5150
val a = uintArrayOf(600123930U, 2763064752U, 3767748705U, 2696295277U, 3753527898U, 1143743615U, 4128159603U,
5251
2272083234U, 315684520U, 970147242U, 1329509210U, 3492695163U, 3449361588U, 1278830002U, 3123489057U,
5352
3720277819U, 486484208U, 2780187700U, 1985022034U, 2285210218U, 3740982094U, 727015520U, 634515817U,

bignum/src/iosMain/kotlin/com/ionspin/kotlin/bignum/integer/PlatformBigIntegerArithmetic.kt

Lines changed: 0 additions & 122 deletions
This file was deleted.

bignum/src/iosMain/kotlin/com/ionspin/kotlin/bignum/integer/util/block.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,3 @@
1717

1818
package com.ionspin.kotlin.bignum.integer.util
1919

20-
/**
21-
* Created by Ugljesa Jovanovic
22-
23-
* on 16-Mar-2019
24-
*/
25-
actual fun <T> block(block: suspend () -> T) {
26-
}

bignum/src/iosMain/kotlin/com/ionspin/kotlin/bignum/integer/util/runTest.kt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,3 @@ package com.ionspin.kotlin.bignum.integer.util
1919

2020
import kotlinx.coroutines.runBlocking
2121

22-
/**
23-
* Created by Ugljesa Jovanovic
24-
25-
* on 25-Dec-12/25/18
26-
*/
27-
actual fun <T> runTest(block: suspend () -> T) {
28-
runBlocking { block () }
29-
}

bignum/src/jsMain/kotlin/com/ionspin/kotlin/bignum/integer/util/block.kt

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)