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

Update dependencies #10

Merged
merged 17 commits into from
Oct 30, 2023
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: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Apply Spotless changes
ab5b09629010b987a738a7bbef3953b2448340df
16 changes: 8 additions & 8 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
steps:
- name: Check out code
uses: actions/[email protected]
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/[email protected]
with:
distribution: adopt
java-version: 11
java-version: 17
- uses: ./.github/actions/gradle-cache
with:
key-prefix: gradle-lint
Expand All @@ -39,11 +39,11 @@ jobs:
steps:
- name: Check out code
uses: actions/[email protected]
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/[email protected]
with:
distribution: adopt
java-version: 11
java-version: 17
- uses: ./.github/actions/gradle-cache
with:
key-prefix: gradle-APICheck
Expand All @@ -56,11 +56,11 @@ jobs:
steps:
- name: Check out code
uses: actions/[email protected]
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/[email protected]
with:
distribution: adopt
java-version: 11
java-version: 17
- uses: ./.github/actions/gradle-cache
with:
key-prefix: gradle-build
Expand All @@ -73,11 +73,11 @@ jobs:
steps:
- name: Check out code
uses: actions/[email protected]
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/[email protected]
with:
distribution: adopt
java-version: 11
java-version: 17
- uses: ./.github/actions/gradle-cache
with:
key-prefix: gradle-test
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
steps:
- name: Check out code
uses: actions/[email protected]
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/[email protected]
with:
distribution: adopt
java-version: 11
java-version: 17
- name: Release build
# assembleRelease for all modules, excluding non-library modules: samples, docs
run: ./gradlew assembleRelease -x :app:assembleRelease
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
steps:
- name: Check out code
uses: actions/[email protected]
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/[email protected]
with:
distribution: adopt
java-version: 11
java-version: 17
- name: Release build
# assembleRelease for all modules, excluding non-library modules: samples, docs
run: ./gradlew assembleRelease -x :app:assembleRelease
Expand Down
9 changes: 0 additions & 9 deletions app/api/app.api
Original file line number Diff line number Diff line change
@@ -1,9 +0,0 @@
public final class io/getstream/push/sample/BuildConfig {
public static final field APPLICATION_ID Ljava/lang/String;
public static final field BUILD_TYPE Ljava/lang/String;
public static final field DEBUG Z
public static final field VERSION_CODE I
public static final field VERSION_NAME Ljava/lang/String;
public fun <init> ()V
}

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.getstream.android.push

