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

Version 5.1.0 #631

Merged
merged 21 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
bd88ccd
fix: catch any exception occurs when onActivityLifecycle callback inv…
shashanksu Jan 14, 2025
b05990f
fix: OnIsEnabledListener and OnDeeplinkResolvedListener the results p…
MahdiZTD Jan 16, 2025
5c5b344
fix: revert processDeeplinkI threading in to the background thread
MahdiZTD Jan 16, 2025
ec7ce89
fix: posting the result on ui thread and que on executor
MahdiZTD Jan 16, 2025
76e2287
feat: update compile and target sdk version to API 35
shashanksu Jan 13, 2025
8b36e5d
feat: update gradle version
shashanksu Jan 13, 2025
3916956
feat: update kotlin version
shashanksu Jan 13, 2025
c22dd50
chore: update example apps compile and target sdk version
shashanksu Jan 13, 2025
63b40e1
feat: enable R8
shashanksu Jan 13, 2025
e4ab3eb
feat: update signature lib version to 3.35.2
shashanksu Jan 15, 2025
c62b9fd
feat: add jsonResponse to AdjustAttribution
shashanksu Jan 15, 2025
27cbc15
feat: add jsonResponse to Attritubtion in webbridge
shashanksu Jan 15, 2025
5576d22
chore: update example app webbridge
shashanksu Jan 15, 2025
ddb3321
feat: update test to add json response in attribution
shashanksu Jan 16, 2025
c00044e
refac: rename test_info key to align with test server attribution fie…
uerceg Jan 27, 2025
fb20ae7
refac: rename test_info key to align with test server attribution fie…
uerceg Jan 28, 2025
1d7140e
feat: update version number to 5.1.0
uerceg Jan 28, 2025
5701ab4
refac: make jsonResponse in web bridge api to be a js object instead …
uerceg Jan 28, 2025
89f6999
docs: update changelog
uerceg Jan 28, 2025
4d56567
chore: update webbridge example app
shashanksu Jan 28, 2025
2dd75da
docs: update changelog
shashanksu Jan 28, 2025
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
10 changes: 5 additions & 5 deletions Adjust/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ subprojects {
ext {
// Android config.
coreMinSdkVersion = 21
coreCompileSdkVersion = 34
coreTargetSdkVersion = 34
coreVersionName = '5.0.2'
coreCompileSdkVersion = 35
coreTargetSdkVersion = 35
coreVersionName = '5.1.0'
defaultVersionCode = 1
webbridgeMinSdkVersion = 21
samsungReferrerMinSdkVersion = 21
Expand All @@ -21,14 +21,14 @@ ext {
}

buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '2.1.0'

repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.4'
classpath 'com.android.tools.build:gradle:8.8.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files.
Expand Down
4 changes: 2 additions & 2 deletions Adjust/examples/example-app-fbpixel/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdk 34
compileSdk 35

defaultConfig {
applicationId "com.adjust.examples"
minSdkVersion 21
targetSdkVersion 34
targetSdkVersion 35
versionCode 1
versionName "1.0"
}
Expand Down
4 changes: 2 additions & 2 deletions Adjust/examples/example-app-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ repositories {
}

android {
compileSdk 34
compileSdk 35

defaultConfig {
applicationId "com.adjust.examples"
minSdkVersion 21
targetSdkVersion 34
targetSdkVersion 35
versionCode 1
versionName "1.0"
}
Expand Down
4 changes: 2 additions & 2 deletions Adjust/examples/example-app-keyboard/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ repositories {
}

android {
compileSdk 34
compileSdk 35

defaultConfig {
applicationId "com.adjust.examples.keyboard"
minSdkVersion 21
targetSdkVersion 34
targetSdkVersion 35
versionCode 1
versionName "1.0"
}
Expand Down
9 changes: 7 additions & 2 deletions Adjust/examples/example-app-kotlin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdk 34
compileSdk 35

defaultConfig {
applicationId "com.adjust.examples"
minSdkVersion 21
targetSdkVersion 34
targetSdkVersion 35
versionCode 1
versionName "1.0"

Expand All @@ -23,6 +23,11 @@ android {
sourceCompatibility 1.8
targetCompatibility 1.8
}

kotlinOptions {
jvmTarget = '1.8'
}

namespace 'com.adjust.examples'
}

Expand Down
4 changes: 2 additions & 2 deletions Adjust/examples/example-app-tv/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ repositories {
}

android {
compileSdk 34
compileSdk 35

defaultConfig {
applicationId "com.adjust.examples"
minSdkVersion 21
targetSdkVersion 34
targetSdkVersion 35
versionCode 1
versionName "1.0"
}
Expand Down
4 changes: 2 additions & 2 deletions Adjust/examples/example-app-webbridge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdk 34
compileSdk 35

defaultConfig {
applicationId "com.example.examples"
minSdkVersion 21
targetSdkVersion 34
targetSdkVersion 35
versionCode 1
versionName "1.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ <h1 style="width:400px;height:35px;text-align:center;">Adjust Web View SDK Demo
'Campaign = ' + attribution.campaign + '\n' +
'Adgroup = ' + attribution.adgroup + '\n' +
'Creative = ' + attribution.creative + '\n' +
'Click label = ' + attribution.clickLabel);
'Click label = ' + attribution.clickLabel + '\n' +
'Json response = ' + JSON.stringify(attribution.jsonResponse));
}

function eventSuccessCallback(eventSuccess) {
Expand Down Expand Up @@ -186,7 +187,8 @@ <h1 style="width:400px;height:35px;text-align:center;">Adjust Web View SDK Demo
'Campaign = ' + attribution.campaign + '\n' +
'Adgroup = ' + attribution.adgroup + '\n' +
'Creative = ' + attribution.creative + '\n' +
'Click label = ' + attribution.clickLabel);
'Click label = ' + attribution.clickLabel + '\n' +
'Json response = ' + JSON.stringify(attribution.jsonResponse));
});
}
}
Expand Down
3 changes: 1 addition & 2 deletions Adjust/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ org.gradle.parallel=true
org.gradle.configureondemand=true
android.useAndroidX=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.enableR8.fullMode=false
android.enableR8.fullMode=true
2 changes: 1 addition & 1 deletion Adjust/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Oct 06 12:16:52 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions Adjust/plugins/sdk-plugin-huawei-referrer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {
}

