Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ jobs:
version: ${{ github.event.inputs.version }}
branch: ${{ github.event.inputs.branch }}
dependencies: Core ${{ github.event.inputs.core-dependency }}
paths: code/gradle.properties, code/notificationbuilder/src/main/java/com/adobe/marketing/mobile/notificationbuilder/NotificationBuilder.kt
paths: code/gradle.properties, code/notificationbuilder/src/main/java/com/adobe/marketing/mobile/notificationbuilder/NotificationBuilderConstants.kt
update: true
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import android.content.Intent
import androidx.core.app.NotificationCompat
import com.adobe.marketing.mobile.notificationbuilder.NotificationBuilder.constructNotificationBuilder
import com.adobe.marketing.mobile.notificationbuilder.NotificationBuilderConstants.TAG
import com.adobe.marketing.mobile.notificationbuilder.NotificationBuilderConstants.VERSION
import com.adobe.marketing.mobile.notificationbuilder.PushTemplateConstants.LOG_TAG
import com.adobe.marketing.mobile.notificationbuilder.internal.PushTemplateType
import com.adobe.marketing.mobile.notificationbuilder.internal.builders.AutoCarouselNotificationBuilder
Expand Down Expand Up @@ -52,8 +54,6 @@
* [AEPPushTemplate] or [Intent].
*/
object NotificationBuilder {
private const val SELF_TAG = "NotificationBuilder"
private const val VERSION = "3.0.3"

@JvmStatic
fun version(): String {
Expand Down Expand Up @@ -157,7 +157,7 @@
else -> {
Log.warning(
LOG_TAG,
SELF_TAG,
TAG,

Check warning on line 160 in code/notificationbuilder/src/main/java/com/adobe/marketing/mobile/notificationbuilder/NotificationBuilder.kt

View check run for this annotation

Codecov / codecov/patch

code/notificationbuilder/src/main/java/com/adobe/marketing/mobile/notificationbuilder/NotificationBuilder.kt#L160

Added line #L160 was not covered by tests
"Unknown carousel push template type, creating a legacy style notification."
)
return LegacyNotificationBuilder.construct(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
Copyright 2025 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

package com.adobe.marketing.mobile.notificationbuilder

/**
* This object holds all constant values for the NotificationBuilder object.
*/
internal object NotificationBuilderConstants {
internal const val TAG = "NotificationBuilder"
internal const val VERSION = "3.0.3"
}
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class NotificationBuilderTests {
fun `NotificationBuilder version values matches the expected version`() {
val version = NotificationBuilder.version()

assertEquals("3.0.3", version)
assertEquals(NotificationBuilderConstants.VERSION, version)
}

@Test
Expand Down