1apply plugin: 'com.android.library'
2apply plugin: 'kotlin-android'
3apply plugin: 'maven-publish'
4
5group = 'host.exp.exponent'
6version = '1.3.0'
7
8buildscript {
9  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
10  if (expoModulesCorePlugin.exists()) {
11    apply from: expoModulesCorePlugin
12    applyKotlinExpoModulesCorePlugin()
13  }
14
15  // Simple helper that allows the root project to override versions declared by this library.
16  ext.safeExtGet = { prop, fallback ->
17    rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
18  }
19
20  // Ensures backward compatibility
21  ext.getKotlinVersion = {
22    if (ext.has("kotlinVersion")) {
23      ext.kotlinVersion()
24    } else {
25      ext.safeExtGet("kotlinVersion", "1.8.10")
26    }
27  }
28
29  repositories {
30    mavenCentral()
31  }
32
33  dependencies {
34    classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
35  }
36}
37
38afterEvaluate {
39  publishing {
40    publications {
41      release(MavenPublication) {
42        from components.release
43      }
44    }
45    repositories {
46      maven {
47        url = mavenLocal().url
48      }
49    }
50  }
51}
52
53android {
54  compileSdkVersion safeExtGet("compileSdkVersion", 33)
55
56  compileOptions {
57    sourceCompatibility JavaVersion.VERSION_11
58    targetCompatibility JavaVersion.VERSION_11
59  }
60
61  kotlinOptions {
62    jvmTarget = JavaVersion.VERSION_11.majorVersion
63  }
64
65  namespace "expo.interfaces.devmenu"
66  defaultConfig {
67    minSdkVersion safeExtGet("minSdkVersion", 21)
68    targetSdkVersion safeExtGet("targetSdkVersion", 33)
69    versionCode 6
70    versionName '1.3.0'
71  }
72  lintOptions {
73    abortOnError false
74  }
75  publishing {
76    singleVariant("release") {
77      withSourcesJar()
78    }
79  }
80}
81
82dependencies {
83  //noinspection GradleDynamicVersion
84  implementation 'com.facebook.react:react-native:+'
85
86  implementation 'com.squareup.okhttp3:okhttp:3.14.9'
87
88  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
89  implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3"
90}
91