apply plugin: 'java-library' apply plugin: 'org.jetbrains.kotlin.jvm' apply plugin: 'kotlin' group = 'host.exp.exponent' version = '1.1.1' def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle") if (expoModulesCorePlugin.exists()) { apply from: expoModulesCorePlugin applyKotlinExpoModulesCorePlugin() } buildscript { // Simple helper that allows the root project to override versions declared by this library. ext.safeExtGet = { prop, fallback -> rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback } // Ensures backward compatibility ext.getKotlinVersion = { if (ext.has("kotlinVersion")) { ext.kotlinVersion() } else { ext.safeExtGet("kotlinVersion", "1.6.10") } } repositories { mavenCentral() } dependencies { classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}") } } def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION if (agpVersion.tokenize('.')[0].toInteger() < 8) { java { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } } dependencies { implementation project(':expo-modules-core$android-annotation') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}" implementation "com.google.devtools.ksp:symbol-processing-api:${kspVersion()}" implementation 'com.squareup:kotlinpoet:1.12.0' implementation 'com.squareup:kotlinpoet-ksp:1.12.0' }