Skip to content

Commit

Permalink
🚀 4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemilla committed Jul 18, 2024
1 parent 6bf6461 commit d54f022
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 33 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
.externalNativeBuild
.cxx
local.properties
keystore.properties
app/google-services.json
Env.kt
app/release/app-release.aab
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ dependencyResolutionManagement {

```gradle
dependencies {
implementation 'com.github.trycourier:courier-android:4.0.0'
implementation 'com.github.trycourier:courier-android:4.0.1'
}
```

Expand Down
9 changes: 6 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ android {
}

namespace 'com.courier.android'
buildFeatures {
buildConfig true
}

}

Expand All @@ -45,16 +48,16 @@ dependencies {

// Internal APIs
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.android.material:material:1.12.0'
implementation 'com.google.android.flexbox:flexbox:3.0.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3'
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation 'com.google.code.gson:gson:2.11.0'

// Exposable APIs
// Exportable APIs
api 'com.google.firebase:firebase-messaging-ktx:24.0.0'
api 'androidx.recyclerview:recyclerview:1.3.2'

Expand Down
2 changes: 1 addition & 1 deletion android/src/main/java/com/courier/android/Courier.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Courier private constructor(internal val context: Context) : Application.A

// Core
var USER_AGENT = CourierAgent.NATIVE_ANDROID
internal const val VERSION = "4.0.0"
internal const val VERSION = "4.0.1"
internal const val TAG = "Courier SDK"

// Push
Expand Down
22 changes: 19 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ plugins {
id 'com.google.gms.google-services'
}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file("keystore.properties")
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {

compileSdk 34
Expand All @@ -12,7 +18,7 @@ android {
applicationId "com.courier.example"
minSdk 23
targetSdk 34
versionCode 29
versionCode 38
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.debug
Expand All @@ -22,11 +28,21 @@ android {
checkReleaseBuilds false
}

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}

buildTypes {
release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
compileOptions {
Expand Down Expand Up @@ -54,7 +70,7 @@ dependencies {

implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.7'
Expand All @@ -64,6 +80,6 @@ dependencies {
implementation 'com.google.code.gson:gson:2.11.0'

// Firebase
implementation platform('com.google.firebase:firebase-bom:33.1.1')
implementation platform('com.google.firebase:firebase-bom:33.1.2')

}
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ buildscript {
}

plugins {
id 'com.android.application' version '7.3.0' apply false
id 'com.android.library' version '7.3.0' apply false
id 'org.jetbrains.kotlin.android' version '1.7.0' apply false
id 'com.android.application' version '8.3.1' apply false
id 'com.android.library' version '8.3.1' apply false
id 'org.jetbrains.kotlin.android' version '1.9.23' apply false
}

task clean(type: Delete) {
Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ kotlin.code.style=official
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false
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.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
29 changes: 17 additions & 12 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# 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"'
# 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 @@ -133,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 @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi

# 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.

# 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, 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
4 changes: 4 additions & 0 deletions keystore.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
storeFile=/Users/mike/Desktop/keys/keystore.jks
storePassword=12341234
keyAlias=key0
keyPassword=12341234
12 changes: 6 additions & 6 deletions scripts/build_demo_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ rm "app/build.gradle.bak"

echo "Version code incremented from $CURRENT_VERSION_CODE to $NEW_VERSION_CODE"

# Build the app for release
# Build the app bundle for release
./gradlew clean
./gradlew assembleRelease
./gradlew bundleRelease

# Check if the build was successful
if [ $? -ne 0 ]; then
echo "Failed to build the app for release"
echo "Failed to build the app bundle for release"
exit 1
fi

echo "App built successfully for release"
echo "App bundle built successfully for release"

# Open the folder where the release APK is located
RELEASE_FOLDER="./app/build/outputs/apk/release/"
# Open the folder where the release AAB is located
RELEASE_FOLDER="./app/build/outputs/bundle/release/"
open "$RELEASE_FOLDER"

echo "Opened folder: $RELEASE_FOLDER"
2 changes: 1 addition & 1 deletion scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
cd "$(dirname "$0")/.." || { echo "Failed to change to root directory"; exit 1; }

# Use a specific Gradle version (if needed)
./gradlew wrapper --gradle-version 8.0.2
./gradlew wrapper --gradle-version 8.4

# Prompt user to start emulator manually
echo "🚧 Please start the emulator manually. Press Enter to continue."
Expand Down

0 comments on commit d54f022

Please sign in to comment.