android {
compileSdkVersion rootProject.ext.coreCompileSdkVersion
compileSdk rootProject.ext.coreCompileSdkVersion
publishing {
multipleVariants {
allVariants()
Expand All @@ -27,7 +27,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:5.0.2'
// implementation 'com.adjust.sdk:adjust-android:5.1.0'
}

// read local properties
Expand Down
2 changes: 1 addition & 1 deletion Adjust/plugins/sdk-plugin-imei/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:5.0.2'
// implementation 'com.adjust.sdk:adjust-android:5.1.0'
}

// read local properties
Expand Down
4 changes: 2 additions & 2 deletions Adjust/plugins/sdk-plugin-meta-referrer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {
}

android {
compileSdkVersion rootProject.ext.coreCompileSdkVersion
compileSdk rootProject.ext.coreCompileSdkVersion
publishing {
multipleVariants {
allVariants()
Expand All @@ -27,7 +27,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:5.0.2'
// implementation 'com.adjust.sdk:adjust-android:5.1.0'
}

// read local properties
Expand Down
2 changes: 1 addition & 1 deletion Adjust/plugins/sdk-plugin-oaid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:5.0.2'
// implementation 'com.adjust.sdk:adjust-android:5.1.0'
implementation 'com.huawei.hms:ads-identifier:3.4.56.300'
}

Expand Down
4 changes: 2 additions & 2 deletions Adjust/plugins/sdk-plugin-samsung-clouddev/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {
}

android {
compileSdkVersion rootProject.ext.coreCompileSdkVersion
compileSdk rootProject.ext.coreCompileSdkVersion
publishing {
multipleVariants {
allVariants()
Expand All @@ -27,7 +27,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:5.0.2'
// implementation 'com.adjust.sdk:adjust-android:5.1.0'

// Add Samsung clouddev lib.
compileOnly fileTree(include: ['*.aar'], dir: 'libs')
Expand Down
4 changes: 2 additions & 2 deletions Adjust/plugins/sdk-plugin-samsung-referrer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {
}

android {
compileSdkVersion rootProject.ext.coreCompileSdkVersion
compileSdk rootProject.ext.coreCompileSdkVersion
publishing {
multipleVariants {
allVariants()
Expand All @@ -27,7 +27,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:5.0.2'
// implementation 'com.adjust.sdk:adjust-android:5.1.0'

// Add Samsung referrer lib via Maven.
implementation 'store.galaxy.samsung.installreferrer:samsung_galaxystore_install_referrer:3.0.1'
Expand Down
2 changes: 1 addition & 1 deletion Adjust/plugins/sdk-plugin-vivo-referrer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:5.0.2'
// implementation 'com.adjust.sdk:adjust-android:5.1.0'
}

// read local properties
Expand Down
2 changes: 1 addition & 1 deletion Adjust/plugins/sdk-plugin-webbridge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:5.0.2'
// implementation 'com.adjust.sdk:adjust-android:5.1.0'
}

// read local properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ var Adjust = {
if (this.adjustConfig) {
return this.adjustConfig.getSdkPrefix();
} else {
return 'web-bridge5.0.2';
return 'web-bridge5.1.0';
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ public void run() {
jsonAttribution.put("costAmount", attribution.costAmount == null || attribution.costAmount.isNaN() ? 0 : attribution.costAmount);
jsonAttribution.put("costCurrency", attribution.costCurrency == null ? JSONObject.NULL : attribution.costCurrency);
jsonAttribution.put("fbInstallReferrer", attribution.fbInstallReferrer == null ? JSONObject.NULL : attribution.fbInstallReferrer);
jsonAttribution.put("jsonResponse", attribution.jsonResponse == null ? JSONObject.NULL : new JSONObject(attribution.jsonResponse));

String command = "javascript:" + commandName + "(" + jsonAttribution.toString() + ");";
webView.loadUrl(command);
Expand Down
2 changes: 1 addition & 1 deletion Adjust/plugins/sdk-plugin-xiaomi-referrer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:5.0.2'
// implementation 'com.adjust.sdk:adjust-android:5.1.0'

// Add xiaomi referrer lib via Maven.
implementation 'com.miui.referrer:homereferrer:1.0.0.6'
Expand Down
2 changes: 1 addition & 1 deletion Adjust/sdk-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def customizePomForAar(pom) {
dependency {
groupId 'com.adjust.signature'
artifactId 'adjust-android-signature'
version '3.35.0'
version '3.35.2'
scope 'compile'
}
}
Expand Down
2 changes: 1 addition & 1 deletion Adjust/sdk-core/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# public *;
#}
-keep public class com.adjust.sdk.** { *; }
-keep class com.adjust.sdk.DeviceInfo**
-keep class com.adjust.sdk.**
-keepclassmembers class com.adjust.sdk.DeviceInfo** {*;}
-keep class com.google.android.gms.common.ConnectionResult {
int SUCCESS;
Expand Down
41 changes: 25 additions & 16 deletions Adjust/sdk-core/src/main/java/com/adjust/sdk/ActivityHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,23 +212,28 @@ public boolean hasPreinstallBeenRead() {

// region SystemLifecycleCallback
@Override public void onActivityLifecycle(final boolean foregroundOrElseBackground) {
executor.submit(() -> {
if (internalState.foregroundOrElseBackground != null
&& internalState.foregroundOrElseBackground.booleanValue()
== foregroundOrElseBackground)
{
return;
}
// received foregroundOrElseBackground is strictly different from internal state one
try {
executor.submit(() -> {
if (internalState.foregroundOrElseBackground != null
&& internalState.foregroundOrElseBackground.booleanValue()
== foregroundOrElseBackground) {
return;
}
// received foregroundOrElseBackground is strictly different from internal state one

this.internalState.foregroundOrElseBackground = foregroundOrElseBackground;
this.internalState.foregroundOrElseBackground = foregroundOrElseBackground;

if (foregroundOrElseBackground) {
onResumeI();
} else {
onPauseI();
if (foregroundOrElseBackground) {
onResumeI();
} else {
onPauseI();
}
});
} catch (Exception e) {
if (logger != null) {
logger.error("Exception while executing onActivityLifecycle task");
}
});
}
}
// endregion

Expand Down Expand Up @@ -420,8 +425,12 @@ public void isEnabled(OnIsEnabledListener onIsEnabledListener) {
executor.submit(new Runnable() {
@Override
public void run() {
onIsEnabledListener.onIsEnabledRead(isEnabledI());
}
new Handler(adjustConfig.context.getMainLooper()).post(new Runnable() {
@Override
public void run() {
onIsEnabledListener.onIsEnabledRead(isEnabledI());
}
}); }
});
}

Expand Down
2 changes: 1 addition & 1 deletion Adjust/sdk-core/src/main/java/com/adjust/sdk/Adjust.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private Adjust() {
*/
public static synchronized AdjustInstance getDefaultInstance() {
@SuppressWarnings("unused")
String VERSION = "!SDK-VERSION-STRING!:com.adjust.sdk:adjust-android:5.0.2";
String VERSION = "!SDK-VERSION-STRING!:com.adjust.sdk:adjust-android:5.1.0";

if (defaultInstance == null) {
defaultInstance = new AdjustInstance();
Expand Down
Loading