From 614a5a318302dbb2cabaf55570caa71d907d6a49 Mon Sep 17 00:00:00 2001 From: Tomek Zawadzki Date: Thu, 30 Jul 2026 08:50:06 +0200 Subject: [PATCH] Fix Android app --- modules/bottom-sheet/android/build.gradle | 37 +------- .../android/build.gradle | 82 +----------------- .../android/build.gradle | 84 +----------------- .../android/build.gradle | 36 +------- .../android/build.gradle | 27 +----- .../expo-emoji-picker/android/build.gradle | 43 ++-------- .../android/build.gradle | 85 +------------------ 7 files changed, 32 insertions(+), 362 deletions(-) diff --git a/modules/bottom-sheet/android/build.gradle b/modules/bottom-sheet/android/build.gradle index c4c051b70f..e7f85daea1 100644 --- a/modules/bottom-sheet/android/build.gradle +++ b/modules/bottom-sheet/android/build.gradle @@ -1,49 +1,20 @@ -apply plugin: 'com.android.library' +plugins { + id 'com.android.library' + id 'expo-module-gradle-plugin' +} group = 'expo.modules.bottomsheet' version = '0.1.0' -def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle") -apply from: expoModulesCorePlugin -applyKotlinExpoModulesCorePlugin() -useCoreDependencies() -useExpoPublishing() - -// If you want to use the managed Android SDK versions from expo-modules-core, set this to true. -// The Android SDK versions will be bumped from time to time in SDK releases and may introduce breaking changes in your module code. -// Most of the time, you may like to manage the Android SDK versions yourself. -def useManagedAndroidSdkVersions = false -if (useManagedAndroidSdkVersions) { - useDefaultAndroidSdkVersions() -} else { - 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 - } - } - project.android { - compileSdkVersion safeExtGet("compileSdkVersion", 34) - defaultConfig { - minSdkVersion safeExtGet("minSdkVersion", 21) - targetSdkVersion safeExtGet("targetSdkVersion", 34) - } - } -} - android { namespace "expo.modules.bottomsheet" defaultConfig { versionCode 1 versionName "0.1.0" } - lintOptions { - abortOnError false - } } dependencies { - implementation project(':expo-modules-core') implementation 'com.google.android.material:material:1.13.0' implementation "com.facebook.react:react-native:+" } diff --git a/modules/expo-background-notification-handler/android/build.gradle b/modules/expo-background-notification-handler/android/build.gradle index e18eee9343..28ce5df56d 100644 --- a/modules/expo-background-notification-handler/android/build.gradle +++ b/modules/expo-background-notification-handler/android/build.gradle @@ -1,93 +1,19 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'maven-publish' +plugins { + id 'com.android.library' + id 'expo-module-gradle-plugin' +} group = 'expo.modules.backgroundnotificationhandler' version = '0.5.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) - - def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION - if (agpVersion.tokenize('.')[0].toInteger() < 8) { - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.majorVersion - } - } - namespace "expo.modules.backgroundnotificationhandler" defaultConfig { - minSdkVersion safeExtGet("minSdkVersion", 21) - targetSdkVersion safeExtGet("targetSdkVersion", 34) versionCode 1 versionName "0.5.0" } - lintOptions { - abortOnError false - } - publishing { - singleVariant("release") { - withSourcesJar() - } - } -} - -repositories { - mavenCentral() } dependencies { - implementation project(':expo-modules-core') - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}" implementation 'com.google.firebase:firebase-messaging-ktx:24.0.0' } diff --git a/modules/expo-bluesky-gif-view/android/build.gradle b/modules/expo-bluesky-gif-view/android/build.gradle index bbd8013433..19a400cb03 100644 --- a/modules/expo-bluesky-gif-view/android/build.gradle +++ b/modules/expo-bluesky-gif-view/android/build.gradle @@ -1,97 +1,21 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'maven-publish' +plugins { + id 'com.android.library' + id 'expo-module-gradle-plugin' +} group = 'expo.modules.blueskygifview' version = '0.5.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) - - def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION - if (agpVersion.tokenize('.')[0].toInteger() < 8) { - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.majorVersion - } - } - namespace "expo.modules.blueskygifview" defaultConfig { - minSdkVersion safeExtGet("minSdkVersion", 21) - targetSdkVersion safeExtGet("targetSdkVersion", 34) versionCode 1 versionName "0.5.0" } - lintOptions { - abortOnError false - } - publishing { - singleVariant("release") { - withSourcesJar() - } - } -} - -repositories { - mavenCentral() } dependencies { implementation 'androidx.appcompat:appcompat:1.6.1' - def GLIDE_VERSION = "4.16.0" - - implementation project(':expo-modules-core') - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}" // Keep glide version up to date with expo-image so that we don't have duplicate deps implementation 'com.github.bumptech.glide:glide:4.13.2' diff --git a/modules/expo-bluesky-swiss-army/android/build.gradle b/modules/expo-bluesky-swiss-army/android/build.gradle index b031cde57e..52d416efe3 100644 --- a/modules/expo-bluesky-swiss-army/android/build.gradle +++ b/modules/expo-bluesky-swiss-army/android/build.gradle @@ -1,45 +1,17 @@ -apply plugin: 'com.android.library' +plugins { + id 'com.android.library' + id 'expo-module-gradle-plugin' +} group = 'expo.modules.blueskyswissarmy' version = '0.6.0' -def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle") -apply from: expoModulesCorePlugin -applyKotlinExpoModulesCorePlugin() -useCoreDependencies() -useExpoPublishing() - -// If you want to use the managed Android SDK versions from expo-modules-core, set this to true. -// The Android SDK versions will be bumped from time to time in SDK releases and may introduce breaking changes in your module code. -// Most of the time, you may like to manage the Android SDK versions yourself. -def useManagedAndroidSdkVersions = false -if (useManagedAndroidSdkVersions) { - useDefaultAndroidSdkVersions() -} else { - 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 - } - } - project.android { - compileSdkVersion safeExtGet("compileSdkVersion", 34) - defaultConfig { - minSdkVersion safeExtGet("minSdkVersion", 21) - targetSdkVersion safeExtGet("targetSdkVersion", 34) - } - } -} - android { namespace "expo.modules.blueskyswissarmy" defaultConfig { versionCode 1 versionName "0.6.0" } - lintOptions { - abortOnError false - } } dependencies { diff --git a/modules/expo-bluesky-video-compress/android/build.gradle b/modules/expo-bluesky-video-compress/android/build.gradle index be96c40154..b1b719263b 100644 --- a/modules/expo-bluesky-video-compress/android/build.gradle +++ b/modules/expo-bluesky-video-compress/android/build.gradle @@ -1,34 +1,15 @@ -apply plugin: 'com.android.library' +plugins { + id 'com.android.library' + id 'expo-module-gradle-plugin' +} group = 'expo.modules.blueskyvideocompress' version = '1.0.0' -def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle") -apply from: expoModulesCorePlugin -applyKotlinExpoModulesCorePlugin() -useCoreDependencies() -useExpoPublishing() - -buildscript { - ext.safeExtGet = { prop, fallback -> - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback - } -} - android { - compileSdkVersion safeExtGet("compileSdkVersion", 34) - namespace "expo.modules.blueskyvideocompress" defaultConfig { - minSdkVersion safeExtGet("minSdkVersion", 21) - targetSdkVersion safeExtGet("targetSdkVersion", 34) versionCode 1 versionName "1.0.0" } - lintOptions { - abortOnError false - } -} - -dependencies { } diff --git a/modules/expo-emoji-picker/android/build.gradle b/modules/expo-emoji-picker/android/build.gradle index d34288dc79..538f6f5e35 100644 --- a/modules/expo-emoji-picker/android/build.gradle +++ b/modules/expo-emoji-picker/android/build.gradle @@ -1,46 +1,19 @@ -apply plugin: 'com.android.library' +plugins { + id 'com.android.library' + id 'expo-module-gradle-plugin' +} group = 'expo.community.modules.emojipicker' version = '0.1.0' -def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle") -apply from: expoModulesCorePlugin -applyKotlinExpoModulesCorePlugin() -useCoreDependencies() -useExpoPublishing() - -// If you want to use the managed Android SDK versions from expo-modules-core, set this to true. -// The Android SDK versions will be bumped from time to time in SDK releases and may introduce breaking changes in your module code. -// Most of the time, you may like to manage the Android SDK versions yourself. -def useManagedAndroidSdkVersions = false -if (useManagedAndroidSdkVersions) { - useDefaultAndroidSdkVersions() -} else { - 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 - } - } - project.android { - compileSdkVersion safeExtGet("compileSdkVersion", 34) - defaultConfig { - minSdkVersion safeExtGet("minSdkVersion", 21) - targetSdkVersion safeExtGet("targetSdkVersion", 34) - } - } -} - android { namespace "expo.community.modules.emojipicker" defaultConfig { versionCode 1 versionName "0.1.0" } - lintOptions { - abortOnError false - } - dependencies { - implementation "androidx.emoji2:emoji2-emojipicker:1.5.0" - } +} + +dependencies { + implementation "androidx.emoji2:emoji2-emojipicker:1.5.0" } diff --git a/modules/expo-receive-android-intents/android/build.gradle b/modules/expo-receive-android-intents/android/build.gradle index 3712dda40f..634872574d 100644 --- a/modules/expo-receive-android-intents/android/build.gradle +++ b/modules/expo-receive-android-intents/android/build.gradle @@ -1,92 +1,15 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'maven-publish' +plugins { + id 'com.android.library' + id 'expo-module-gradle-plugin' +} group = 'xyz.blueskyweb.app.exporeceiveandroidintents' version = '0.4.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.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) - - def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION - if (agpVersion.tokenize('.')[0].toInteger() < 8) { - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.majorVersion - } - } - namespace "xyz.blueskyweb.app.exporeceiveandroidintents" defaultConfig { - minSdkVersion safeExtGet("minSdkVersion", 21) - targetSdkVersion safeExtGet("targetSdkVersion", 34) versionCode 1 versionName "0.4.1" } - lintOptions { - abortOnError false - } - publishing { - singleVariant("release") { - withSourcesJar() - } - } -} - -repositories { - mavenCentral() -} - -dependencies { - implementation project(':expo-modules-core') - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}" }