File tree 11 files changed +25
-21
lines changed
java/com/onesignal/sdktest/application
notifications/src/main/java/com/onesignal/notifications/internal/display/impl
11 files changed +25
-21
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ plugins {
3
3
}
4
4
5
5
android {
6
+ namespace ' com.onesignal.sdktest'
6
7
compileSdkVersion 34
7
8
defaultConfig {
8
9
minSdkVersion 21
@@ -61,10 +62,11 @@ android {
61
62
}
62
63
63
64
task flavorSelection() {
64
- if (getGradle(). getStartParameter(). getTaskRequests(). toString(). contains(" Gms" )) {
65
+ def tasksList = gradle. startParameter. taskRequests. toString()
66
+ if (tasksList. contains(' Gms' )) {
65
67
apply plugin : ' com.google.gms.google-services'
66
68
googleServices { disableVersionCheck = true }
67
- } else {
69
+ } else if (tasksList . contains( ' Huawei ' )) {
68
70
apply plugin : ' com.huawei.agconnect'
69
71
}
70
72
}
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<manifest xmlns : android =" http://schemas.android.com/apk/res/android"
3
3
xmlns : tools =" http://schemas.android.com/tools"
4
- xmlns : amazon =" http://schemas.amazon.com/apk/res/android"
5
- package =" com.onesignal.sdktest" >
4
+ xmlns : amazon =" http://schemas.amazon.com/apk/res/android" >
6
5
7
6
<uses-permission android : name =" com.android.vending.BILLING" />
8
7
Original file line number Diff line number Diff line change 21
21
import com .onesignal .notifications .IDisplayableNotification ;
22
22
import com .onesignal .notifications .INotificationLifecycleListener ;
23
23
import com .onesignal .notifications .INotificationWillDisplayEvent ;
24
- import com .onesignal .sdktest .BuildConfig ;
25
24
import com .onesignal .sdktest .R ;
26
25
import com .onesignal .sdktest .constant .Tag ;
27
26
import com .onesignal .sdktest .constant .Text ;
@@ -39,9 +38,8 @@ public class MainApplication extends MultiDexApplication {
39
38
private static final int SLEEP_TIME_TO_MIMIC_ASYNC_OPERATION = 2000 ;
40
39
41
40
public MainApplication () {
42
- // run strict mode default in debug mode to surface any potential issues easier
43
- if (BuildConfig .DEBUG )
44
- StrictMode .enableDefaults ();
41
+ // run strict mode to surface any potential issues easier
42
+ StrictMode .enableDefaults ();
45
43
}
46
44
47
45
@ SuppressLint ("NewApi" )
Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ buildscript {
12
12
maven { url ' https://developer.huawei.com/repo/' }
13
13
}
14
14
dependencies {
15
- classpath ' com.android.tools.build:gradle:7.2 .2'
15
+ classpath ' com.android.tools.build:gradle:8.8 .2'
16
16
classpath ' com.google.gms:google-services:4.3.10'
17
- classpath ' com.huawei.agconnect:agcp:1.6.2.300 '
17
+ classpath ' com.huawei.agconnect:agcp:1.9.1.304 '
18
18
19
19
// TODO: Do not place your application dependencies here; they belong
20
20
// in the individual module build.gradle files
Original file line number Diff line number Diff line change 1
1
distributionBase =GRADLE_USER_HOME
2
2
distributionPath =wrapper/dists
3
- distributionUrl =https\://services.gradle.org/distributions/gradle-7.3.3 -all.zip
3
+ distributionUrl =https\://services.gradle.org/distributions/gradle-8.10.2 -all.zip
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ buildscript {
8
8
targetSdkVersion : 34 ,
9
9
minSdkVersion : 21
10
10
]
11
- androidGradlePluginVersion = ' 7.2.0 '
11
+ androidGradlePluginVersion = ' 8.8.2 '
12
12
googleServicesGradlePluginVersion = ' 4.3.10'
13
- huaweiAgconnectVersion = ' 1.6.2.300 '
13
+ huaweiAgconnectVersion = ' 1.9.1.304 '
14
14
huaweiHMSPushVersion = ' 6.3.0.304'
15
15
huaweiHMSLocationVersion = ' 4.0.0.300'
16
16
kotlinVersion = ' 1.7.10'
Original file line number Diff line number Diff line change 23
23
# Remove when creating an .aar build.
24
24
# android.enableAapt2=false
25
25
26
- android.databinding.incremental = false
27
- kapt.incremental.apt = false
28
- android.testConfig.useRelativePath = false
26
+ org.gradle.jvmargs =-Xmx1536m
29
27
30
28
# Enables D8 for all modules.
31
29
android.enableD8 = true
Original file line number Diff line number Diff line change 1
1
distributionBase =GRADLE_USER_HOME
2
2
distributionPath =wrapper/dists
3
- distributionUrl =https\://services.gradle.org/distributions/gradle-7.3.3 -all.zip
3
+ distributionUrl =https\://services.gradle.org/distributions/gradle-8.10.2 -all.zip
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
Original file line number Diff line number Diff line change 1
1
plugins {
2
2
id ' com.android.library'
3
+ // There isn't Kotlin or Java code in this top-level project,
4
+ // however consumers look for an .aar file, which this causes it
5
+ // to be created.
6
+ id ' kotlin-android'
3
7
}
4
8
5
9
android {
@@ -25,6 +29,8 @@ android {
25
29
targetCompatibility JavaVersion . VERSION_1_8
26
30
}
27
31
namespace ' com.onesignal'
32
+
33
+ kotlinOptions. freeCompilerArgs + = [' -module-name' , namespace]
28
34
}
29
35
30
36
ext {
Original file line number Diff line number Diff line change @@ -66,7 +66,9 @@ afterEvaluate {
66
66
67
67
publications {
68
68
release(MavenPublication ) {
69
- from components. release
69
+ afterEvaluate {
70
+ from components. findByName(' release' )
71
+ }
70
72
71
73
pom {
72
74
name = projectName
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import android.net.Uri
12
12
import android.os.Build
13
13
import androidx.core.app.NotificationCompat
14
14
import com.onesignal.common.AndroidUtils
15
- import com.onesignal.core.R
16
15
import com.onesignal.core.internal.application.IApplicationService
17
16
import com.onesignal.debug.internal.logging.Logging
18
17
import com.onesignal.notifications.internal.bundle.impl.NotificationBundleProcessor
@@ -231,9 +230,9 @@ internal class NotificationDisplayBuilder(
231
230
if (bitmap == null ) return null
232
231
try {
233
232
val systemLargeIconHeight =
234
- contextResources!! .getDimension(R .dimen.notification_large_icon_height).toInt()
233
+ contextResources!! .getDimension(android. R .dimen.notification_large_icon_height).toInt()
235
234
val systemLargeIconWidth =
236
- contextResources!! .getDimension(R .dimen.notification_large_icon_width).toInt()
235
+ contextResources!! .getDimension(android. R .dimen.notification_large_icon_width).toInt()
237
236
val bitmapHeight = bitmap.height
238
237
val bitmapWidth = bitmap.width
239
238
if (bitmapWidth > systemLargeIconWidth || bitmapHeight > systemLargeIconHeight) {
You can’t perform that action at this time.
0 commit comments