Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix plugin remove issue #923

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ matrix:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+
env: CORDOVA_VERSION="7.1.0" CORDOVA_PLATFORM="android" CORDOVA_PLATFORM_VERSION="7.1.0"
env: CORDOVA_VERSION="7.1.0" CORDOVA_PLATFORM="android" CORDOVA_PLATFORM_VERSION="7.1.1"

- os: linux
sudo: false
Expand All @@ -72,7 +72,7 @@ matrix:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+
env: CORDOVA_VERSION="8.0.0" CORDOVA_PLATFORM="android" CORDOVA_PLATFORM_VERSION="7.1.0"
env: CORDOVA_VERSION="8.0.0" CORDOVA_PLATFORM="android" CORDOVA_PLATFORM_VERSION="7.1.1"

- os: osx
language: objective-c
Expand Down Expand Up @@ -104,5 +104,5 @@ before_install:
- if [[ "$CORDOVA_PLATFORM" == "android" ]]; then yes | sdkmanager "build-tools;26.0.0" "platforms;android-26" ; fi

script:
- bash ./test/test-default.sh $CORDOVA_VERSION $CORDOVA_PLATFORM $CORDOVA_PLATFORM_VERSION
- if [[ "$CORDOVA_PLATFORM" == "android" ]]; then bash ./test/test-with-3-plugins.sh $CORDOVA_VERSION $CORDOVA_PLATFORM $CORDOVA_PLATFORM_VERSION cordova-plugin-request-location-accuracy cordova-android-play-services-gradle-release cordova-android-firebase-gradle-release; fi
- bash ./test/test-default.sh ~$CORDOVA_VERSION $CORDOVA_PLATFORM ~$CORDOVA_PLATFORM_VERSION
- if [[ "$CORDOVA_PLATFORM" == "android" ]]; then bash ./test/test-with-3-plugins.sh ~$CORDOVA_VERSION $CORDOVA_PLATFORM ~$CORDOVA_PLATFORM_VERSION cordova-plugin-request-location-accuracy cordova-android-play-services-gradle-release cordova-android-firebase-gradle-release; fi
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
"test:android": "npm run test:[email protected]:[email protected] && npm run test:[email protected]:[email protected] && npm run test:[email protected]:[email protected]",
"test:browser": "npm run test:[email protected]:[email protected] && npm run test:[email protected]:[email protected] && npm run test:[email protected]:[email protected]",
"test:ios": "npm run test:[email protected]:[email protected] && npm run test:[email protected]:[email protected] && npm run test:[email protected]:[email protected]",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh 6.5.0 ios 4.5.4",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh 7.1.0 ios 4.5.4",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh 8.0.0 ios 4.5.4",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh 6.5.0 android 6.4.0 && bash ./test/test-with-3-plugins.sh 6.5.0 android 6.4.0 cordova-plugin-request-location-accuracy cordova-android-play-services-gradle-release cordova-android-firebase-gradle-release",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh 7.1.0 android 7.1.0 && bash ./test/test-with-3-plugins.sh 7.1.0 android 7.1.0 cordova-plugin-request-location-accuracy cordova-android-play-services-gradle-release cordova-android-firebase-gradle-release",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh 8.0.0 android 7.1.0 && bash ./test/test-with-3-plugins.sh 8.0.0 android 7.1.0 cordova-plugin-request-location-accuracy cordova-android-play-services-gradle-release cordova-android-firebase-gradle-release",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh 6.5.0 browser 5.0.3",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh 7.1.0 browser 5.0.3",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh 8.0.0 browser 5.0.3"
"test:[email protected]:[email protected]": "bash ./test/test-default.sh ~6.5.0 ios ~4.5.4",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh ~7.1.0 ios ~4.5.4",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh ~8.0.0 ios ~4.5.4",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh ~6.5.0 android ~6.4.0 && bash ./test/test-with-3-plugins.sh ~6.5.0 android ~6.4.0 cordova-plugin-request-location-accuracy cordova-android-play-services-gradle-release cordova-android-firebase-gradle-release",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh ~7.1.0 android ~7.1.0 && bash ./test/test-with-3-plugins.sh ~7.1.0 android ~7.1.0 cordova-plugin-request-location-accuracy cordova-android-play-services-gradle-release cordova-android-firebase-gradle-release",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh ~8.0.0 android ~7.1.0 && bash ./test/test-with-3-plugins.sh ~8.0.0 android ~7.1.0 cordova-plugin-request-location-accuracy cordova-android-play-services-gradle-release cordova-android-firebase-gradle-release",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh ~6.5.0 browser ~5.0.3",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh ~7.1.0 browser ~5.0.3",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh ~8.0.0 browser ~5.0.3"
},
"dependencies": {}
}
19 changes: 10 additions & 9 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-firebase" version="2.0.5"
xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android">
xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<name>Google Firebase Plugin</name>

