Panagiotis Triantafyllou

new gradle, fixes for new gradle

......@@ -15,7 +15,7 @@
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2024-07-26T13:26:33.140020Z" />
<timeTargetWasSelectedWithDropDown value="2024-07-26T14:53:01.900442Z" />
</State>
</entry>
</value>
......
......@@ -3,6 +3,7 @@ apply plugin: 'com.android.application'
//apply plugin: 'com.huawei.agconnect'
android {
namespace "warp.ly.android_sdk"
compileSdkVersion 34
buildToolsVersion "34.0.0"
......
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="warp.ly.android_sdk">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
......
......@@ -8,7 +8,7 @@ buildscript {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
classpath 'com.android.tools.build:gradle:8.1.4'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.huawei.agconnect:agcp:1.7.2.300'
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
......
#Fri Jul 26 17:08:44 EEST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
......
......@@ -32,7 +32,7 @@ afterEvaluate {
// Two artifacts, the `aar` (or `jar`) and the sources
if (project.plugins.findPlugin("com.android.library")) {
from components.release
from components.findByName('release')
} else {
from components.java
}
......
......@@ -9,7 +9,7 @@ ext {
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"
android {
namespace 'ly.warp.sdk'
compileSdkVersion 34
buildToolsVersion "34.0.0"
......@@ -107,9 +107,6 @@ dependencies {
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
//------------------------------ Expandable Layout -----------------------------//
api 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
//------------------------------ Lifecycle -----------------------------//
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="ly.warp.sdk">
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
......@@ -177,57 +176,6 @@
</intent-filter>
</activity>
<!-- Service used for updating user's location. -->
<service
android:name=".services.UpdateUserLocationService"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" />
<service
android:name=".services.EventService"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" />
<service
android:name=".services.VouchersFetchedService"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" />
<service
android:name=".services.EventCouponsService"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" />
<service
android:name=".services.EventRewardsCouponsService"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" />
<service
android:name=".services.EventUnifiedCouponsService"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" />
<service
android:name=".services.EventCampaignCouponService"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" />
<service
android:name=".services.EventCampaignService"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" />
<service
android:name=".services.EventRefreshDeviceTokenService"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" />
<service
android:name=".services.EventQuestionnaireService"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" />
<!-- android:stopWithTask="false"-->
<!-- android:process=":warplyHealthService"-->
<!-- <service-->
......
......@@ -52,7 +52,6 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import ly.warp.sdk.BuildConfig;
import ly.warp.sdk.Warply;
import ly.warp.sdk.dexter.listener.DexterError;
import ly.warp.sdk.dexter.listener.PermissionDeniedResponse;
......@@ -102,11 +101,9 @@ public class UpdateUserLocationService extends Worker {
PermissionsUtil.PERMISSION_LOCATION_FINE
).requestPermissions();
} catch (SecurityException e) {
if (BuildConfig.DEBUG) {
e.printStackTrace();
WorkManager.getInstance(Warply.getWarplyContext()).cancelAllWorkByTag(TAG);
}
}
} else {
WorkManager.getInstance(Warply.getWarplyContext()).cancelAllWorkByTag(TAG);
}
......@@ -187,7 +184,6 @@ public class UpdateUserLocationService extends Worker {
getGeofences().add(new WarpGeoFence(geoArray.getJSONObject(i)));
}
} catch (JSONException e) {
if (BuildConfig.DEBUG)
e.printStackTrace();
geofences = null;
WarpUtils.log("failed during parsing geofencing data.");
......@@ -427,10 +423,8 @@ public class UpdateUserLocationService extends Worker {
WarpUtils.log("Could not get location data.");
});
} catch (SecurityException e) {
if (BuildConfig.DEBUG) {
e.printStackTrace();
}
}
}
};
}
......
......@@ -38,7 +38,6 @@ import androidx.work.WorkManager;
import java.util.List;
import ly.warp.sdk.BuildConfig;
import ly.warp.sdk.Warply;
import ly.warp.sdk.dexter.listener.DexterError;
import ly.warp.sdk.dexter.listener.PermissionDeniedResponse;
......@@ -122,11 +121,9 @@ public class WarplyLocationManager {
defaultMinTime, defaultMinDistance,
locationListenerPendingIntent);
} catch (SecurityException e) {
if (BuildConfig.DEBUG) {
e.printStackTrace();
}
}
}
};
try {
......@@ -137,7 +134,6 @@ public class WarplyLocationManager {
PermissionsUtil.PERMISSION_LOCATION_FINE
).requestPermissions();
} catch (Exception e) {
if (BuildConfig.DEBUG)
e.printStackTrace();
}
}
......@@ -262,11 +258,9 @@ public class WarplyLocationManager {
lm.requestLocationUpdates(bestProvider, minTime, minDistance, locationListenerPendingIntent);
}
} catch (SecurityException e) {
if (BuildConfig.DEBUG) {
e.printStackTrace();
}
}
}
};
new PermissionsUtil(
......@@ -276,12 +270,10 @@ public class WarplyLocationManager {
PermissionsUtil.PERMISSION_LOCATION_FINE
).requestPermissions();
} catch (SecurityException e) {
if (BuildConfig.DEBUG) {
e.printStackTrace();
}
}
}
}
// MicroAppIndexes geofencingIndex = MicroAppIndexes.GEOFENCING_INDEX;
//
......
......@@ -16,7 +16,6 @@ import android.widget.ImageView;
import android.widget.RelativeLayout;
import ly.warp.sdk.BuildConfig;
import ly.warp.sdk.io.models.Campaign;
import ly.warp.sdk.utils.WarpUtils;
import ly.warp.sdk.utils.WarplyDeviceInfoCollector;
......@@ -117,11 +116,9 @@ public class CampaignItemWebHolder extends CampaignItemViewHolder {
try {
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
} catch (ActivityNotFoundException e) {
if (BuildConfig.DEBUG) {
e.printStackTrace();
}
}
}
});
warpView.setOnTouchListener(new View.OnTouchListener() {
@Override
......
package ly.warp.sdk.views;
import android.content.Context;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import android.text.TextUtils;
import ly.warp.sdk.BuildConfig;
import ly.warp.sdk.Warply;
import ly.warp.sdk.fragments.WarpViewFragment;
import ly.warp.sdk.io.callbacks.CallbackReceiver;
......@@ -87,12 +88,10 @@ public class CampaignViewLoader implements CallbackReceiver<CampaignList> {
try {
transaction.commit();
} catch (IllegalStateException e) {
if (BuildConfig.DEBUG) {
e.printStackTrace();
}
}
}
}
private void notifySuccessExternalListener(CampaignList campaigns) {
......
......@@ -35,7 +35,6 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentSender;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.location.LocationManager;
import android.net.Uri;
......@@ -103,12 +102,9 @@ import ly.warp.sdk.io.models.RefreshVouchersEventModel;
import ly.warp.sdk.io.models.UnifiedCoupon;
import ly.warp.sdk.io.models.WarplyCCMSEnabledModel;
import ly.warp.sdk.io.models.WarplyCouponsChangedEventModel;
import ly.warp.sdk.io.models.WarplyHealthEventModel;
import ly.warp.sdk.io.models.WarplyPacingCardEventModel;
import ly.warp.sdk.io.models.WarplyPacingEventModel;
import ly.warp.sdk.io.models.WarplyUnifiedActivatedEventModel;
import ly.warp.sdk.services.EventCampaignService;
import ly.warp.sdk.services.WarplyHealthService;
import ly.warp.sdk.utils.WarpUtils;
import ly.warp.sdk.utils.WarplyManagerHelper;
import ly.warp.sdk.utils.WarplyProperty;
......
......@@ -10,7 +10,6 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.concurrent.atomic.AtomicBoolean;
import ly.warp.sdk.BuildConfig;
import ly.warp.sdk.Warply;
import ly.warp.sdk.io.callbacks.CallbackReceiver;
import ly.warp.sdk.io.callbacks.SimpleCallbackReceiver;
......@@ -142,10 +141,8 @@ public class CampaignsArrayAdapter<VH extends CampaignItemViewHolder> extends Ba
itemView = viewHolder.itemView;
itemView.setTag(viewHolder);
} catch (Exception e) {
if (BuildConfig.DEBUG) {
e.printStackTrace();
}
}
} else {
viewHolder = (VH) itemView.getTag();
}
......
package ly.warp.sdk.views.adapters.mix;
import android.database.DataSetObserver;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.BaseAdapter;
import android.widget.ListView;
import ly.warp.sdk.BuildConfig;
import ly.warp.sdk.io.callbacks.SimpleCallbackReceiver;
import ly.warp.sdk.io.models.Campaign;
import ly.warp.sdk.io.models.CampaignList;
......@@ -185,10 +186,8 @@ public class CampaignsMixListAdapter<VH extends CampaignItemViewHolder> extends
itemView = viewHolder.itemView;
itemView.setTag(viewHolder);
} catch (Exception e) {
if (BuildConfig.DEBUG) {
e.printStackTrace();
}
}
} else {
viewHolder = (VH) itemView.getTag();
}
......
......@@ -5,6 +5,7 @@
<attr name="dashLength" format="dimension" />
<attr name="dashGap" format="dimension" />
<attr name="dashThickness" format="dimension" />
<attr name="colorPrimary" format="color" />
<attr name="orientation" format="enum">
<enum name="horizontal" value="0" />
<enum name="vertical" value="1" />
......