mirror of
https://github.com/plebbit/seedit.git
synced 2025-12-23 22:17:55 -05:00
fix: revert Google Services to working config and remove hardcoded Java path
This commit is contained in:
@@ -56,24 +56,14 @@ dependencies {
|
||||
|
||||
apply from: 'capacitor.build.gradle'
|
||||
|
||||
// Google Services plugin - only apply if file exists and has content
|
||||
// This is wrapped in multiple safety checks to prevent CI failures
|
||||
try {
|
||||
def servicesJSON = file('google-services.json')
|
||||
if (servicesJSON != null && servicesJSON.exists() && servicesJSON.length() > 0) {
|
||||
try {
|
||||
// Additional safety check - ensure the plugin is available in classpath
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
println("✓ Google Services plugin applied successfully")
|
||||
} catch (Exception pluginError) {
|
||||
println("⚠ Google Services plugin not available or failed to apply: ${pluginError.message}")
|
||||
println(" This is not a critical error - the app will build without push notifications")
|
||||
}
|
||||
if (servicesJSON.exists() && servicesJSON.text) {
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
logger.info("google-services.json found, applying Google Services plugin")
|
||||
} else {
|
||||
println("ℹ google-services.json not found - building without Google Services")
|
||||
println(" Push notifications will not be available, but this is not an error")
|
||||
logger.info("google-services.json not found or empty, Google Services plugin not applied. Push Notifications won't work")
|
||||
}
|
||||
} catch(Exception e) {
|
||||
println("ℹ Google Services check failed: ${e.message}")
|
||||
println(" Continuing build without Google Services - this is not a critical error")
|
||||
logger.info("Error checking google-services.json: ${e.message}. Google Services plugin not applied")
|
||||
}
|
||||
|
||||
@@ -26,6 +26,3 @@ android.defaults.buildfeatures.buildconfig=true
|
||||
android.nonTransitiveRClass=false
|
||||
android.nonFinalResIds=false
|
||||
android.suppressUnsupportedCompileSdk=35
|
||||
|
||||
# Force Gradle to use Java 17 for all operations
|
||||
org.gradle.java.home=/opt/homebrew/Cellar/openjdk@17/17.0.16/libexec/openjdk.jdk/Contents/Home
|
||||
|
||||
Reference in New Issue
Block a user