Skip to content

Commit

Permalink
refactor: change package name to capacitor.codepush
Browse files Browse the repository at this point in the history
  • Loading branch information
leo6104 committed Feb 11, 2021
1 parent 2b851a1 commit aae470f
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microsoft.cordova.codepush">
package="com.microsoft.capacitor.codepush">
</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.cordova;
package com.microsoft.capacitor;

import android.content.pm.PackageManager;
import android.os.AsyncTask;
Expand Down Expand Up @@ -48,6 +48,7 @@ public class CodePush extends Plugin {

@Override
public void load() {
super.load();
CodePushPreferences codePushPreferences = new CodePushPreferences(getContext());
codePushPackageManager = new CodePushPackageManager(getContext(), codePushPreferences);
codePushReportingManager = new CodePushReportingManager(getActivity(), codePushPreferences);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.cordova;
package com.microsoft.capacitor;

public class CodePushException extends Exception {
public CodePushException() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.cordova;
package com.microsoft.capacitor;

import android.content.Context;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.cordova;
package com.microsoft.capacitor;

import org.json.JSONObject;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.cordova;
package com.microsoft.capacitor;

import android.content.Context;
import android.content.SharedPreferences;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.cordova;
package com.microsoft.capacitor;

import java.util.Locale;
import android.app.Activity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.cordova;
package com.microsoft.capacitor;

/**
* Defines the available InstallModes.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.cordova;
package com.microsoft.capacitor;

/**
* Defines the update installation options.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.cordova;
package com.microsoft.capacitor;

/**
* Defines application statuses we use in reporting events from the native to the JS layer.
Expand All @@ -20,4 +20,4 @@ public enum ReportingStatus {
public int getValue() {
return this.value;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.cordova;
package com.microsoft.capacitor;

import org.json.JSONException;
import org.json.JSONObject;
Expand Down Expand Up @@ -82,4 +82,4 @@ public static StatusReport deserialize(String jsonString) throws JSONException {
JSONObject jsonObject = new JSONObject(jsonString);
return deserialize(jsonObject);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.cordova;
package com.microsoft.capacitor;

import android.app.Activity;
import android.content.res.AssetManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.cordova;
package com.microsoft.capacitor;

import android.content.Context;
import android.content.pm.PackageInfo;
Expand Down
6 changes: 3 additions & 3 deletions test/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface IPlatform {
getPlatformWwwPath(projectDirectory: string): string;

/**
* Gets an optional IEmulatorManager for platforms for which "cordova run --nobuild" rebuilds the application for this platform anyway.
* Gets an optional IEmulatorManager for platforms for which "npx cap run --nobuild" rebuilds the application for this platform anyway.
* IOS needs special handling here, since ios-sim touches the app every time and changes the app timestamp.
* This challenges the tests since we rely on the app timestamp in our logic for finding out if the application was updated through the app store.
*/
Expand Down Expand Up @@ -439,7 +439,7 @@ export class PlatformResolver {
private static supportedPlatforms: IPlatform[] = [Android.getInstance(), IOS.getInstance()];

/**
* Given the cordova name of a platform, this method returns the IPlatform associated with it.
* Given the capacitor name of a platform, this method returns the IPlatform associated with it.
*/
public static resolvePlatforms(cordovaPlatformNames: string[]): IPlatform[] {
var platforms: IPlatform[] = [];
Expand All @@ -458,7 +458,7 @@ export class PlatformResolver {
}

/**
* Given the cordova name of a platform, this method returns the IPlatform associated with it.
* Given the capacitor name of a platform, this method returns the IPlatform associated with it.
*/
public static resolvePlatform(cordovaPlatformName: string): IPlatform {
for (var i = 0; i < this.supportedPlatforms.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion test/projectManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class ProjectManager {
public static DEFAULT_APP_VERSION: string = "Store version";

/**
* Creates a new cordova test application at the specified path, and configures it
* Creates a new capacitor test application at the specified path, and configures it
* with the given server URL, android and ios deployment keys.
*/
public static setupProject(projectDirectory: string,
Expand Down
2 changes: 1 addition & 1 deletion test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var restartEmulators: boolean = testUtil.readRestartEmulators();
const TestAppName = "CodePushTest";
const TestNamespace = "com.microsoft.codepush.test";
const AcquisitionSDKPluginName = "code-push";
const WkWebViewEnginePluginName = "cordova-plugin-wkwebview-engine";
const WkWebViewEnginePluginName = "capacitor-plugin-wkwebview-engine";

const ScenarioCheckForUpdatePath = "js/scenarioCheckForUpdate.js";
const ScenarioCheckForUpdateCustomKey = "js/scenarioCheckForUpdateCustomKey.js";
Expand Down

0 comments on commit aae470f

Please sign in to comment.