Migrate away from multi-platform project structure

This commit is contained in:
Michael Bull 2018-09-19 00:05:03 +01:00
parent 88f496a366
commit f10de37b08
7 changed files with 26 additions and 66 deletions

View File

@ -122,7 +122,6 @@ Improvements on the existing solutions include:
- Feature parity with Result types from other languages including Elm, Haskell, - Feature parity with Result types from other languages including Elm, Haskell,
& Rust & Rust
- [Multiplatform][multiplatform] project support
- Lax constraints on `value`/`error` nullability - Lax constraints on `value`/`error` nullability
- Lax constraints on the `error` type's inheritance (does not inherit from - Lax constraints on the `error` type's inheritance (does not inherit from
`Exception`) `Exception`)
@ -208,7 +207,6 @@ This project is available under the terms of the ISC license. See the
[swalschin-rop]: https://fsharpforfunandprofit.com/rop/ [swalschin-rop]: https://fsharpforfunandprofit.com/rop/
[wiki]: https://github.com/michaelbull/kotlin-result/wiki [wiki]: https://github.com/michaelbull/kotlin-result/wiki
[unit-tests]: https://github.com/michaelbull/kotlin-result/tree/master/src/test/kotlin/com/github/michaelbull/result [unit-tests]: https://github.com/michaelbull/kotlin-result/tree/master/src/test/kotlin/com/github/michaelbull/result
[multiplatform]: https://kotlinlang.org/docs/reference/multiplatform.html
[example]: https://github.com/michaelbull/kotlin-result/tree/master/example/src/main/kotlin/com/github/michaelbull/result/example [example]: https://github.com/michaelbull/kotlin-result/tree/master/example/src/main/kotlin/com/github/michaelbull/result/example
[swalschin-example]: https://github.com/swlaschin/Railway-Oriented-Programming-Example [swalschin-example]: https://github.com/swlaschin/Railway-Oriented-Programming-Example
[ktor]: http://ktor.io/ [ktor]: http://ktor.io/

View File

@ -6,19 +6,18 @@ buildscript {
dependencies { dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion"
} }
} }
plugins { plugins {
id 'com.github.ben-manes.versions' version '0.20.0' id 'com.github.ben-manes.versions' version '0.20.0'
id 'net.researchgate.release' version '2.7.0'
id 'com.jfrog.bintray' version '1.8.4' id 'com.jfrog.bintray' version '1.8.4'
id 'net.researchgate.release' version '2.7.0'
id 'org.jetbrains.dokka' version '0.9.17'
} }
apply plugin: 'kotlin-platform-common' apply plugin: 'kotlin'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'org.jetbrains.dokka'
description = 'A Result monad for modelling success or failure operations.' description = 'A Result monad for modelling success or failure operations.'
@ -27,9 +26,21 @@ repositories {
} }
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
testImplementation "junit:junit:$junitVersion"
testImplementation "org.jetbrains.kotlin:kotlin-test-common:$kotlinVersion" testImplementation "org.jetbrains.kotlin:kotlin-test-common:$kotlinVersion"
testImplementation "org.jetbrains.kotlin:kotlin-test-annotations-common:$kotlinVersion" testImplementation "org.jetbrains.kotlin:kotlin-test-annotations-common:$kotlinVersion"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion"
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlinVersion"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
} }
dokka { dokka {
@ -56,6 +67,7 @@ task sourcesJar(type: Jar) {
publishing { publishing {
publications { publications {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {
from components.java
artifact javadocJar artifact javadocJar
artifact sourcesJar artifact sourcesJar
} }

View File

@ -5,17 +5,17 @@ mainClassName = 'io.ktor.server.netty.DevelopmentEngine'
repositories { repositories {
mavenCentral() mavenCentral()
maven { url "http://dl.bintray.com/kotlin/ktor" } maven { url = "http://dl.bintray.com/kotlin/ktor" }
maven { url "https://dl.bintray.com/kotlin/kotlinx" } maven { url = "https://dl.bintray.com/kotlin/kotlinx" }
} }
dependencies { dependencies {
compile project(":jvm") implementation project(":")
compile "ch.qos.logback:logback-classic:$logbackVersion" implementation "ch.qos.logback:logback-classic:$logbackVersion"
compile "io.ktor:ktor-server-core:$ktorVersion" implementation "io.ktor:ktor-server-core:$ktorVersion"
compile "io.ktor:ktor-server-netty:$ktorVersion" implementation "io.ktor:ktor-server-netty:$ktorVersion"
compile "io.ktor:ktor-gson:$ktorVersion" implementation "io.ktor:ktor-gson:$ktorVersion"
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
} }
compileKotlin { compileKotlin {

View File

@ -1,7 +1,5 @@
group=com.michael-bull.kotlin-result group=com.michael-bull.kotlin-result
version=1.0.9-SNAPSHOT version=1.0.9-SNAPSHOT
dokkaVersion=0.9.17
hamkrestVersion=1.6.0.0
junitVersion=4.12 junitVersion=4.12
kotlinVersion=1.2.70 kotlinVersion=1.2.70

View File

@ -1,12 +0,0 @@
apply plugin: 'kotlin-platform-js'
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlinVersion"
expectedBy project(":")
testImplementation "org.jetbrains.kotlin:kotlin-test-js:$kotlinVersion"
}

View File

@ -1,36 +0,0 @@
apply plugin: 'kotlin-platform-jvm'
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
expectedBy project(":")
testImplementation "junit:junit:$junitVersion"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion"
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlinVersion"
}
compileKotlin {
kotlinOptions {
freeCompilerArgs = [ "-Xjsr305=strict" ]
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = [ "-Xjsr305=strict" ]
jvmTarget = "1.8"
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}

View File

@ -1,5 +1,5 @@
rootProject.name = 'kotlin-result' rootProject.name = 'kotlin-result'
include 'example', 'js', 'jvm' include 'example'
enableFeaturePreview('STABLE_PUBLISHING') enableFeaturePreview('STABLE_PUBLISHING')