diff --git a/.travis.yml b/.travis.yml index 44e115c44..399d737bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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 @@ -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 diff --git a/package.json b/package.json index 5ade7135f..70ef4ae72 100644 --- a/package.json +++ b/package.json @@ -35,15 +35,15 @@ "test:android": "npm run test:cordova@6.5.0:android@6.4.0 && npm run test:cordova@7.1.0:android@7.1.0 && npm run test:cordova@8.0.0:android@7.1.0", "test:browser": "npm run test:cordova@6.5.0:browser@5.0.3 && npm run test:cordova@7.1.0:browser@5.0.3 && npm run test:cordova@8.0.0:browser@5.0.3", "test:ios": "npm run test:cordova@6.5.0:ios@4.5.4 && npm run test:cordova@7.1.0:ios@4.5.4 && npm run test:cordova@8.0.0:ios@4.5.4", - "test:cordova@6.5.0:ios@4.5.4": "bash ./test/test-default.sh 6.5.0 ios 4.5.4", - "test:cordova@7.1.0:ios@4.5.4": "bash ./test/test-default.sh 7.1.0 ios 4.5.4", - "test:cordova@8.0.0:ios@4.5.4": "bash ./test/test-default.sh 8.0.0 ios 4.5.4", - "test:cordova@6.5.0:android@6.4.0": "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:cordova@7.1.0:android@7.1.0": "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:cordova@8.0.0:android@7.1.0": "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:cordova@6.5.0:browser@5.0.3": "bash ./test/test-default.sh 6.5.0 browser 5.0.3", - "test:cordova@7.1.0:browser@5.0.3": "bash ./test/test-default.sh 7.1.0 browser 5.0.3", - "test:cordova@8.0.0:browser@5.0.3": "bash ./test/test-default.sh 8.0.0 browser 5.0.3" + "test:cordova@6.5.0:ios@4.5.4": "bash ./test/test-default.sh ~6.5.0 ios ~4.5.4", + "test:cordova@7.1.0:ios@4.5.4": "bash ./test/test-default.sh ~7.1.0 ios ~4.5.4", + "test:cordova@8.0.0:ios@4.5.4": "bash ./test/test-default.sh ~8.0.0 ios ~4.5.4", + "test:cordova@6.5.0:android@6.4.0": "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:cordova@7.1.0:android@7.1.0": "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:cordova@8.0.0:android@7.1.0": "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:cordova@6.5.0:browser@5.0.3": "bash ./test/test-default.sh ~6.5.0 browser ~5.0.3", + "test:cordova@7.1.0:browser@5.0.3": "bash ./test/test-default.sh ~7.1.0 browser ~5.0.3", + "test:cordova@8.0.0:browser@5.0.3": "bash ./test/test-default.sh ~8.0.0 browser ~5.0.3" }, "dependencies": {} } diff --git a/plugin.xml b/plugin.xml index b236828ed..bf2136e93 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,7 +1,7 @@ + xmlns="http://apache.org/cordova/ns/plugins/1.0" + xmlns:android="http://schemas.android.com/apk/res/android"> Google Firebase Plugin MIT @@ -17,16 +17,16 @@ xmlns:android="http://schemas.android.com/apk/res/android"> - + - - - + + + @@ -44,15 +44,16 @@ xmlns:android="http://schemas.android.com/apk/res/android"> - + + + - @@ -76,7 +77,7 @@ xmlns:android="http://schemas.android.com/apk/res/android"> - development + development production diff --git a/src/android/build-extras.gradle b/src/android/build-extras.gradle deleted file mode 100755 index e69de29bb..000000000 diff --git a/src/android/google-services.json b/test/google-services.json similarity index 100% rename from src/android/google-services.json rename to test/google-services.json diff --git a/test/platform-add.sh b/test/platform-add.sh index 1eadf054b..7eb045462 100644 --- a/test/platform-add.sh +++ b/test/platform-add.sh @@ -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" diff --git a/test/platform-build.sh b/test/platform-build.sh index ec336b2be..97be2521b 100644 --- a/test/platform-build.sh +++ b/test/platform-build.sh @@ -9,4 +9,4 @@ PLATFORM_VERSION=$3 FOLDER=".build-$PLATFORM" cd $FOLDER -../node_modules/.bin/cordova build $PLATFORM +cordova build $PLATFORM diff --git a/test/plugin-add.sh b/test/plugin-add.sh index 9681d8b92..ca0451235 100644 --- a/test/plugin-add.sh +++ b/test/plugin-add.sh @@ -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" @@ -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