blakgeek / cordova-plugin-flurryanalytics

Adds support for all that Flurry Analytics flavored goodness to your Cordova based apps
23 stars 29 forks source link

Java 1.8 support #39

Open manjeetpati opened 3 years ago

manjeetpati commented 3 years ago

the library modifies the gradle java version and it fails build fails in subsequent packages:

package.json example:

"cordova-plugin-flurryanalytics": "^1.4.6", "cordova-plugin-geolocation": "^4.0.2", "cordova-plugin-googlemaps": "^2.7.1",

Build fails with error:

\src\main\java\plugin\google\maps\PluginMarker.java:155: error: lambda expressions are not supported in -source 1.7 cordova.getActivity().runOnUiThread(() -> { ^ (use -source 8 or higher to enable lambda expressions)

Reason: Flurry changes the gradle java version for 1.7 and all the libraries with lambda after flurry in sequence fail with this error.

achakra21 commented 3 years ago

This plugin seems outdated not maintained since longtime , I had to write my own plugin for flurry

schematical commented 3 years ago

So I got it to compile by changing this file from VERSION_1_7 to VERSION_1_8 :https://github.com/blakgeek/cordova-plugin-flurryanalytics/blob/master/src/android/plugin.gradle#L4

ext.postBuildExtras = {
    android {
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
    }
}

Still working on a long term fix and verifying it actually sends.

achakra21 commented 3 years ago

@schematical is it working for iOS on ionic capacitor 3?