Guest User

common build.gradle.kts

a guest
Nov 29th, 2021
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 1.62 KB | None | 0 0
  1. import org.jetbrains.compose.compose
  2.  
  3. plugins {
  4.     kotlin("multiplatform")
  5.     id("org.jetbrains.compose") version "1.0.0-beta5"
  6.     id("com.android.library")
  7. }
  8.  
  9. group = "matei.trandafir"
  10. version = "1.0"
  11.  
  12. kotlin {
  13.     android()
  14.     jvm("desktop") {
  15.         compilations.all {
  16.             kotlinOptions.jvmTarget = "11"
  17.         }
  18.     }
  19.     js(IR) {
  20.         browser()
  21.         useCommonJs()
  22.     }
  23.     sourceSets {
  24.         val commonMain by getting {
  25.             dependencies {
  26.                 api(compose.runtime)
  27.                 api(compose.foundation)
  28.                 api(compose.material)
  29.             }
  30.         }
  31.         val commonTest by getting {
  32.             dependencies {
  33.                 implementation(kotlin("test"))
  34.             }
  35.         }
  36.         val androidMain by getting {
  37.             dependencies {
  38.                 api("androidx.appcompat:appcompat:1.4.0")
  39.                 api("androidx.core:core-ktx:1.7.0")
  40.             }
  41.         }
  42.         val androidTest by getting {
  43.             dependencies {
  44.                 implementation("junit:junit:4.13")
  45.             }
  46.         }
  47.         val desktopMain by getting {
  48.             dependencies {
  49.                 api(compose.preview)
  50.             }
  51.         }
  52.         val desktopTest by getting
  53.     }
  54. }
  55.  
  56. android {
  57.     compileSdkVersion(31)
  58.     sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
  59.     defaultConfig {
  60.         minSdkVersion(24)
  61.         targetSdkVersion(31)
  62.     }
  63.     compileOptions {
  64.         sourceCompatibility = JavaVersion.VERSION_1_8
  65.         targetCompatibility = JavaVersion.VERSION_1_8
  66.     }
  67. }
  68.  
Add Comment
Please, Sign In to add comment