Skip to content

Commit

Permalink
Merge pull request #631 from adjust/v510
Browse files Browse the repository at this point in the history
Version 5.1.0
  • Loading branch information
uerceg authored Jan 28, 2025
2 parents 942960d + 2dd75da commit e975ab6
Show file tree
Hide file tree
Showing 32 changed files with 97 additions and 57 deletions.
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

0 comments on commit e975ab6

Please sign in to comment.