Skip to content

Commit

Permalink
Merge pull request #911 from j3k0/v9
Browse files Browse the repository at this point in the history
Version 9.0.0
  • Loading branch information
j3k0 authored Sep 17, 2019
2 parents d2a2f5f + 77c0246 commit ca020da
Show file tree
Hide file tree
Showing 44 changed files with 2,842 additions and 3,034 deletions.
26 changes: 26 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# Matches multiple files with brace expansion notation
# Set default charset
[*.{js,m,h,java}]
charset = utf-8
indent_style = space
indent_size = 4

# Tab indentation (no size specified)
[Makefile]
indent_style = tab

[*.{json,yml}]
indent_style = space
indent_size = 2

2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"browser" : true
},
"rules" : {
"strict": [1, "function"],
"strict": [0, "function"],
"quotes": 0,
"no-underscore-dangle": 0,
"no-multi-spaces": 0,
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/www/.store-ios.js
*~
.*.swp

.checkstyle.jar
npm-debug.log
/.idea
/demo
Expand Down
98 changes: 49 additions & 49 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ matrix:
# -------------
# osx
# -------------

# base osx test
- env: PLATFORM=osx CORDOVA=9.0.0 CORDOVA_OSX=5.0.0
os: osx
Expand All @@ -33,7 +33,7 @@ matrix:
# ios
# -------------
# note: the cordova build doesn't run when using cordova-ios@4
# so we only test with cordova-ios@5
# so we only test with cordova-ios@5

# up-to-date tools
- env: PLATFORM=ios-12.1 CORDOVA=9.0.0 CORDOVA_IOS=5.0.1
Expand Down Expand Up @@ -105,14 +105,14 @@ matrix:
- extra-android-m2repository

# cordova-android@6.4.0
- env: PLATFORM=android-4.4 CORDOVA=7.1.0 CORDOVA_ANDROID=6.4.0
os: linux
jdk: openjdk8
language: android
android:
components:
- tools
- extra-android-m2repository
# - env: PLATFORM=android-4.4 CORDOVA=7.1.0 CORDOVA_ANDROID=6.4.0
# os: linux
# jdk: openjdk8
# language: android
# android:
# components:
# - tools
# - extra-android-m2repository

#
# android-5.1
Expand Down Expand Up @@ -150,27 +150,17 @@ matrix:

# broken versions, see: https://github.com/j3k0/cordova-plugin-purchase/issues/762
# cordova-android@7.1.2 (broken)
# - env: PLATFORM=android-5.1 CORDOVA=7.1.0 CORDOVA_ANDROID=7.1.2
# os: linux
# jdk: openjdk8
# language: android
# android:
# components:
# - tools
# - extra-android-m2repository
- env: PLATFORM=android-5.1 CORDOVA=7.1.0 CORDOVA_ANDROID=7.1.2
os: linux
jdk: openjdk8
language: android
android:
components:
- tools
- extra-android-m2repository
#
# cordova-android@7.1.1 (broken)
# - env: PLATFORM=android-5.1 CORDOVA=7.1.0 CORDOVA_ANDROID=7.1.1
# os: linux
# jdk: openjdk8
# language: android
# android:
# components:
# - tools
# - extra-android-m2repository

# cordova-android@6.4.0
- env: PLATFORM=android-5.1 CORDOVA=7.1.0 CORDOVA_ANDROID=6.4.0
- env: PLATFORM=android-5.1 CORDOVA=7.1.0 CORDOVA_ANDROID=7.1.1
os: linux
jdk: openjdk8
language: android
Expand All @@ -179,6 +169,16 @@ matrix:
- tools
- extra-android-m2repository

# cordova-android@6.4.0
# - env: PLATFORM=android-5.1 CORDOVA=7.1.0 CORDOVA_ANDROID=6.4.0
# os: linux
# jdk: openjdk8
# language: android
# android:
# components:
# - tools
# - extra-android-m2repository

#
# android-6.0
#
Expand All @@ -204,14 +204,14 @@ matrix:
- extra-android-m2repository

# cordova-android@6.4.0
- env: PLATFORM=android-6.0 CORDOVA=7.1.0 CORDOVA_ANDROID=6.4.0
os: linux
jdk: openjdk8
language: android
android:
components:
- tools
- extra-android-m2repository
# - env: PLATFORM=android-6.0 CORDOVA=7.1.0 CORDOVA_ANDROID=6.4.0
# os: linux
# jdk: openjdk8
# language: android
# android:
# components:
# - tools
# - extra-android-m2repository

#
# android-7.0
Expand All @@ -238,14 +238,14 @@ matrix:
- extra-android-m2repository

# cordova-android@6.4.0
- env: PLATFORM=android-7.0 CORDOVA=7.1.0 CORDOVA_ANDROID=6.4.0
os: linux
jdk: openjdk8
language: android
android:
components:
- tools
- extra-android-m2repository
# - env: PLATFORM=android-7.0 CORDOVA=7.1.0 CORDOVA_ANDROID=6.4.0
# os: linux
# jdk: openjdk8
# language: android
# android:
# components:
# - tools
# - extra-android-m2repository

before_install:
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
Expand Down Expand Up @@ -279,10 +279,10 @@ script:
- if [[ "$PLATFORM" =~ ios ]]; then cordova platform add ios@$CORDOVA_IOS; fi
- if [[ "$PLATFORM" =~ osx ]]; then cordova platform add osx@$CORDOVA_OSX; fi
- if [[ "$PLATFORM" =~ android ]]; then cordova platform add android@$CORDOVA_ANDROID; fi
- cordova plugin add "$ROOT_DIR" --variable BILLING_KEY=0123456789abcdef
- rsync -r "$ROOT_DIR"/src/android/ plugins/cc.fovea.cordova.purchase/src/android
- cp "$ROOT_DIR"/src/ios/*.[hm] plugins/cc.fovea.cordova.purchase/src/ios/
- cp "$ROOT_DIR"/www/*.js plugins/cc.fovea.cordova.purchase/www/
- cordova plugin add "$ROOT_DIR"
- rsync -r "$ROOT_DIR"/src/android/ plugins/cordova-plugin-purchase/src/android
- cp "$ROOT_DIR"/src/ios/*.[hm] plugins/cordova-plugin-purchase/src/ios/
- cp "$ROOT_DIR"/www/*.js plugins/cordova-plugin-purchase/www/
- cordova plugin add https://github.com/apache/cordova-plugin-console.git
- cordova build --debug 2>&1
- if [[ "$PLATFORM" =~ ios ]]; then test -e platforms/ios/build/emulator/Test.app; fi
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ test-js-coverage: jshint eslint prepare-test-js
@${NODE_MODULES}/.bin/istanbul cover --root test/ test/js/run.js
@${NODE_MODULES}/.bin/coveralls < coverage/lcov.info

.checkstyle.jar:
curl "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-8.23/checkstyle-8.23-all.jar" -o .checkstyle.jar -L

javalint: .checkstyle.jar
java -jar .checkstyle.jar -c /sun_checks.xml src/android/cc/fovea/PurchasePlugin.java

test-install: build
@./test/run.sh cc.fovea.babygoo babygooinapp1

Expand Down
39 changes: 7 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,41 +55,16 @@ It lets you handle in-app purchases on many platforms with a single codebase.
### Install the plugin (Cordova)

```sh
cordova plugin add cordova-plugin-purchase [--variable BILLING_KEY="<BILLING_KEY>"]
cordova plugin add cordova-plugin-purchase
```

`BILLING_KEY` is only required for Android. Check [here](https://github.com/j3k0/cordova-plugin-purchase/wiki/Setup-for-Android-Google-Play#add-android-billing-key) for details.

### Install the plugin (PhoneGap)

Add the following to your `config.xml` file:

<details>
<summary>phonegap cli-7.1.0</summary>


```xml
<gap:plugin name="cc.fovea.cordova.purchase" source="npm" version="6.0.0">
<param name="BILLING_KEY" value="MIIB..."/>
</gap:plugin>
```
---

</details>

<details>
<summary>phonegap cli-8.0.0</summary>

```xml
<plugin spec="https://github.com/j3k0/cordova-plugin-purchase.git#phonegap-cli-8.0.0">
<param name="BILLING_KEY" value="MIIB..."/>
</plugin>
<gap:plugin name="cordova-plugin-purchase" source="npm" version="9.0.0"></gap:plugin>
```
---

</details>

_`phonegap-cli-8.1.1` is not supported if you need Android, because it ships with a buggy `cordova-android` version (`7.1.2`) that doesn't allow installation of .aidl files. If you don't need android, you can use the latest version of the plugin._

### Install recommended plugins

Expand Down Expand Up @@ -135,9 +110,9 @@ In short, you'll have two main tasks to accomplish:
1. Setup your application and In-App Products on AppStore, Play or Azure platforms using their respective web interfaces.
2. Add In-App Purchase code to your application.

For setup, the [wiki](https://github.com/j3k0/cordova-plugin-purchase/wiki/Home) contains good information.
For platform setup, the [wiki](https://github.com/j3k0/cordova-plugin-purchase/wiki/Home) contains good information.

For the code itself, the [API Documentation](doc/api.md) is a definitely a recommended read.
For the code itself, the [API Documentation](doc/api.md) is a definitely a recommended read.

## Documentation

Expand All @@ -158,8 +133,8 @@ For setup, the [wiki](https://github.com/j3k0/cordova-plugin-purchase/wiki/Home)

Have a very simple need? Maybe this will help.

* [Simple Non-Renewing Subscriptions](https://github.com/j3k0/cordova-non-renewing-subscription)
* The easiest way to integrate purchase into an app that only needs a non-renewing subscription.
- [Simple Non-Renewing Subscriptions](https://github.com/j3k0/cordova-non-renewing-subscription)
- The easiest way to integrate purchase into an app that only needs a non-renewing subscription.


# Contribute
Expand All @@ -170,7 +145,7 @@ Have a very simple need? Maybe this will help.

* ![](https://avatars1.githubusercontent.com/u/191881?s=64&v=4) [Jean-Christophe Hoelt](https://github.com/j3k0), Author
* ![](https://avatars3.githubusercontent.com/u/1674289?s=64&v=4) [Josef Fröhle](https://github.com/Dexus), Support
* Guillaume Charhon, initial Android code
* Guillaume Charhon, (now defunct) v1 for android
* Matt Kane, initial iOS code
* Mohammad Naghavi, original unification attempt
* Dave Alden [@dpa99c](https://github.com/dpa99c) (Apple-hosted IAPs for iOS)
Expand Down
Loading

0 comments on commit ca020da

Please sign in to comment.