Skip to content

Commit

Permalink
Making the branch release ready
Browse files Browse the repository at this point in the history
Gradle changes are becoming importantly necessary.
Sooner we merge the ongoing upgrade branch in master, we dont have to deal with workarounds like this commit
  • Loading branch information
“Akshay committed Nov 12, 2024
1 parent 3b87dec commit 441816c
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ android {
defaultConfig {
applicationId "com.iterable.iterableapi.testapp"
minSdkVersion 16
targetSdkVersion 27
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
12 changes: 11 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
android:theme="@style/AppTheme">
<activity
android:name="com.iterable.androidsdk.AnonTrackingTestActivity"
android:exported="false" />
android:exported="true" />
<activity
android:name="com.iterable.androidsdk.MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
Expand All @@ -23,6 +24,15 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity"
android:exported="true" />
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity"
android:exported="true" />
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity"
android:exported="true" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ public String onAuthTokenRequested() {
} else {
userEmail = null;
}
final Duration days7 = Duration.ofDays(7);
Duration days7 = null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
days7 = Duration.ofDays(7);
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
jwtToken = IterableJwtGenerator.generateToken(secret, days7, userEmail, userId);
}
Expand Down
2 changes: 1 addition & 1 deletion iterableapi-ui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {

defaultConfig {
minSdkVersion 16
targetSdkVersion 28
targetSdkVersion 31
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
5 changes: 5 additions & 0 deletions iterableapi-ui/src/main/res/layout-v21/banner_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
android:layout_gravity="center_vertical"
android:layout_marginTop="8dp"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginBottom="12dp"
app:cardCornerRadius="8dp"
app:cardElevation="0dp"
Expand All @@ -18,6 +19,7 @@
android:layout_width="240dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:ellipsize="end"
android:maxLines="2"
Expand All @@ -34,6 +36,7 @@
android:layout_width="240dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="8dp"
android:ellipsize="end"
android:maxLines="2"
Expand Down Expand Up @@ -73,7 +76,9 @@
android:background="@drawable/primary_banner_button_background"
android:ellipsize="end"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingStart="12dp"
Expand Down
6 changes: 6 additions & 0 deletions iterableapi-ui/src/main/res/layout-v21/card_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="16dp"
android:ellipsize="end"
android:maxLines="2"
Expand All @@ -55,7 +57,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp"
android:ellipsize="end"
android:maxLines="2"
Expand Down Expand Up @@ -84,7 +88,9 @@
android:background="@drawable/primary_card_button_background"
android:ellipsize="end"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="16dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingStart="12dp"
Expand Down
6 changes: 6 additions & 0 deletions iterableapi-ui/src/main/res/layout/banner_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
android:layout_gravity="center_vertical"
android:layout_marginTop="8dp"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginBottom="12dp"
app:cardCornerRadius="8dp"
app:cardElevation="0dp"
Expand All @@ -18,6 +19,7 @@
android:layout_width="240dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:ellipsize="end"
android:maxLines="2"
Expand All @@ -33,6 +35,7 @@
android:id="@+id/embedded_message_body"
android:layout_width="240dp"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:ellipsize="end"
Expand All @@ -51,6 +54,7 @@
android:layout_height="80dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:contentDescription=""
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand All @@ -72,6 +76,7 @@
android:background="@drawable/primary_banner_button_background"
android:ellipsize="end"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingStart="12dp"
Expand All @@ -88,6 +93,7 @@
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:background="@drawable/secondary_banner_button_background"
android:ellipsize="end"
android:paddingTop="8dp"
Expand Down
11 changes: 10 additions & 1 deletion iterableapi-ui/src/main/res/layout/card_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
Expand Down Expand Up @@ -39,6 +40,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="16dp"
android:ellipsize="end"
Expand All @@ -55,6 +58,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="8dp"
android:ellipsize="end"
Expand All @@ -81,7 +86,9 @@
android:layout_width="0dp"
android:layout_height="36dp"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:background="@drawable/primary_card_button_background"
android:ellipsize="end"
android:paddingStart="8dp"
Expand All @@ -90,13 +97,15 @@
android:stateListAnimator="@null"
android:textAllCaps="false"
android:textColor="@color/white"
app:cornerRadius="32dp" />
app:cornerRadius="32dp"
tools:ignore="Suspicious0dp" />

<Button
android:id="@+id/embedded_message_second_button"
android:layout_width="0dp"
android:layout_height="36dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_weight="1"
android:background="@drawable/secondary_card_button_background"
android:ellipsize="end"
Expand Down
7 changes: 7 additions & 0 deletions iterableapi-ui/src/main/res/layout/notification_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
android:layout_marginTop="8dp"
android:layout_marginBottom="12dp"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
app:cardCornerRadius="8dp"
app:cardElevation="0dp"
android:background="@drawable/notification_view_border"
Expand All @@ -18,6 +19,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:ellipsize="end"
Expand All @@ -34,6 +37,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:ellipsize="end"
Expand Down Expand Up @@ -62,6 +67,7 @@
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:textColor="@color/notification_text_color"
android:background="@drawable/primary_notification_button_background"
android:ellipsize="end"
Expand All @@ -80,6 +86,7 @@
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:textColor="@color/notification_text_color"
android:background="@drawable/secondary_notification_button_background"
android:ellipsize="end"
Expand Down
2 changes: 1 addition & 1 deletion iterableapi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ android {

defaultConfig {
minSdkVersion 16
targetSdkVersion 27
targetSdkVersion 31

buildConfigField "String", "ITERABLE_SDK_VERSION", "\"3.6.0-beta1\""

Expand Down
12 changes: 12 additions & 0 deletions iterableapi/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<uses-permission android:name="android.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS"
tools:ignore="ProtectedPermissions" />

<application>
<!--FCM-->
<service
Expand All @@ -28,6 +31,15 @@
android:launchMode="singleInstance"
android:excludeFromRecents="true"
android:theme="@style/TrampolineActivity.Transparent"/>
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity"
android:exported="true" />
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity"
android:exported="true" />
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity"
android:exported="true" />

<uses-library android:name="androidx.security" android:required="false" />
</application>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.iterable.iterableapi;

import android.annotation.SuppressLint;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
Expand Down Expand Up @@ -184,6 +185,7 @@ IterableTask getTask(String id) {
return task;
}

@SuppressLint("Range")
private IterableTask createTaskFromCursor(Cursor cursor) {
String id, name;
IterableTaskType type = null;
Expand Down

0 comments on commit 441816c

Please sign in to comment.