Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release core v6.2.1 SDK-3760 #599

Merged
merged 3 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions .github/workflows/build_sample_app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Sample App Build
on:
workflow_dispatch:
inputs:
build_debug_apk:
description: Build Debug APK
type: boolean
default: true
required: false

build_debug_bundle:
description: Build Debug Bundle
type: boolean
default: false
required: false

build_signed_release_apk:
description: Build Signed Release APK
type: boolean
default: false
required: false

build_signed_release_bundle:
description: Build Signed Release Bundle
type: boolean
default: false
required: false

account_id:
description: 'Clevertap Account ID'
type: string
default: ""
required: true

account_token:
description: 'Clevertap Account Token'
type: string
default: ""
required: true

account_region:
description: 'Clevertap Account Region'
type: string
default: eu1
required: true


jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Output Inputs
run: echo "${{ toJSON(inputs) }}"

- name: Checkout the code from Repo
uses: actions/checkout@v3

- name: Setup JDK 17.
uses: ./.github/mini_flows/setup_jdk

- name: Decode secret files
env:
GOOGLE_SERVICES_BASE64: ${{ secrets.GOOGLE_SERVICES_BASE64 }}
SAMPLE_KEY_BASE64: ${{ secrets.SAMPLE_KEY_BASE64 }}
LOCAL_PROPERTIES_BASE64: ${{ secrets.LOCAL_PROPERTIES_BASE64 }}
run: |
echo "$GOOGLE_SERVICES_BASE64" | base64 --decode > sample/google-services.json
echo "$SAMPLE_KEY_BASE64" | base64 --decode > sample/SampleKey
echo "$LOCAL_PROPERTIES_BASE64" | base64 --decode > local.properties

- name: Replace Clevertap Credentials in AndroidManifest.xml
run: |
sed -i "s/YOUR ACCT ID/${{ github.event.inputs.account_id }}/g" sample/src/main/AndroidManifest.xml
sed -i "s/YOUR ACCT TOKEN/${{ github.event.inputs.account_token }}/g" sample/src/main/AndroidManifest.xml
sed -i "s/YOUR ACCT REGION/${{ github.event.inputs.account_region }}/g" sample/src/main/AndroidManifest.xml

- name: Build Debug APK
if: ${{ inputs.build_debug_apk}}
run: |
./gradlew :sample:assembleRemoteDebug

- name: Build Debug Bundle
if: ${{ inputs.build_debug_bundle}}
run: |
./gradlew :sample:bundleRemoteDebug

- name: Build Signed Release APK
if: ${{ inputs.build_signed_release_apk}}
run: |
./gradlew :sample:assembleRemoteSigned


- name: Build Signed Release Bundle
if: ${{ inputs.build_signed_release_bundle}}
run: |
./gradlew :sample:bundleRemoteSigned

