Skip to content

Commit

Permalink
Tested with standard Cordova project ensuring java classes were added
Browse files Browse the repository at this point in the history
  • Loading branch information
jkasten2 committed Dec 6, 2016
0 parents commit c47eb8d
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
24 changes: 24 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Modified MIT License

Copyright 2016 OneSignal

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

1. The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

2. All copies of substantial portions of the Software may only be used in connection
with services provided by OneSignal

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#### For Intel XDK
Use `onesignal-cordova-plugin` instead if you **NOT** using Intel XDK.

#### Description
This adds required Android dependencies needed by OneSignal. Use this plugin along with `onesignal-cordova-plugin-pgb-compat` when building with Intel XDK.

#### Why this is required
This was created as the main branch of the OneSignal Cordova plugin `onesignal-cordova-plugin` uses a gradle script which Intel XDK does not allow. Using older .jar Cordova projects for Google Play services and Android Support library were recommended in the past but they are not compatable with newer plugins that use .aar sytle gradle compile entires. This is due to duplicate Java classes being defined which creates Cordova build errors durning the dex step.
34 changes: 34 additions & 0 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="onesignal-cordova-dependencies-compat"
version="1.0.0">

<name>OneSignal Android Dependencies</name>
<author>Josh Kasten</author>

<description>This addes required Android dependencies needed by OneSignal. Designed for Intel XDK to be used with onesignal-cordova-plugin-pgb-compat. Use onesignal-cordova-plugin instead if you not using Intel XDK.</description>

<keywords>OneSignal, Intel XDK, compat</keywords>

<license>MIT</license>

<engines>
<engine name="cordova-android" version=">=4.0.0" /> <!-- This main branch of OneSignal depends on gradle and maven. -->
</engines>

<platform name="android">
<framework src="com.google.android.gms:play-services-gcm:+" />
<!-- play-services-analytics is only required when gms version 8.1.0 or older is used. -->
<framework src="com.google.android.gms:play-services-analytics:+" />
<framework src="com.google.android.gms:play-services-location:+" />

<config-file target="res/xml/config.xml" parent="/*">
<feature name="OneSignalDependenciesCompat" >
<param name="android-package" value="com.plugin.gcm.OneSignalDependenciesCompat" />
</feature>
</config-file>
</platform>

</plugin>

0 comments on commit c47eb8d

Please sign in to comment.