diff --git a/.dockerignore b/.dockerignore --- a/.dockerignore +++ b/.dockerignore @@ -17,7 +17,6 @@ !native/.flowconfig !native/ios/Podfile !native/cpp/CommonCpp/grpc -!native/expo-modules/android-lifecycle/package.json !native/expo-modules/comm-expo-package/package.json !native/expo-modules/thumbhash/package.json diff --git a/keyserver/Dockerfile b/keyserver/Dockerfile --- a/keyserver/Dockerfile +++ b/keyserver/Dockerfile @@ -122,8 +122,6 @@ keyserver/addons/rust-node-addon/install_ci_deps.sh \ keyserver/addons/rust-node-addon/postinstall.sh \ keyserver/addons/rust-node-addon/ -COPY --chown=comm native/expo-modules/android-lifecycle/package.json \ - native/expo-modules/android-lifecycle/ COPY --chown=comm native/expo-modules/comm-expo-package/package.json \ native/expo-modules/comm-expo-package/ COPY --chown=comm native/expo-modules/thumbhash/package.json \ diff --git a/native/expo-modules/android-lifecycle/android/build.gradle b/native/expo-modules/android-lifecycle/android/build.gradle deleted file mode 100644 --- a/native/expo-modules/android-lifecycle/android/build.gradle +++ /dev/null @@ -1,96 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'maven-publish' - -group = 'app.comm.android.lifecycle' -version = '0.0.1' - -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.6.10") - } - } - - repositories { - mavenCentral() - } - - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}") - } -} - -// Creating sources with comments -task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs -} - -afterEvaluate { - publishing { - publications { - release(MavenPublication) { - from components.release - // Add additional sourcesJar to artifacts - artifact(androidSourcesJar) - } - } - 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 - } - - defaultConfig { - minSdkVersion safeExtGet("minSdkVersion", 21) - targetSdkVersion safeExtGet("targetSdkVersion", 33) - versionCode 1 - versionName "0.1.0" - } - lintOptions { - abortOnError false - } -} - -repositories { - mavenCentral() -} - -dependencies { - implementation project(':expo-modules-core') - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}" - - implementation "androidx.lifecycle:lifecycle-runtime:2.5.1" - implementation "androidx.lifecycle:lifecycle-process:2.5.1" - - implementation 'com.facebook.react:react-native:+' -} diff --git a/native/expo-modules/android-lifecycle/android/src/main/AndroidManifest.xml b/native/expo-modules/android-lifecycle/android/src/main/AndroidManifest.xml deleted file mode 100644 --- a/native/expo-modules/android-lifecycle/android/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/native/expo-modules/android-lifecycle/expo-module.config.json b/native/expo-modules/android-lifecycle/expo-module.config.json deleted file mode 100644 --- a/native/expo-modules/android-lifecycle/expo-module.config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "platforms": ["android"], - "android": { - "modules": ["app.comm.android.lifecycle.AndroidLifecycleModule"] - } -} diff --git a/native/expo-modules/android-lifecycle/package.json b/native/expo-modules/android-lifecycle/package.json deleted file mode 100644 --- a/native/expo-modules/android-lifecycle/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "@commapp/android-lifecycle", - "version": "0.0.1", - "private": true, - "license": "BSD-3-Clause", - "dependencies": {}, - "devDependencies": { - "expo-module-scripts": "^3.0.3", - "expo-modules-core": "1.1.1" - }, - "peerDependencies": { - "expo": "*", - "react": "*", - "react-native": "*" - } -} diff --git a/native/expo-modules/comm-expo-package/android/build.gradle b/native/expo-modules/comm-expo-package/android/build.gradle --- a/native/expo-modules/comm-expo-package/android/build.gradle +++ b/native/expo-modules/comm-expo-package/android/build.gradle @@ -89,4 +89,8 @@ implementation project(':expo-modules-core') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}" implementation 'com.facebook.react:react-native:+' + + // dependencies of AndroidLifecycleModule + implementation "androidx.lifecycle:lifecycle-runtime:2.5.1" + implementation "androidx.lifecycle:lifecycle-process:2.5.1" } diff --git a/native/expo-modules/android-lifecycle/android/src/main/java/app/comm/android/lifecycle/AndroidLifecycleModule.kt b/native/expo-modules/comm-expo-package/android/src/main/java/app/comm/android/lifecycle/AndroidLifecycleModule.kt rename from native/expo-modules/android-lifecycle/android/src/main/java/app/comm/android/lifecycle/AndroidLifecycleModule.kt rename to native/expo-modules/comm-expo-package/android/src/main/java/app/comm/android/lifecycle/AndroidLifecycleModule.kt diff --git a/native/expo-modules/comm-expo-package/expo-module.config.json b/native/expo-modules/comm-expo-package/expo-module.config.json --- a/native/expo-modules/comm-expo-package/expo-module.config.json +++ b/native/expo-modules/comm-expo-package/expo-module.config.json @@ -6,6 +6,7 @@ "android": { "modules": [ "app.comm.android.aescrypto.AESCryptoModule", + "app.comm.android.lifecycle.AndroidLifecycleModule", "app.comm.android.expo.HelloWorldModule" ] } diff --git a/native/package.json b/native/package.json --- a/native/package.json +++ b/native/package.json @@ -49,7 +49,6 @@ "remotedev": "git+https://git@github.com/zalmoxisus/remotedev.git" }, "dependencies": { - "@commapp/android-lifecycle": "0.0.1", "@commapp/expo-package": "0.0.1", "@commapp/sqlcipher-amalgamation": "^4.4.3-a", "@commapp/thumbhash": "0.0.1", diff --git a/package.json b/package.json --- a/package.json +++ b/package.json @@ -9,7 +9,6 @@ "landing", "desktop", "keyserver/addons/rust-node-addon", - "native/expo-modules/android-lifecycle", "native/expo-modules/comm-expo-package", "native/expo-modules/thumbhash", "services/electron-update-server",