- name: Upload Debug APK
if: ${{ inputs.build_debug_apk}}
uses: actions/upload-artifact@v3
with:
name: sample-debug-apk
path: sample/build/outputs/apk/remote/debug/*.apk

- name: Upload Debug Bundle
if: ${{ inputs.build_debug_bundle}}
uses: actions/upload-artifact@v3
with:
name: sample-debug-bundle
path: sample/build/outputs/bundle/remoteDebug/*.aab

- name: Upload Signed Release APK
if: ${{ inputs.build_signed_release_apk}}
uses: actions/upload-artifact@v3
with:
name: sample-signed-release-apk
path: sample/build/outputs/apk/remote/signed/*.apk


- name: Upload Signed Release Bundle
if: ${{ inputs.build_signed_release_bundle}}
uses: actions/upload-artifact@v3
with:
name: sample-signed-release-bundle
path: sample/build/outputs/bundle/remoteSigned/*.aab
20 changes: 10 additions & 10 deletions .github/workflows/manually_validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,45 +74,45 @@ jobs:
uses: actions/checkout@v3

- name: Mandatory File Changes
if: ${{ github.event.inputs.check_mandatory }}
if: ${{ inputs.check_mandatory }}
uses: ./.github/mini_flows/mandatory_filechanges

- name: Setup JDK 17.
uses: ./.github/mini_flows/setup_jdk

- name: Run lint tests and Upload results
if: ${{ github.event.inputs.lint }}
if: ${{ inputs.lint }}
uses: ./.github/mini_flows/lint

- name: Static Code Check Via detekt
if: ${{ github.event.inputs.detekt }}
if: ${{ inputs.detekt }}
uses: ./.github/mini_flows/codechecks_detekt

- name: Static Code Check Via checkstyle
if: ${{ github.event.inputs.checkstyle }}
if: ${{ inputs.checkstyle }}
uses: ./.github/mini_flows/codechecks_checkstyle

- name: Unit Tests and Jacoco Coverage (DEBUG)
if: ${{ github.event.inputs.jacoco_debug }}
if: ${{ inputs.jacoco_debug }}
uses: ./.github/mini_flows/test_and_coverage_debug

- name: Unit Tests and Jacoco Coverage (RELEASE)
if: ${{ github.event.inputs.jacoco_release }}
if: ${{ inputs.jacoco_release }}
uses: ./.github/mini_flows/test_and_coverage_release

- name: Unit Tests(DEBUG)
if: ${{ github.event.inputs.test_debug }}
if: ${{ inputs.test_debug }}
uses: ./.github/mini_flows/test_debug

- name: Unit Tests(RELEASE)
if: ${{ github.event.inputs.test_release }}
if: ${{ inputs.test_release }}
uses: ./.github/mini_flows/test_release


- name: Build AARs (DEBUG)
if: ${{ github.event.inputs.build_debug }}
if: ${{ inputs.build_debug }}
uses: ./.github/mini_flows/build_code_debug

- name: Build AARs (RELEASE)
if: ${{ github.event.inputs.build_release }}
if: ${{ inputs.build_release }}
uses: ./.github/mini_flows/build_code_release
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
## CHANGE LOG.

### April 11, 2024

* [CleverTap Android SDK v6.2.1](docs/CTCORECHANGELOG.md)

### April 3, 2024
> ⚠️ **NOTE**
6.2.0 produces a crash, please update to 6.2.1 and above.

* [CleverTap Android SDK v6.2.0](docs/CTCORECHANGELOG.md)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ We publish the SDK to `mavenCentral` as an `AAR` file. Just declare it as depend

```groovy
dependencies {
implementation "com.clevertap.android:clevertap-android-sdk:6.2.0"
implementation "com.clevertap.android:clevertap-android-sdk:6.2.1"
}
```

Alternatively, you can download and add the AAR file included in this repo in your Module libs directory and tell gradle to install it like this:

```groovy
dependencies {
implementation (name: "clevertap-android-sdk-6.2.0", ext: 'aar')
implementation (name: "clevertap-android-sdk-6.2.1", ext: 'aar')
}
```

Expand All @@ -46,7 +46,7 @@ Add the Firebase Messaging library and Android Support Library v4 as dependencie

```groovy
dependencies {
implementation "com.clevertap.android:clevertap-android-sdk:6.2.0"
implementation "com.clevertap.android:clevertap-android-sdk:6.2.1"
implementation "androidx.core:core:1.9.0"
implementation "com.google.firebase:firebase-messaging:23.0.6"
implementation "com.google.android.gms:play-services-ads:22.3.0" // Required only if you enable Google ADID collection in the SDK (turned off by default).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ public static CleverTapInstanceConfig createInstance(Context context, @NonNull S
this.fcmSenderId = config.fcmSenderId;
this.packageName = config.packageName;
this.beta = config.beta;
this.allowedPushTypes = config.allowedPushTypes;
this.identityKeys = config.identityKeys;
this.encryptionLevel = config.encryptionLevel;
}
Expand Down Expand Up @@ -226,10 +225,6 @@ private CleverTapInstanceConfig(String jsonString) throws Throwable {
if (configJsonObject.has(Constants.KEY_BETA)) {
this.beta = configJsonObject.getBoolean(Constants.KEY_BETA);
}
if (configJsonObject.has(Constants.KEY_ALLOWED_PUSH_TYPES)) {
this.allowedPushTypes = (ArrayList<String>) toList(
configJsonObject.getJSONArray(Constants.KEY_ALLOWED_PUSH_TYPES));
}
if (configJsonObject.has(Constants.KEY_IDENTITY_TYPES)) {
this.identityKeys = (String[]) toArray(configJsonObject.getJSONArray(Constants.KEY_IDENTITY_TYPES));
}
Expand Down Expand Up @@ -492,7 +487,6 @@ String toJSONString() {
configJsonObject.put(Constants.KEY_ENABLE_CUSTOM_CT_ID, getEnableCustomCleverTapId());
configJsonObject.put(Constants.KEY_PACKAGE_NAME, getPackageName());
configJsonObject.put(Constants.KEY_BETA, isBeta());
configJsonObject.put(Constants.KEY_ALLOWED_PUSH_TYPES, toJsonArray(allowedPushTypes));
configJsonObject.put(Constants.KEY_ENCRYPTION_LEVEL , getEncryptionLevel());
return configJsonObject.toString();
} catch (Throwable e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ public interface Constants {
String KEY_ENABLE_CUSTOM_CT_ID = "getEnableCustomCleverTapId";
String KEY_BETA = "beta";
String KEY_PACKAGE_NAME = "packageName";
String KEY_ALLOWED_PUSH_TYPES = "allowedPushTypes";
String KEY_IDENTITY_TYPES = "identityTypes";
String KEY_ENCRYPTION_LEVEL = "encryptionLevel";
String KEY_ENCRYPTION_FLAG_STATUS = "encryptionFlagStatus";
Expand Down
8 changes: 8 additions & 0 deletions docs/CTCORECHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
## CleverTap Android SDK CHANGE LOG

### Version 6.2.1 (April 11, 2024)
This hotfix release addresses the following issue in `v6.2.0`:

#### Bug Fixes
* Fixes a crash `IllegalArgumentException` caused by `allowedPushType` XPS enum.

### Version 6.2.0 (April 3, 2024)
> ⚠️ **NOTE**
6.2.0 produces a crash, please update to 6.2.1 and above.

#### Bug Fixes
* Extends the push primer callback to notify permission denial when cancel button is clicked on `PromptForSettings` alert dialog.
Expand Down
2 changes: 1 addition & 1 deletion docs/CTGEOFENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Add the following dependencies to the `build.gradle`

```Groovy
implementation "com.clevertap.android:clevertap-geofence-sdk:1.3.0"
implementation "com.clevertap.android:clevertap-android-sdk:6.2.0" // 3.9.0 and above
implementation "com.clevertap.android:clevertap-android-sdk:6.2.1" // 3.9.0 and above
implementation "com.google.android.gms:play-services-location:21.0.0"
implementation "androidx.work:work-runtime:2.7.1" // required for FETCH_LAST_LOCATION_PERIODIC
implementation "androidx.concurrent:concurrent-futures:1.1.0" // required for FETCH_LAST_LOCATION_PERIODIC
Expand Down
2 changes: 1 addition & 1 deletion docs/CTPUSHTEMPLATES.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ CleverTap Push Templates SDK helps you engage with your users using fancy push n

```groovy
implementation "com.clevertap.android:push-templates:1.2.3"
implementation "com.clevertap.android:clevertap-android-sdk:6.2.0" // 4.4.0 and above
implementation "com.clevertap.android:clevertap-android-sdk:6.2.1" // 4.4.0 and above
```

2. Add the following line to your Application class before the `onCreate()`
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ coroutines_test = "1.7.3"
installreferrer = "2.2"

#SDK Versions
clevertap_android_sdk = "6.2.0"
clevertap_android_sdk = "6.2.1"
clevertap_rendermax_sdk = "1.0.3"
clevertap_geofence_sdk = "1.3.0"
clevertap_hms_sdk = "1.3.4"
Expand Down
29 changes: 29 additions & 0 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ android {
}
}
}
Properties localProperties = loadLocalProperties()
signingConfigs {
create("sampleAppConfig") {
storeFile = getCtProperty("com.clevertap.signing.storeFile", localProperties)?.with {"${projectDir}/${it}" as File }
storePassword = getCtProperty("com.clevertap.signing.storePassword", localProperties)
keyAlias = getCtProperty("com.clevertap.signing.keyAlias", localProperties)
keyPassword = getCtProperty("com.clevertap.signing.keyPassword", localProperties)
}
}

buildTypes {
named("debug") {
minifyEnabled false
Expand All @@ -53,6 +63,11 @@ android {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
signed {
initWith release
signingConfig = signingConfigs["sampleAppConfig"]
matchingFallbacks = ['release']
}
}
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
Expand Down Expand Up @@ -150,6 +165,20 @@ dependencies {
stagingImplementation("com.clevertap.android:clevertap-hms-sdk:1.3.4")
}

Properties loadLocalProperties() {
def propertiesFile = project.rootProject.file('local.properties')
if (propertiesFile.exists()) {
Properties localProperties = new Properties()
localProperties.load(propertiesFile.newDataInputStream())
return localProperties
}
return [:] // Return an empty map if properties file doesn't exist
}

static String getCtProperty(String key, Properties localProperties) {
return localProperties[key] as String
}

apply plugin: 'com.google.gms.google-services'
//For Huawei Push
//apply plugin: 'com.huawei.agconnect'
Expand Down
2 changes: 1 addition & 1 deletion sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
android:value="YOUR ACCT TOKEN" />
<meta-data
android:name="CLEVERTAP_REGION"
android:value="eu1"/>
android:value="YOUR ACCT REGION"/>
<!--<meta-data
android:name="CLEVERTAP_PROXY_DOMAIN"
android:value="analytics.sdktesting.xyz"/>-->
Expand Down
8 changes: 8 additions & 0 deletions templates/CTCORECHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
## CleverTap Android SDK CHANGE LOG

### Version 6.2.1 (April 11, 2024)
This hotfix release addresses the following issue in `v6.2.0`:

#### Bug Fixes
* Fixes a crash `IllegalArgumentException` caused by `allowedPushType` XPS enum.

### Version 6.2.0 (April 3, 2024)
> ⚠️ **NOTE**
6.2.0 produces a crash, please update to 6.2.1 and above.

#### Bug Fixes
* Extends the push primer callback to notify permission denial when cancel button is clicked on `PromptForSettings` alert dialog.
Expand Down
Loading