diff --git a/modules/expo-selectable-text/android/build.gradle b/modules/expo-selectable-text/android/build.gradle deleted file mode 100644 index 9e85c5c2d8..0000000000 --- a/modules/expo-selectable-text/android/build.gradle +++ /dev/null @@ -1,89 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'maven-publish' - -group = 'expo.modules.selectabletext' -version = '0.2.0' - -buildscript { - def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle") - if (expoModulesCorePlugin.exists()) { - apply from: expoModulesCorePlugin - applyKotlinExpoModulesCorePlugin() - } - - // 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.8.10") - } - } - - repositories { - mavenCentral() - } - - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}") - } -} - -afterEvaluate { - publishing { - publications { - release(MavenPublication) { - from components.release - } - } - repositories { - maven { - url = mavenLocal().url - } - } - } -} - -android { - compileSdkVersion safeExtGet("compileSdkVersion", 33) - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.majorVersion - } - - namespace "expo.modules.selectabletext" - defaultConfig { - minSdkVersion safeExtGet("minSdkVersion", 21) - targetSdkVersion safeExtGet("targetSdkVersion", 33) - versionCode 1 - versionName "0.2.0" - } - lintOptions { - abortOnError false - } - publishing { - singleVariant("release") { - withSourcesJar() - } - } -} - -repositories { - mavenCentral() -} - -dependencies { - implementation project(':expo-modules-core') - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}" -} diff --git a/modules/expo-selectable-text/android/src/main/AndroidManifest.xml b/modules/expo-selectable-text/android/src/main/AndroidManifest.xml deleted file mode 100644 index bdae66c8f5..0000000000 --- a/modules/expo-selectable-text/android/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/modules/expo-selectable-text/android/src/main/java/expo/modules/selectabletext/ExpoSelectableTextModule.kt b/modules/expo-selectable-text/android/src/main/java/expo/modules/selectabletext/ExpoSelectableTextModule.kt deleted file mode 100644 index 37f5f89e9a..0000000000 --- a/modules/expo-selectable-text/android/src/main/java/expo/modules/selectabletext/ExpoSelectableTextModule.kt +++ /dev/null @@ -1,47 +0,0 @@ -package expo.modules.selectabletext - -import expo.modules.kotlin.modules.Module -import expo.modules.kotlin.modules.ModuleDefinition - -class ExpoSelectableTextModule : Module() { - // Each module class must implement the definition function. The definition consists of components - // that describes the module's functionality and behavior. - // See https://docs.expo.dev/modules/module-api for more details about available components. - override fun definition() = ModuleDefinition { - // Sets the name of the module that JavaScript code will use to refer to the module. Takes a string as an argument. - // Can be inferred from module's class name, but it's recommended to set it explicitly for clarity. - // The module will be accessible from `requireNativeModule('ExpoSelectableText')` in JavaScript. - Name("ExpoSelectableText") - - // Sets constant properties on the module. Can take a dictionary or a closure that returns a dictionary. - Constants( - "PI" to Math.PI - ) - - // Defines event names that the module can send to JavaScript. - Events("onChange") - - // Defines a JavaScript synchronous function that runs the native code on the JavaScript thread. - Function("hello") { - "Hello world! 👋" - } - - // Defines a JavaScript function that always returns a Promise and whose native code - // is by default dispatched on the different thread than the JavaScript runtime runs on. - AsyncFunction("setValueAsync") { value: String -> - // Send an event to JavaScript. - sendEvent("onChange", mapOf( - "value" to value - )) - } - - // Enables the module to be used as a native view. Definition components that are accepted as part of - // the view definition: Prop, Events. - View(ExpoSelectableTextView::class) { - // Defines a setter for the `name` prop. - Prop("name") { view: ExpoSelectableTextView, prop: String -> - println(prop) - } - } - } -} diff --git a/modules/expo-selectable-text/android/src/main/java/expo/modules/selectabletext/ExpoSelectableTextView.kt b/modules/expo-selectable-text/android/src/main/java/expo/modules/selectabletext/ExpoSelectableTextView.kt deleted file mode 100644 index 5a13932613..0000000000 --- a/modules/expo-selectable-text/android/src/main/java/expo/modules/selectabletext/ExpoSelectableTextView.kt +++ /dev/null @@ -1,7 +0,0 @@ -package expo.modules.selectabletext - -import android.content.Context -import expo.modules.kotlin.AppContext -import expo.modules.kotlin.views.ExpoView - -class ExpoSelectableTextView(context: Context, appContext: AppContext) : ExpoView(context, appContext) diff --git a/modules/expo-selectable-text/src/ExpoSelectableText.web.tsx b/modules/expo-selectable-text/src/ExpoSelectableText.web.tsx deleted file mode 100644 index 698399cc65..0000000000 --- a/modules/expo-selectable-text/src/ExpoSelectableText.web.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import * as React from 'react' - -import {ExpoProTextViewProps} from './ExpoSelectableText.types' - -export default function ExpoProTextView(props: ExpoProTextViewProps) { - return ( -
- {props.name} -
- ) -} diff --git a/modules/expo-selectable-text/src/ExpoSelectableTextModule.ts b/modules/expo-selectable-text/src/ExpoSelectableTextModule.ts index 541b6700a5..2123654f6c 100644 --- a/modules/expo-selectable-text/src/ExpoSelectableTextModule.ts +++ b/modules/expo-selectable-text/src/ExpoSelectableTextModule.ts @@ -1,5 +1,5 @@ -import { requireNativeModule } from 'expo-modules-core'; +import {requireNativeModule} from 'expo-modules-core' // It loads the native module object from the JSI or falls back to // the bridge module (from NativeModulesProxy) if the remote debugger is on. -export default requireNativeModule('ExpoProText'); +export default requireNativeModule('ExpoProText') diff --git a/modules/expo-selectable-text/src/ExpoSelectableTextModule.web.ts b/modules/expo-selectable-text/src/ExpoSelectableTextModule.web.ts deleted file mode 100644 index be76495bbf..0000000000 --- a/modules/expo-selectable-text/src/ExpoSelectableTextModule.web.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { EventEmitter } from 'expo-modules-core'; - -const emitter = new EventEmitter({} as any); - -export default { - PI: Math.PI, - async setValueAsync(value: string): Promise { - emitter.emit('onChange', { value }); - }, - hello() { - return 'Hello world! 👋'; - }, -}; diff --git a/modules/expo-selectable-text/src/ExpoSelectableTextView.tsx b/modules/expo-selectable-text/src/ExpoSelectableTextView.tsx index d5a7a3c414..5c273782d5 100644 --- a/modules/expo-selectable-text/src/ExpoSelectableTextView.tsx +++ b/modules/expo-selectable-text/src/ExpoSelectableTextView.tsx @@ -8,7 +8,7 @@ import { ExpoProTextSegment, ExpoProTextViewProps, } from './ExpoSelectableText.types' -import {StyleSheet, Text, View} from 'react-native' +import {Text, View} from 'react-native' const NativeView: React.ComponentType = requireNativeViewManager('ExpoSelectableText')