refactor(android,ios): rename package com.timesafari to org.timesafari.dailynotification
- Android: move plugin source to org/timesafari/dailynotification, update namespace, manifest package, and all package/imports; change intent actions to org.timesafari.daily.NOTIFICATION and DISMISS - iOS: update bundle IDs, BGTask identifiers, subsystem labels, and queue names in Plugin and Xcode projects - Capacitor: update plugin class registration and appIds in configs - Test apps (android-test-app, daily-notification-test, ios-test-app): applicationId/bundleId, manifests, ProGuard, scripts, and docs - Docs: bulk update references; add CONSUMING_APP_MIGRATION_COM_TO_ORG.md for consuming app migration BREAKING CHANGE: Consuming apps must update plugin class to org.timesafari.dailynotification.DailyNotificationPlugin, manifest receivers/actions, and iOS BGTask identifiers per migration doc.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
namespace "com.timesafari.dailynotification.test"
|
||||
namespace "org.timesafari.dailynotification.test"
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
defaultConfig {
|
||||
applicationId "com.timesafari.dailynotification.test"
|
||||
applicationId "org.timesafari.dailynotification.test"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 1
|
||||
|
||||
@@ -32,58 +32,58 @@
|
||||
}
|
||||
|
||||
# Keep DailyNotification plugin classes
|
||||
-keep class com.timesafari.dailynotification.** { *; }
|
||||
-keep class org.timesafari.dailynotification.** { *; }
|
||||
|
||||
# Keep plugin method names and signatures
|
||||
-keepclassmembers class com.timesafari.dailynotification.DailyNotificationPlugin {
|
||||
-keepclassmembers class org.timesafari.dailynotification.DailyNotificationPlugin {
|
||||
public *;
|
||||
}
|
||||
|
||||
# Keep all plugin manager classes
|
||||
-keep class com.timesafari.dailynotification.*Manager { *; }
|
||||
-keep class com.timesafari.dailynotification.*Storage { *; }
|
||||
-keep class com.timesafari.dailynotification.*Receiver { *; }
|
||||
-keep class org.timesafari.dailynotification.*Manager { *; }
|
||||
-keep class org.timesafari.dailynotification.*Storage { *; }
|
||||
-keep class org.timesafari.dailynotification.*Receiver { *; }
|
||||
|
||||
# Keep Room database classes
|
||||
-keep class com.timesafari.dailynotification.storage.** { *; }
|
||||
-keep class com.timesafari.dailynotification.database.** { *; }
|
||||
-keep class org.timesafari.dailynotification.storage.** { *; }
|
||||
-keep class org.timesafari.dailynotification.database.** { *; }
|
||||
|
||||
# Keep error handling classes
|
||||
-keep class com.timesafari.dailynotification.*Error* { *; }
|
||||
-keep class com.timesafari.dailynotification.*Exception* { *; }
|
||||
-keep class org.timesafari.dailynotification.*Error* { *; }
|
||||
-keep class org.timesafari.dailynotification.*Exception* { *; }
|
||||
|
||||
# Keep JWT and ETag managers
|
||||
-keep class com.timesafari.dailynotification.*JWT* { *; }
|
||||
-keep class com.timesafari.dailynotification.*ETag* { *; }
|
||||
-keep class org.timesafari.dailynotification.*JWT* { *; }
|
||||
-keep class org.timesafari.dailynotification.*ETag* { *; }
|
||||
|
||||
# Keep performance and optimization classes
|
||||
-keep class com.timesafari.dailynotification.*Performance* { *; }
|
||||
-keep class com.timesafari.dailynotification.*Optimizer* { *; }
|
||||
-keep class org.timesafari.dailynotification.*Performance* { *; }
|
||||
-keep class org.timesafari.dailynotification.*Optimizer* { *; }
|
||||
|
||||
# Keep rolling window and TTL classes
|
||||
-keep class com.timesafari.dailynotification.*Rolling* { *; }
|
||||
-keep class com.timesafari.dailynotification.*TTL* { *; }
|
||||
-keep class org.timesafari.dailynotification.*Rolling* { *; }
|
||||
-keep class org.timesafari.dailynotification.*TTL* { *; }
|
||||
|
||||
# Keep exact alarm and reboot recovery classes
|
||||
-keep class com.timesafari.dailynotification.*Exact* { *; }
|
||||
-keep class com.timesafari.dailynotification.*Reboot* { *; }
|
||||
-keep class com.timesafari.dailynotification.*Recovery* { *; }
|
||||
-keep class org.timesafari.dailynotification.*Exact* { *; }
|
||||
-keep class org.timesafari.dailynotification.*Reboot* { *; }
|
||||
-keep class org.timesafari.dailynotification.*Recovery* { *; }
|
||||
|
||||
# Keep enhanced fetcher classes
|
||||
-keep class com.timesafari.dailynotification.*Enhanced* { *; }
|
||||
-keep class com.timesafari.dailynotification.*Fetcher* { *; }
|
||||
-keep class org.timesafari.dailynotification.*Enhanced* { *; }
|
||||
-keep class org.timesafari.dailynotification.*Fetcher* { *; }
|
||||
|
||||
# Keep migration classes
|
||||
-keep class com.timesafari.dailynotification.*Migration* { *; }
|
||||
-keep class org.timesafari.dailynotification.*Migration* { *; }
|
||||
|
||||
# Keep channel manager
|
||||
-keep class com.timesafari.dailynotification.ChannelManager { *; }
|
||||
-keep class org.timesafari.dailynotification.ChannelManager { *; }
|
||||
|
||||
# Keep permission manager
|
||||
-keep class com.timesafari.dailynotification.PermissionManager { *; }
|
||||
-keep class org.timesafari.dailynotification.PermissionManager { *; }
|
||||
|
||||
# Keep scheduler classes
|
||||
-keep class com.timesafari.dailynotification.*Scheduler* { *; }
|
||||
-keep class org.timesafari.dailynotification.*Scheduler* { *; }
|
||||
|
||||
# =============================================================================
|
||||
# Android System Classes
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.getcapacitor.myapp;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
|
||||
@Test
|
||||
public void useAppContext() throws Exception {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
|
||||
assertEquals("com.getcapacitor.app", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.timesafari.dailynotification;
|
||||
package org.timesafari.dailynotification;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
@@ -28,23 +28,23 @@
|
||||
|
||||
<!-- DailyNotification Plugin Components -->
|
||||
<receiver
|
||||
android:name="com.timesafari.dailynotification.DailyNotificationReceiver"
|
||||
android:name="org.timesafari.dailynotification.DailyNotificationReceiver"
|
||||
android:enabled="true"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="com.timesafari.daily.NOTIFICATION" />
|
||||
<action android:name="org.timesafari.daily.NOTIFICATION" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<!-- NotifyReceiver for AlarmManager-based notifications -->
|
||||
<receiver
|
||||
android:name="com.timesafari.dailynotification.NotifyReceiver"
|
||||
android:name="org.timesafari.dailynotification.NotifyReceiver"
|
||||
android:enabled="true"
|
||||
android:exported="false">
|
||||
</receiver>
|
||||
|
||||
<receiver
|
||||
android:name="com.timesafari.dailynotification.BootReceiver"
|
||||
android:name="org.timesafari.dailynotification.BootReceiver"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:directBootAware="true">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.timesafari.dailynotification.test;
|
||||
package org.timesafari.dailynotification.test;
|
||||
|
||||
import com.getcapacitor.BridgeActivity;
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
package com.timesafari.dailynotification.test;
|
||||
package org.timesafari.dailynotification.test;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import com.timesafari.dailynotification.DailyNotificationPlugin;
|
||||
import com.timesafari.dailynotification.NativeNotificationContentFetcher;
|
||||
import org.timesafari.dailynotification.DailyNotificationPlugin;
|
||||
import org.timesafari.dailynotification.NativeNotificationContentFetcher;
|
||||
|
||||
/**
|
||||
* Application class that registers native fetcher for testing
|
||||
@@ -32,7 +32,7 @@ public class TestApplication extends Application {
|
||||
// Register test native fetcher with application context
|
||||
Context context = getApplicationContext();
|
||||
NativeNotificationContentFetcher testFetcher =
|
||||
new com.timesafari.dailynotification.test.TestNativeFetcher(context);
|
||||
new org.timesafari.dailynotification.test.TestNativeFetcher(context);
|
||||
DailyNotificationPlugin.setNativeFetcher(testFetcher);
|
||||
|
||||
Log.i(TAG, "Test native fetcher registered: " + testFetcher.getClass().getName());
|
||||
@@ -8,15 +8,15 @@
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
package com.timesafari.dailynotification.test;
|
||||
package org.timesafari.dailynotification.test;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Log;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.timesafari.dailynotification.FetchContext;
|
||||
import com.timesafari.dailynotification.NativeNotificationContentFetcher;
|
||||
import com.timesafari.dailynotification.NotificationContent;
|
||||
import org.timesafari.dailynotification.FetchContext;
|
||||
import org.timesafari.dailynotification.NativeNotificationContentFetcher;
|
||||
import org.timesafari.dailynotification.NotificationContent;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonArray;
|
||||
@@ -2,6 +2,6 @@
|
||||
<resources>
|
||||
<string name="app_name">Daily Notification Test</string>
|
||||
<string name="title_activity_main">Daily Notification Test</string>
|
||||
<string name="package_name">com.timesafari.dailynotification.test</string>
|
||||
<string name="custom_url_scheme">com.timesafari.dailynotification.test</string>
|
||||
<string name="package_name">org.timesafari.dailynotification.test</string>
|
||||
<string name="custom_url_scheme">org.timesafari.dailynotification.test</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user