Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ android {

dependencies {
embed project(':common')
embed project(':common-jvm')
embed project(':common-android')
embed project(':core')
embed project(':event-bridge')
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ buildscript {
}


allprojects{
allprojects {
repositories {
google()
mavenCentral()
Expand All @@ -33,7 +33,7 @@ allprojects{
}
}

apply plugin: "org.jlleitschuh.gradle.ktlint"
//apply plugin: "org.jlleitschuh.gradle.ktlint"
apply plugin: 'org.jetbrains.dokka'

group GROUP
Expand Down
20 changes: 0 additions & 20 deletions common-jvm/build.gradle

This file was deleted.

13 changes: 0 additions & 13 deletions common/build.gradle

This file was deleted.

35 changes: 35 additions & 0 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
plugins {
kotlin("multiplatform")
}

kotlin {
jvmToolchain(8)
jvm {
withJava()
testRuns.named("test") {
executionTask.configure {
useJUnitPlatform()
}
}
}

sourceSets {
val commonMain by getting {
dependencies {
implementation(kotlin("stdlib-common"))
}
}
val jvmMain by getting {
dependencies {
implementation(kotlin("stdlib"))
}
}
val jvmTest by getting {
dependencies {
implementation(kotlin("test"))
implementation("org.junit.jupiter:junit-jupiter")
implementation("io.mockk:mockk:1.12.3")
}
}
}
}
43 changes: 0 additions & 43 deletions core/build.gradle

This file was deleted.

50 changes: 50 additions & 0 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
plugins {
kotlin("multiplatform")
}

group = "com.amplitude"

repositories {
mavenCentral()
}

kotlin {
jvmToolchain(8)
jvm {
withJava()
testRuns.named("test") {
executionTask.configure {
useJUnitPlatform()
}
}
}

sourceSets {
val commonMain by getting {
dependencies {
api(project(":common"))
api(project(":event-bridge"))
api(project(":id"))

implementation("org.json:json:20211205")
implementation("org.jetbrains.kotlin:kotlin-stdlib")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2")
}
}

val jvmTest by getting {
dependencies {
implementation("io.mockk:mockk:1.12.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4")

implementation(platform("org.junit:junit-bom:5.7.2"))
implementation("org.junit.jupiter:junit-jupiter")
implementation("com.squareup.okhttp3:mockwebserver:4.10.0")
}
}
}
}

tasks.dokkaHtmlPartial.configure {
failOnWarning.set(true)
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ open class Configuration @JvmOverloads constructor(
}

private fun isMinIdLengthValid(): Boolean {
return minIdLength ?. let {
return minIdLength?.let {
it > 0
} ?: let {
true
}
}

internal fun getApiHost(): String {
fun getApiHost(): String {
return this.serverUrl ?: with(this) {
when {
serverZone == ServerZone.EU && useBatch -> Constants.EU_BATCH_API_HOST
Expand Down
17 changes: 0 additions & 17 deletions event-bridge/build.gradle

This file was deleted.

30 changes: 30 additions & 0 deletions event-bridge/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
plugins {
kotlin("multiplatform")
}

kotlin {
jvmToolchain(8)
jvm {
withJava()
testRuns.named("test") {
executionTask.configure {
useJUnitPlatform()
}
}
}

sourceSets {
val jvmMain by getting {
dependencies {
implementation(project(":common"))
implementation(kotlin("stdlib"))
}
}
val jvmTest by getting {
dependencies {
implementation(kotlin("test"))
implementation("org.junit.jupiter:junit-jupiter")
}
}
}
}
21 changes: 0 additions & 21 deletions id/build.gradle

This file was deleted.

31 changes: 31 additions & 0 deletions id/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
plugins {
kotlin("multiplatform")
}

kotlin {
jvmToolchain(8)
jvm {
withJava()
testRuns.named("test") {
executionTask.configure {
useJUnitPlatform()
}
}
}

sourceSets {
val jvmMain by getting {
dependencies {
implementation(project(":common"))
implementation(kotlin("stdlib"))
}
}
val jvmTest by getting {
dependencies {
implementation(kotlin("test"))
implementation("org.junit.jupiter:junit-jupiter")
implementation("io.mockk:mockk:1.12.3")
}
}
}
}
2 changes: 0 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
rootProject.name = 'kotlin-sdk'
include 'common'
project(':common').projectDir = file('common')
include 'common-jvm'
project(':common-jvm').projectDir = file('common-jvm')
include 'common-android'
project(':common-android').projectDir = file('common-android')
include 'core'
Expand Down