Skip to content

Commit fb67b9e

Browse files
author
AR Abdul Azeez
committed
merging from main
2 parents b109db4 + 8116c60 commit fb67b9e

File tree

7 files changed

+38
-202
lines changed

7 files changed

+38
-202
lines changed

.gitignore

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
1-
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
2-
#
3-
# If you find yourself ignoring temporary files generated by your text editor
4-
# or operating system, you probably want to add a global ignore instead:
5-
# git config --global core.excludesfile '~/.gitignore_global'
1+
# Gradle
2+
.gradle/
3+
build/
4+
*/build/
65

6+
# Local properties
7+
local.properties
8+
OneSignalSDK/local.properties
9+
Examples/OneSignalDemo/local.properties
710

8-
# Ignore all logfiles and tempfiles.
9-
/log/*.log
10-
/tmp
11+
# macOS
12+
.DS_Store
1113

12-
# built application files
13-
*.apk
14-
*.ap_
15-
16-
# files for the dex VM
17-
*.dex
14+
# IDE files
15+
.idea/
16+
*.iml
1817

19-
# Java class files
20-
*.class
18+
# Captures
19+
captures/
20+
OneSignalSDK/captures/
21+
Examples/OneSignalDemo/captures/
2122

22-
# generated files
23-
bin/
24-
gen/
23+
# GPG files
24+
*.gpg
2525

26-
# Proguard folder generated by Eclipse
27-
proguard/
26+
# Misc
27+
*.log
28+
*.tmp
29+
*.swp
30+
*.swo
2831

29-
# Examples
32+
# Node modules (if using JS tooling)
33+
node_modules/
3034

31-
.idea/
32-
Examples/.idea/
33-
Examples/AndroidStudio/
34-
Examples/OneSignalDemo/app/build/
35-
OneSignalSDK/app/build/
35+
# Android Studio
36+
*.apk
37+
*.ap_

Examples/OneSignalDemo/.idea/vcs.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

Examples/OneSignalDemo/app/app.iml

Lines changed: 0 additions & 150 deletions
This file was deleted.

Examples/OneSignalDemo/local.properties

Lines changed: 0 additions & 9 deletions
This file was deleted.

OneSignalSDK/.gitignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/common/OneSignalUtils.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ object OneSignalUtils {
1414
formatVersion(BuildConfig.SDK_VERSION)
1515
}
1616

17+
/**
18+
* Formats a version string to ensure proper lexicographical sorting.
19+
* For example, "1.2.3-beta" becomes "010203-beta", "1.20.3" becomes "010203".
20+
*/
1721
internal fun formatVersion(version: String): String {
1822
val parts = version.split("-", limit = 2)
1923
val base = parts[0].split(".")

OneSignalSDK/settings.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
gradle.rootProject {
44
allprojects {
55
group = 'com.onesignal'
6-
version = gradle.rootProject.hasProperty("SDK_VERSION") ? gradle.rootProject.getProperty("SDK_VERSION") : "x.x.x"
6+
if (!gradle.rootProject.hasProperty("SDK_VERSION") ||
7+
gradle.rootProject.getProperty("SDK_VERSION").toString().trim().isEmpty()) {
8+
throw new RuntimeException("SDK_VERSION is not defined. Please pass -PSDK_VERSION=X.Y.Z to the build or update gradle.properties.")
9+
}
10+
version = gradle.rootProject.getProperty("SDK_VERSION")
711
configurations.all {
812
resolutionStrategy.dependencySubstitution {
913
substitute(module('com.onesignal:OneSignal')).using(project(':OneSignal'))

0 commit comments

Comments
 (0)