Advertisement
Guest User

Untitled

a guest
Mar 19th, 2020
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 5.56 KB | None | 0 0
  1. plugins {
  2.     id 'org.jetbrains.kotlin.multiplatform' version '1.3.61'
  3.     id 'org.jetbrains.kotlin.plugin.serialization' version '1.3.61'
  4. }
  5. repositories {
  6.     google()
  7.     jcenter()
  8.     maven { url "https://kotlin.bintray.com/kotlinx" }
  9.     maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
  10.     maven { url "https://dl.bintray.com/badoo/maven" }
  11.     maven { url "https://dl.bintray.com/icerockdev/moko" }
  12.     mavenCentral()
  13. }
  14.  
  15. apply plugin: 'com.android.application'
  16. apply plugin: 'kotlin-android-extensions'
  17.  
  18. android {
  19.     compileSdkVersion 29
  20.     defaultConfig {
  21.         applicationId 'xx.xxx'
  22.         minSdkVersion 23
  23.         targetSdkVersion 29
  24.         versionCode 1
  25.         versionName '1.0'
  26.         vectorDrawables.useSupportLibrary = true
  27.         multiDexEnabled true
  28.     }
  29.     buildFeatures {
  30.         compose true
  31.     }
  32.     composeOptions {
  33.         kotlinCompilerVersion "1.3.61-dev-withExperimentalGoogleExtensions-20200129"
  34.         kotlinCompilerExtensionVersion "0.1.0-dev07"
  35.     }
  36.     buildTypes {
  37.         debug {
  38.             minifyEnabled false
  39.         }
  40.         release {
  41.             minifyEnabled false
  42.         }
  43.     }
  44.     compileOptions {
  45.         sourceCompatibility JavaVersion.VERSION_1_8
  46.         targetCompatibility JavaVersion.VERSION_1_8
  47.     }
  48.     packagingOptions {
  49.         pickFirst("META-INF/*.kotlin_module")
  50.     }
  51. }
  52.  
  53. dependencies {
  54.     implementation fileTree(dir: 'libs', include: ['*.jar'])
  55. }
  56.  
  57. configurations {
  58.     compileClasspath
  59. }
  60.  
  61. kotlin {
  62.     targets {
  63.         android("android")
  64.  
  65.         final def iOSTarget = System.getenv('SDK_NAME')?.startsWith("iphoneos") \
  66.                           ? presets.iosArm64 : presets.iosX64
  67.         fromPreset(iOSTarget, 'ios') {
  68.             binaries {
  69.                 framework("XXX")
  70.             }
  71.         }
  72.  
  73.     }
  74.     sourceSets {
  75.         commonMain {
  76.             dependencies {
  77.                 implementation "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion"
  78.                 implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
  79.  
  80.                 implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$serializationVersion"
  81.  
  82.                 implementation "com.soywiz.korlibs.klock:klock:$klockVersion"
  83.  
  84.                 implementation "io.ktor:ktor-client-core:$ktorVersion"
  85.                 implementation "io.ktor:ktor-client-serialization:$ktorVersion"
  86.                 implementation "io.ktor:ktor-client-json:$ktorVersion"
  87.                 implementation "io.ktor:ktor-client-logging:$ktorVersion"
  88.  
  89.                 implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
  90.             }
  91.         }
  92.         androidMain {
  93.             dependencies {
  94.                 implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
  95.                 implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
  96.                 implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
  97.  
  98.                 implementation "androidx.multidex:multidex:$multidexVersion"
  99.  
  100.                 implementation "androidx.ui:ui-core:$jetpackComposeVersion"
  101.                 implementation "androidx.ui:ui-framework:$jetpackComposeVersion"
  102.                 implementation "androidx.ui:ui-layout:$jetpackComposeVersion"
  103.                 implementation "androidx.ui:ui-material:$jetpackComposeVersion"
  104.                 implementation "androidx.ui:ui-tooling:$jetpackComposeVersion"
  105.                 implementation "androidx.ui:ui-graphics:$jetpackComposeVersion"
  106.                 implementation "androidx.compose:compose-compiler:$jetpackComposeVersion"
  107.                 implementation "androidx.compose:compose-runtime:$jetpackComposeVersion"
  108.  
  109.                 implementation 'com.google.android.material:material:1.1.0'
  110.                 implementation 'androidx.appcompat:appcompat:1.1.0'
  111.                 implementation 'androidx.core:core-ktx:1.2.0'
  112.  
  113.                 implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  114.                 implementation "androidx.constraintlayout:constraintlayout-solver:2.0.0-beta4"
  115.  
  116.                 implementation 'androidx.navigation:navigation-fragment:2.2.1'
  117.                 implementation 'androidx.navigation:navigation-fragment-ktx:2.2.1'
  118.                 implementation 'androidx.navigation:navigation-ui:2.2.1'
  119.                 implementation 'androidx.navigation:navigation-ui-ktx:2.2.1'
  120.                 implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
  121.  
  122.                 implementation "io.ktor:ktor-client-okhttp:$ktorVersion"
  123.                 implementation "io.ktor:ktor-client-json-jvm:$ktorVersion"
  124.                 implementation "io.ktor:ktor-client-serialization-jvm:$ktorVersion"
  125.                 implementation "io.ktor:ktor-client-logging-jvm:$ktorVersion"
  126.             }
  127.         }
  128.         iosMain {
  129.             dependencies {
  130.                 implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
  131.                 implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:$serializationVersion"
  132.  
  133.                 implementation "io.ktor:ktor-client-ios:$ktorVersion"
  134.                 implementation "io.ktor:ktor-client-json-native:$ktorVersion"
  135.                 implementation "io.ktor:ktor-client-serialization-native:$ktorVersion"
  136.                 implementation "io.ktor:ktor-client-logging-native:$ktorVersion"
  137.             }
  138.         }
  139.  
  140.         }
  141.  
  142.     }
  143.  
  144. }
  145. tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
  146.     kotlinOptions {
  147.         jvmTarget = "1.8"
  148.     }
  149. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement