2019-05-21 18:14:09 +08:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
2021-07-29 19:33:35 +06:00
|
|
|
// jcenter()
|
2019-05-21 18:14:09 +08:00
|
|
|
mavenCentral()
|
2021-01-02 22:43:32 +06:00
|
|
|
google()
|
2019-05-21 18:14:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
2023-06-20 10:12:32 +06:00
|
|
|
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
|
2020-10-08 15:24:34 +06:00
|
|
|
classpath "com.github.breadmoirai:github-release:$github_release_plugin_version"
|
2021-01-02 22:43:32 +06:00
|
|
|
classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:$dexcount_version"
|
2023-04-25 00:15:13 +06:00
|
|
|
classpath "com.android.tools.build:gradle:$android_gradle_version"
|
2019-05-21 18:14:09 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-20 10:13:24 +06:00
|
|
|
plugins {
|
|
|
|
id "org.jetbrains.kotlin.multiplatform" version "$kotlin_version"
|
2023-06-20 10:12:32 +06:00
|
|
|
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version"
|
2020-06-03 20:10:06 +06:00
|
|
|
id "org.jetbrains.dokka" version "$dokka_version"
|
2019-11-20 10:13:24 +06:00
|
|
|
}
|
2021-04-20 17:24:33 +06:00
|
|
|
|
|
|
|
// temporal crutch until legacy tests will be stabled or legacy target will be removed
|
|
|
|
allprojects {
|
|
|
|
if (it != rootProject.findProject("docs")) {
|
|
|
|
tasks.whenTaskAdded { task ->
|
|
|
|
if(task.name == "jsLegacyBrowserTest" || task.name == "jsLegacyNodeTest") {
|
|
|
|
task.enabled = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-02 22:43:32 +06:00
|
|
|
apply plugin: "com.android.library"
|
2019-11-20 10:13:24 +06:00
|
|
|
|
2021-01-02 22:43:32 +06:00
|
|
|
project.version = "$version"
|
2020-11-21 14:58:19 +06:00
|
|
|
project.group = "dev.inmo"
|
2019-11-20 10:13:24 +06:00
|
|
|
|
|
|
|
apply from: "publish.gradle"
|
2020-10-08 15:24:34 +06:00
|
|
|
apply from: "github_release.gradle"
|
2019-05-21 18:14:09 +08:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
2021-07-29 19:35:07 +06:00
|
|
|
// jcenter()
|
2019-05-21 18:14:09 +08:00
|
|
|
mavenCentral()
|
2021-07-29 19:35:07 +06:00
|
|
|
// maven { url "https://kotlin.bintray.com/kotlinx" }
|
2021-01-02 22:43:32 +06:00
|
|
|
google()
|
2019-05-21 18:14:09 +08:00
|
|
|
}
|
|
|
|
|
2020-06-03 20:10:06 +06:00
|
|
|
apply from: './dokka.gradle'
|
|
|
|
|
2019-05-21 18:14:09 +08:00
|
|
|
kotlin {
|
2019-11-20 01:36:10 +06:00
|
|
|
jvm()
|
2021-07-28 14:31:30 +06:00
|
|
|
js(IR) {
|
2020-08-22 21:36:55 +06:00
|
|
|
browser()
|
|
|
|
nodejs()
|
|
|
|
}
|
2021-01-02 22:43:32 +06:00
|
|
|
android {
|
|
|
|
publishAllLibraryVariants()
|
|
|
|
}
|
2023-03-18 12:23:53 +06:00
|
|
|
linuxX64()
|
2023-05-25 20:53:10 +06:00
|
|
|
mingwX64()
|
2023-10-23 01:26:53 +06:00
|
|
|
linuxArm64()
|
2020-08-22 21:36:55 +06:00
|
|
|
|
2019-11-20 10:13:24 +06:00
|
|
|
|
2019-05-21 18:14:09 +08:00
|
|
|
sourceSets {
|
|
|
|
commonMain {
|
|
|
|
dependencies {
|
2019-11-20 10:13:24 +06:00
|
|
|
implementation kotlin('stdlib')
|
2020-08-22 21:36:55 +06:00
|
|
|
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
|
2023-06-20 10:12:32 +06:00
|
|
|
api "org.jetbrains.kotlinx:kotlinx-serialization-core:$kotlin_serialization_version"
|
2019-10-04 23:47:20 +06:00
|
|
|
|
2024-01-12 14:45:14 +06:00
|
|
|
api "com.soywiz.korge:korlibs-time:$klockVersion"
|
2019-05-23 14:42:38 +08:00
|
|
|
}
|
|
|
|
}
|
2021-01-02 22:43:32 +06:00
|
|
|
|
|
|
|
androidMain {
|
|
|
|
dependencies {
|
|
|
|
api "androidx.work:work-runtime-ktx:$androidx_work_version"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-20 10:13:24 +06:00
|
|
|
commonTest {
|
2019-10-05 18:21:00 +00:00
|
|
|
dependencies {
|
2019-11-20 10:13:24 +06:00
|
|
|
implementation kotlin('test-common')
|
|
|
|
implementation kotlin('test-annotations-common')
|
2023-03-18 12:23:53 +06:00
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlin_coroutines_version"
|
2019-11-20 10:13:24 +06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
jvmTest {
|
|
|
|
dependencies {
|
|
|
|
implementation kotlin('test-junit')
|
2019-10-05 18:21:00 +00:00
|
|
|
}
|
|
|
|
}
|
2020-11-21 15:04:34 +06:00
|
|
|
jsTest {
|
2019-11-27 19:06:27 +06:00
|
|
|
dependencies {
|
2020-08-22 21:36:55 +06:00
|
|
|
implementation kotlin('test-js')
|
2019-11-27 19:06:27 +06:00
|
|
|
}
|
|
|
|
}
|
2023-08-09 12:35:13 +06:00
|
|
|
androidUnitTest {
|
2021-01-02 22:43:32 +06:00
|
|
|
dependencies {
|
|
|
|
implementation kotlin('test-junit')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'com.getkeepsafe.dexcount'
|
|
|
|
|
|
|
|
android {
|
2023-05-25 20:53:10 +06:00
|
|
|
compileSdk "$android_compileSdkVersion".toInteger()
|
2023-11-02 23:27:53 +06:00
|
|
|
buildToolsVersion = "$android_buildToolsVersion"
|
2023-05-25 20:53:10 +06:00
|
|
|
namespace "${group}.${project.name}"
|
2021-01-02 22:43:32 +06:00
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
minSdkVersion "$android_minSdkVersion".toInteger()
|
|
|
|
targetSdkVersion "$android_compileSdkVersion".toInteger()
|
|
|
|
versionCode "${android_code_version}".toInteger()
|
|
|
|
versionName "$version"
|
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
}
|
|
|
|
debug {
|
|
|
|
debuggable true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
2023-11-02 23:27:53 +06:00
|
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
|
|
targetCompatibility JavaVersion.VERSION_17
|
2021-01-02 22:43:32 +06:00
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main.java.srcDirs += 'src/main/kotlin'
|
2021-01-02 22:56:35 +06:00
|
|
|
test {
|
|
|
|
java.srcDir file("src/jvmTest")
|
|
|
|
}
|
2019-05-21 18:14:09 +08:00
|
|
|
}
|
|
|
|
}
|
2021-09-23 13:18:40 +06:00
|
|
|
|
|
|
|
java {
|
2023-11-02 23:27:53 +06:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
2021-09-23 13:18:40 +06:00
|
|
|
}
|