1apply plugin: 'java-library' 2apply plugin: 'org.jetbrains.kotlin.jvm' 3apply plugin: 'kotlin' 4 5group = 'host.exp.exponent' 6version = '1.1.1' 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.6.10") 26 } 27 } 28 29 repositories { 30 mavenCentral() 31 } 32 33 dependencies { 34 classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}") 35 } 36} 37 38java { 39 sourceCompatibility = JavaVersion.VERSION_1_8 40 targetCompatibility = JavaVersion.VERSION_1_8 41} 42 43dependencies { 44 implementation project(':expo-modules-core$android-annotation') 45 implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}" 46 47 implementation "com.google.devtools.ksp:symbol-processing-api:${kspVersion()}" 48 49 implementation 'com.squareup:kotlinpoet:1.12.0' 50 implementation 'com.squareup:kotlinpoet-ksp:1.12.0' 51} 52