<license>MIT</license>
Expand All @@ -17,16 +17,16 @@ xmlns:android="http://schemas.android.com/apk/res/android">
<js-module name="FirebasePlugin" src="www/firebase.js">
<clobbers target="FirebasePlugin" />
</js-module>
<config-file parent="/*" target="res/xml/config.xml">
<config-file target="config.xml" parent="/*">
<feature name="FirebasePlugin">
<param name="android-package" value="org.apache.cordova.firebase.FirebasePlugin" />
<param name="onload" value="true" />
</feature>
</config-file>
<config-file target="AndroidManifest.xml" parent="/*">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementService" />
Expand All @@ -44,15 +44,16 @@ xmlns:android="http://schemas.android.com/apk/res/android">
</service>
<receiver android:name="org.apache.cordova.firebase.OnNotificationOpenReceiver"></receiver>
</config-file>
<resource-file src="src/android/google-services.json" target="."/>

<resource-file src="src/android/cordova-plugin-firebase-strings.xml" target="res/values/cordova-plugin-firebase-strings.xml" />
<resource-file src="src/android/colors.xml" target="res/values/colors.xml" />

<source-file src="src/android/FirebasePlugin.java" target-dir="src/org/apache/cordova/firebase" />
<source-file src="src/android/OnNotificationOpenReceiver.java" target-dir="src/org/apache/cordova/firebase" />
<source-file src="src/android/FirebasePluginInstanceIDService.java" target-dir="src/org/apache/cordova/firebase" />
<source-file src="src/android/FirebasePluginMessagingService.java" target-dir="src/org/apache/cordova/firebase" />
<source-file src="src/android/FirebasePluginMessageReceiver.java" target-dir="src/org/apache/cordova/firebase" />
<source-file src="src/android/FirebasePluginMessageReceiverManager.java" target-dir="src/org/apache/cordova/firebase" />
<source-file src="src/android/colors.xml" target-dir="res/values" />

<framework src="src/android/build.gradle" custom="true" type="gradleReference" />
<framework src="com.google.android.gms:play-services-tagmanager:+" />
Expand All @@ -76,7 +77,7 @@ xmlns:android="http://schemas.android.com/apk/res/android">
</feature>
</config-file>
<config-file parent="aps-environment" target="*/Entitlements-Debug.plist">
<string>development</string>
<string>development</string>
</config-file>
<config-file parent="aps-environment" target="*/Entitlements-Release.plist">
<string>production</string>
Expand Down
Empty file removed src/android/build-extras.gradle
Empty file.
File renamed without changes.
7 changes: 4 additions & 3 deletions test/platform-add.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ PLATFORM_VERSION=$3
FOLDER=".build-$PLATFORM"
rm -rf $FOLDER

npm install "cordova@$CORDOVA_VERSION" --no-save
./node_modules/.bin/cordova create $FOLDER com.github.cordova_plugin_firebase HelloWorld
npm install -g "cordova@$CORDOVA_VERSION"
cordova create $FOLDER com.github.cordova_plugin_firebase HelloWorld
cp ./test/google-services.json $FOLDER

cd $FOLDER

../node_modules/.bin/cordova platform add "$PLATFORM@$PLATFORM_VERSION"
cordova platform add "$PLATFORM@$PLATFORM_VERSION"
2 changes: 1 addition & 1 deletion test/platform-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ PLATFORM_VERSION=$3
FOLDER=".build-$PLATFORM"
cd $FOLDER

../node_modules/.bin/cordova build $PLATFORM
cordova build $PLATFORM
8 changes: 4 additions & 4 deletions test/plugin-add.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PLUGIN=$4
FOLDER=".build-$PLATFORM"
cd $FOLDER

CORDOVA_MAJOR_VERSION=$(echo $CORDOVA_VERSION | cut -c 1-1)
CORDOVA_MAJOR_VERSION=`echo "$CORDOVA_VERSION" | sed -E "s/\~?\^?([[:digit:]]).*/\1/"`

if [[ "$CORDOVA_MAJOR_VERSION" == "6" ]]; then
FETCH_COMMAND="--fetch"
Expand All @@ -19,9 +19,9 @@ else
fi

if [[ "$PLUGIN" == "cordova-android-play-services-gradle-release" ]]; then
../node_modules/.bin/cordova plugin add $PLUGIN --variable PLAY_SERVICES_VERSION=+ $FETCH_COMMAND --save
cordova plugin add $PLUGIN --variable PLAY_SERVICES_VERSION=+ $FETCH_COMMAND --save
elif [[ "$PLUGIN" == "cordova-android-firebase-gradle-release" ]]; then
../node_modules/.bin/cordova plugin add $PLUGIN --variable FIREBASE_VERSION=+ $FETCH_COMMAND --save
cordova plugin add $PLUGIN --variable FIREBASE_VERSION=+ $FETCH_COMMAND --save
else
../node_modules/.bin/cordova plugin add $PLUGIN $FETCH_COMMAND
cordova plugin add $PLUGIN $FETCH_COMMAND
fi