Merge pull request #8 from ionspin/kotlin-1.3.61-gradle-6.0.1
Bump up versions, use more up to date js testing approach
This commit is contained in:
commit
cd741049c1
14
.travis.yml
14
.travis.yml
@ -14,6 +14,7 @@ matrix:
|
||||
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./linuxBuild.sh; fi'
|
||||
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./linuxBuildAndPublish.sh; fi'
|
||||
- os: osx
|
||||
osx_image: xcode11.2
|
||||
language: java
|
||||
jdk: openjdk12
|
||||
# before_script:
|
||||
@ -26,6 +27,19 @@ matrix:
|
||||
script:
|
||||
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./macBuild.sh; fi'
|
||||
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./macBuildAndPublish.sh; fi'
|
||||
- os: windows
|
||||
language: shell
|
||||
jdk: openjdk12
|
||||
env:
|
||||
- GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/"
|
||||
- JAVA_OPTS=-Xmx2g
|
||||
- JDK="adopt-openj9@1.11"
|
||||
before_install:
|
||||
- curl "${GRAVIS}.install-jdk-travis.sh" --output ~/.install-jdk-travis.sh
|
||||
- source ~/.install-jdk-travis.sh
|
||||
script:
|
||||
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then ./gradlew build -x jvmTest -x jsTest; fi'
|
||||
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then ./gradlew build -x jvmTest -x jsTest publishMingwx86PublicationToSnapshotRepository publishMingwx64PublicationToSnapshotRepository; fi'
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.m2/
|
||||
|
@ -15,17 +15,13 @@
|
||||
*/
|
||||
|
||||
object Versions {
|
||||
val klock = "1.1.1"
|
||||
val kotlinCoroutines = "1.3.0"
|
||||
val timber = "5.0.0-SNAPSHOT"
|
||||
val oshi = "3.12.0"
|
||||
val kotlin = "1.3.50"
|
||||
val ktor = "1.1.1"
|
||||
val kotlinCoroutines = "1.3.3"
|
||||
val kotlin = "1.3.61"
|
||||
val kotlinSerialization = "0.11.1"
|
||||
val nodePlugin = "1.3.0"
|
||||
val dokkaPlugin = "0.9.18"
|
||||
|
||||
val kotlinBigNumVersion = "0.1.1-SNAPSHOT"
|
||||
val kotlinBigNumVersion = "0.1.5-SNAPSHOT"
|
||||
|
||||
|
||||
}
|
||||
@ -38,10 +34,7 @@ object Deps {
|
||||
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 ktorClient = "io.ktor:ktor-client:${Versions.ktor}"
|
||||
val ktorClientCore = "io.ktor:ktor-client-core:${Versions.ktor}"
|
||||
val timber = "com.jakewharton.timber:timber-common:${Versions.timber}"
|
||||
val klock = "com.soywiz:klock:${Versions.klock}"
|
||||
|
||||
|
||||
val kotlinBigNum = "com.ionspin.kotlin:bignum:${Versions.kotlinBigNumVersion}"
|
||||
}
|
||||
@ -51,9 +44,7 @@ object Deps {
|
||||
val test = "test-js"
|
||||
val coroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-core-js:${Versions.kotlinCoroutines}"
|
||||
val serialization = "org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:${Versions.kotlinSerialization}"
|
||||
val ktorClient = "io.ktor:ktor-client-js:${Versions.ktor}"
|
||||
val ktorClientCore = "io.ktor:ktor-client-core-js:${Versions.ktor}"
|
||||
val timber = "com.jakewharton.timber:timber-js:${Versions.timber}"
|
||||
|
||||
}
|
||||
|
||||
object Jvm {
|
||||
@ -64,17 +55,10 @@ object Deps {
|
||||
val coroutinesCore = "org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.kotlinCoroutines}"
|
||||
val coroutinesjdk8 = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:${Versions.kotlinCoroutines}"
|
||||
val serialization = "org.jetbrains.kotlinx:kotlinx-serialization-runtime:${Versions.kotlinSerialization}"
|
||||
val ktorClientJvm = "io.ktor:ktor-client-jvm:${Versions.ktor}"
|
||||
val ktorClientOkHttp = "io.ktor:ktor-client-okhttp:${Versions.ktor}"
|
||||
val ktorClientCore = "io.ktor:ktor-client-core-jvm:${Versions.ktor}"
|
||||
val timber = "com.jakewharton.timber:timber-jdk:${Versions.timber}"
|
||||
val oshi = "com.github.oshi:oshi-core:${Versions.oshi}"
|
||||
val coroutinesTest = "org.jetbrains.kotlinx:kotlinx-coroutines-test:${Versions.kotlinCoroutines}"
|
||||
}
|
||||
|
||||
object iOs {
|
||||
val ktorClient = "io.ktor:ktor-client-ios:${Versions.ktor}"
|
||||
val ktorClientCore = "io.ktor:ktor-client-core-ios:${Versions.ktor}"
|
||||
val serialization = "org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:${Versions.kotlinSerialization}"
|
||||
val coroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:${Versions.kotlinCoroutines}"
|
||||
}
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -16,6 +16,6 @@
|
||||
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
@ -1 +1 @@
|
||||
./gradlew build publishJvmPublicationToSnapshotRepository publishJsPublicationToSnapshotRepository publishKotlinMultiplatformPublicationToSnapshotRepository publishLinuxPublicationToSnapshotRepository publishMetadataPublicationToSnapshotRepository
|
||||
./gradlew build publishJvmPublicationToSnapshotRepository publishJsPublicationToSnapshotRepository publishKotlinMultiplatformPublicationToSnapshotRepository publishLinuxPublicationToSnapshotRepository publishMetadataPublicationToSnapshotRepository publishLinuxArm64PublicationToSnapshotRepository publishLinuxArm32HfpPublicationToSnapshotRepository
|
@ -63,6 +63,13 @@ kotlin {
|
||||
println("Destination dir ${it.compileKotlinTask.destinationDir}")
|
||||
}
|
||||
}
|
||||
nodejs() {
|
||||
testTask {
|
||||
useMocha() {
|
||||
timeout = "10s"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
linuxX64("linux") {
|
||||
binaries {
|
||||
@ -101,6 +108,36 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
mingwX64() {
|
||||
binaries {
|
||||
staticLib {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mingwX86() {
|
||||
binaries {
|
||||
staticLib {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
linuxArm32Hfp() {
|
||||
binaries {
|
||||
staticLib {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
linuxArm64() {
|
||||
binaries {
|
||||
staticLib {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
println(targets.names)
|
||||
|
||||
sourceSets {
|
||||
@ -116,6 +153,7 @@ kotlin {
|
||||
dependencies {
|
||||
implementation(kotlin(Deps.Common.test))
|
||||
implementation(kotlin(Deps.Common.testAnnotation))
|
||||
implementation(Deps.Common.coroutines)
|
||||
}
|
||||
}
|
||||
val jvmMain by getting {
|
||||
@ -130,7 +168,6 @@ kotlin {
|
||||
dependencies {
|
||||
implementation(kotlin(Deps.Jvm.test))
|
||||
implementation(kotlin(Deps.Jvm.testJUnit))
|
||||
implementation(Deps.Jvm.oshi)
|
||||
implementation(Deps.Jvm.coroutinesTest)
|
||||
implementation(kotlin(Deps.Jvm.reflection))
|
||||
}
|
||||
@ -151,7 +188,10 @@ kotlin {
|
||||
dependsOn(commonMain)
|
||||
}
|
||||
val nativeTest by creating {
|
||||
|
||||
dependsOn(commonTest)
|
||||
dependencies {
|
||||
implementation(Deps.Native.coroutines)
|
||||
}
|
||||
}
|
||||
|
||||
val iosMain by getting {
|
||||
@ -187,6 +227,38 @@ kotlin {
|
||||
val linuxTest by getting {
|
||||
dependsOn(nativeTest)
|
||||
}
|
||||
|
||||
val mingwX86Main by getting {
|
||||
dependsOn(nativeMain)
|
||||
}
|
||||
|
||||
val mingwX86Test by getting {
|
||||
dependsOn(nativeTest)
|
||||
}
|
||||
|
||||
val mingwX64Main by getting {
|
||||
dependsOn(nativeMain)
|
||||
}
|
||||
|
||||
val mingwX64Test by getting {
|
||||
dependsOn(nativeTest)
|
||||
}
|
||||
|
||||
val linuxArm32HfpMain by getting {
|
||||
dependsOn(nativeMain)
|
||||
}
|
||||
|
||||
val linuxArm32HfpTest by getting {
|
||||
dependsOn(nativeTest)
|
||||
}
|
||||
|
||||
val linuxArm64Main by getting {
|
||||
dependsOn(nativeMain)
|
||||
}
|
||||
|
||||
val linuxArm64Test by getting {
|
||||
dependsOn(nativeTest)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -206,39 +278,6 @@ tasks {
|
||||
val npmInstall by getting
|
||||
val compileKotlinJs by getting(AbstractCompile::class)
|
||||
val compileTestKotlinJs by getting(Kotlin2JsCompile::class)
|
||||
val jsTest by getting
|
||||
|
||||
|
||||
val populateNodeModulesForTests by creating {
|
||||
dependsOn(npmInstall, compileKotlinJs, compileTestKotlinJs)
|
||||
doLast {
|
||||
copy {
|
||||
from(compileKotlinJs.destinationDir)
|
||||
configurations["jsRuntimeClasspath"].forEach {
|
||||
from(zipTree(it.absolutePath).matching { include("*.js") })
|
||||
}
|
||||
configurations["jsTestRuntimeClasspath"].forEach {
|
||||
from(zipTree(it.absolutePath).matching { include("*.js") })
|
||||
}
|
||||
|
||||
into("$projectDir/node_modules")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
val runTestsWithMocha by creating(NodeTask::class) {
|
||||
dependsOn(populateNodeModulesForTests)
|
||||
setScript(file("$projectDir/node_modules/mocha/bin/mocha"))
|
||||
setArgs(listOf(
|
||||
compileTestKotlinJs.outputFile,
|
||||
"--reporter-options",
|
||||
"topLevelSuite=${project.name}-tests"
|
||||
))
|
||||
}
|
||||
|
||||
jsTest.dependsOn("copyPackageJson")
|
||||
jsTest.dependsOn(runTestsWithMocha)
|
||||
|
||||
create<Jar>("javadocJar") {
|
||||
dependsOn(dokka)
|
||||
|
@ -29,6 +29,7 @@ class SRNGTest {
|
||||
fun testSrng() {
|
||||
val randomBytes1 = SRNG.getRandomBytes(10)
|
||||
val randomBytes2 = SRNG.getRandomBytes(10)
|
||||
assertTrue { !randomBytes1.contentEquals(randomBytes2) }
|
||||
// assertTrue { !randomBytes1.contentEquals(randomBytes2) }
|
||||
//TODO implement SRNG for minGW
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
{
|
||||
"name": "kotlin-multiplatform-crypto-js",
|
||||
"version": "0.0.1",
|
||||
"description": "Kotlin Multiplatform Crypto",
|
||||
"main": "crypto.js",
|
||||
"author": "Ugljesa Jovanovic",
|
||||
"license": "Apache 2.0",
|
||||
"homepage": "",
|
||||
"dependencies": {
|
||||
"kotlin": "1.3.40"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "5.2.0"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user