object Configuration {
const val compileSdk = 33
const val compileSdk = 34
const val targetSdk = 32
const val sampleTargetSdk = 33
const val minSdk = 21
Expand Down
34 changes: 16 additions & 18 deletions buildSrc/src/main/kotlin/io/getstream/android/push/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,38 @@
package io.getstream.android.push

object Versions {
internal const val ANDROID_GRADLE_PLUGIN = "7.4.0"
internal const val ANDROID_GRADLE_PLUGIN = "8.1.2"
internal const val ANDROID_JUNIT5_GRADLE_PLUGIN = "1.9.3.0"
internal const val ANDROIDX_ACTIVITY_KTX = "1.7.2"
internal const val ANDROIDX_ACTIVITY_KTX = "1.8.0"
internal const val ANDROIDX_ACTIVITY_COMPOSE = "1.6.1"
internal const val ANDROIDX_ANNOTATIONS = "1.5.0"
internal const val ANDROIDX_COMPOSE = "1.3.1"
internal const val ANDROIDX_TEST_JUNIT = "1.1.5"
internal const val ANDROIDX_KTX = "1.10.1"
internal const val COROUTINES = "1.7.1"
internal const val DETEKT_PLUGIN = "1.21.0"
internal const val DOKKA = "1.8.20"
internal const val ANDROIDX_KTX = "1.12.0"
internal const val COROUTINES = "1.7.3"
internal const val DETEKT_PLUGIN = "1.23.1"
internal const val DOKKA = "1.9.10"
internal const val DOKKASAURUS = "0.1.10"
internal const val ESPRESSO = "3.5.1"
internal const val FIREBASE_MESSAGING = "23.1.2"
internal const val FIREBASE_MESSAGING = "23.3.1"
internal const val GITVERSIONER = "0.5.0"
internal const val GRADLE_NEXUS_PUBLISH_PLUGIN = "1.1.0"
internal const val GRADLE_VERSIONS_PLUGIN = "0.44.0"
internal const val GRADLE_NEXUS_PUBLISH_PLUGIN = "1.3.0"
internal const val GRADLE_VERSIONS_PLUGIN = "0.49.0"
internal const val HUAWEI_AGCP = "1.7.3.302"
internal const val HUAWEI_PUSH = "6.7.0.300"
internal const val HUAWEI_PUSH = "6.11.0.300"
internal const val JUNIT4 = "4.13.2"
internal const val JUNIT5 = "5.9.3"
internal const val JUNIT5 = "5.10.0"
internal const val JSON = "20220924"
internal const val KFIXTURE = "0.2.0"
internal const val KLUENT = "1.73"
internal const val KOTLIN = "1.8.20"
internal const val KOTLIN = "1.9.10"
internal const val KOTLIN_BINARY_VALIDATOR = "0.13.2"
internal const val MATERIAL_COMPONENTS = "1.9.0"
internal const val MOCKITO_KOTLIN = "5.0.0"
internal const val MOCKITO = "5.3.1"
internal const val MOCKITO_KOTLIN = "5.1.0"
internal const val MOCKITO = "5.6.0"
internal const val MOSHI = "1.15.0"
internal const val OKHTTP = "4.11.0"
internal const val OKHTTP = "4.12.0"
internal const val ROBOLECTRIC = "4.10.3"
internal const val SPOTLESS = "6.7.2"
internal const val SPOTLESS = "6.20.0"
internal const val STREAM_LOG = "1.1.4"
internal const val TEST_PARAMETER_INJECTOR = "1.10"
}
Expand Down Expand Up @@ -71,7 +70,6 @@ object Dependencies {
const val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.KOTLIN}"
const val gradleVersionsPlugin = "com.github.ben-manes:gradle-versions-plugin:${Versions.GRADLE_VERSIONS_PLUGIN}"
const val gradleNexusPublishPlugin = "io.github.gradle-nexus:publish-plugin:${Versions.GRADLE_NEXUS_PUBLISH_PLUGIN}"
const val kfixture = "com.flextrade.jfixture:kfixture:${Versions.KFIXTURE}"
const val kluent = "org.amshove.kluent:kluent:${Versions.KLUENT}"
const val mockito = "org.mockito:mockito-core:${Versions.MOCKITO}"
const val mockitoKotlin = "org.mockito.kotlin:mockito-kotlin:${Versions.MOCKITO_KOTLIN}"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
22 changes: 13 additions & 9 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -130,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -198,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
public final class io/getstream/android/push/delegate/BuildConfig {
public static final field BUILD_TYPE Ljava/lang/String;
public static final field DEBUG Z
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
public fun <init> ()V
}

public abstract class io/getstream/android/push/delegate/PushDelegate {
public fun <init> (Landroid/content/Context;)V
public final fun getContext ()Landroid/content/Context;
Expand Down
2 changes: 1 addition & 1 deletion stream-android-push-delegate/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ apply from: "${rootDir}/scripts/publish-module.gradle"
apply from: "${rootDir}/scripts/android.gradle"

android {
namespace 'io.getstream.android.push.delegate'
defaultConfig {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -61,7 +62,6 @@ dependencies {

testImplementation Dependencies.json
testImplementation Dependencies.kluent
testImplementation Dependencies.kfixture
testImplementation Dependencies.mockito
testImplementation Dependencies.mockitoKotlin
testImplementation Dependencies.okhttpMockWebserver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import android.content.Context
import io.getstream.android.push.PushDevice

public abstract class PushDelegate(public val context: Context) {

/**
* Handles push message payload.
* If the payload can't be handled because doesn't contain the needed data, return false to notify you this
Expand All @@ -29,7 +28,10 @@ public abstract class PushDelegate(public val context: Context) {
* @param payload The payload to be handled.
* @return True if the payload was handled.
*/
public abstract fun handlePushMessage(metadata: Map<String, Any?>, payload: Map<String, Any?>): Boolean
public abstract fun handlePushMessage(
metadata: Map<String, Any?>,
payload: Map<String, Any?>,
): Boolean

/**
* Register a new [PushDevice]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import io.getstream.log.StreamLog

public class PushDelegateProvider : ContentProvider() {
private val logger = StreamLog.getLogger("Push:Delegate")

override fun onCreate(): Boolean {
initializeDelegates()
return true
Expand All @@ -51,10 +52,11 @@ public class PushDelegateProvider : ContentProvider() {
}

private fun Context.discoverDelegates(metadata: Bundle) {
_delegates = metadata
.keySet()
.filter { metadata.getString(it) == METADATA_VALUE }
.mapNotNull { it.toPushDelegate(this) }
_delegates =
metadata
.keySet()
.filter { metadata.getString(it) == METADATA_VALUE }
.mapNotNull { it.toPushDelegate(this) }
}

private fun String.toPushDelegate(context: Context): PushDelegate? =
Expand Down Expand Up @@ -85,7 +87,10 @@ public class PushDelegateProvider : ContentProvider() {
throw IllegalStateException("Not allowed.")
}

override fun insert(uri: Uri, values: ContentValues?): Uri? {
override fun insert(
uri: Uri,
values: ContentValues?,
): Uri? {
throw IllegalStateException("Not allowed.")
}

Expand Down
7 changes: 5 additions & 2 deletions stream-android-push-firebase/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ apply from: "${rootDir}/scripts/android.gradle"


android {
namespace 'io.getstream.android.push.firebase'
defaultConfig {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

buildConfigField 'String', 'STREAM_CHAT_VERSION', "\"$version\""
}
buildTypes {
Expand All @@ -37,6 +37,10 @@ android {
xmlReport false
}

buildFeatures {
buildConfig true
}

testOptions.unitTests {
returnDefaultValues = true
}
Expand Down Expand Up @@ -66,7 +70,6 @@ dependencies {

testImplementation Dependencies.json
testImplementation Dependencies.kluent
testImplementation Dependencies.kfixture
testImplementation Dependencies.mockito
testImplementation Dependencies.mockitoKotlin
testImplementation Dependencies.okhttpMockWebserver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import io.getstream.android.push.delegate.PushDelegateProvider
* Helper class for delegating Firebase push messages to the Stream Chat SDK.
*/
public object FirebaseMessagingDelegate {

internal var fallbackProviderName: String? = null

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ import io.getstream.log.StreamLog
/**
* Generator responsible for providing information needed to register Firebase push notifications provider
*/
public class FirebasePushDeviceGenerator @JvmOverloads constructor(
public class FirebasePushDeviceGenerator
@JvmOverloads
constructor(
private val firebaseMessaging: FirebaseMessaging = FirebaseMessaging.getInstance(),
private val providerName: String,
) : PushDeviceGenerator {
Expand All @@ -53,7 +55,7 @@ public class FirebasePushDeviceGenerator @JvmOverloads constructor(
token = it.result,
pushProvider = PushProvider.FIREBASE,
providerName = providerName,
)
),
)
} else {
logger.i { "Error: Firebase didn't returned token" }
Expand Down
7 changes: 0 additions & 7 deletions stream-android-push-huawei/api/stream-android-push-huawei.api
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
public final class io/getstream/android/push/huawei/BuildConfig {
public static final field BUILD_TYPE Ljava/lang/String;
public static final field DEBUG Z
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
public fun <init> ()V
}

public final class io/getstream/android/push/huawei/HuaweiMessagingDelegate {
public static final field INSTANCE Lio/getstream/android/push/huawei/HuaweiMessagingDelegate;
public static final fun handleRemoteMessage (Lcom/huawei/hms/push/RemoteMessage;)Z
Expand Down
Loading