Skip to content

Commit

Permalink
Merge pull request #83 from makeen-project/ALS-1806
Browse files Browse the repository at this point in the history
[ALS-1806] Removed amplify libraries, updated dependencies, and added/modified unit and E2E test cases
  • Loading branch information
wadhawh authored Sep 25, 2024
2 parents 94054c6 + 5ed9999 commit 25b40e3
Show file tree
Hide file tree
Showing 193 changed files with 9,873 additions and 8,914 deletions.
50 changes: 6 additions & 44 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ concurrency:
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches: [ develop, main, master ]
jobs:
startSlackNotification:
name: Slack Starting Notification
Expand Down Expand Up @@ -38,12 +40,11 @@ jobs:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3

- name: Setup Bundler
- name: Set up Ruby with rbenv
run: |
bundle config --local path ./vendor/bundle
bundle config --local deployment true
bundle install
rbenv install -s 3.3.5
rbenv local 3.3.5
bundle install
- name: Setup Signing
working-directory:
Expand All @@ -53,45 +54,6 @@ jobs:
base64 -d <<< ${{ secrets.SECRETS }} > custom.properties
ls .signing
- name: e2e tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 34
arch: arm64-v8a
target: playstore
avd-name: test
force-avd-creation: false
disable-animations: true
script: |
adb uninstall com.aws.amazonlocation
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.DefaultConnectionFlowSuite
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.DefaultConnectionFlowSuite2
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSConnectionSuite
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSSignInSuite
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingStartTrackingTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingStopTrackingTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingDeleteTrackingHistoryTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingStartTrackingHistoryLoggedTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingStartTrackingMapDisplayTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.GeofenceAddTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingGeofenceEnterTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingGeofenceExitTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingDeleteTrackingHistoryTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.GeofenceEditTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.GeofenceDeleteTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.SettingSignOutTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.SettingSignInTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.SettingAWSDisconnectingTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.ConnectToAWSTest
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: app/build/reports/androidTests/connected/
retention-days: 1

- name: Build APK
run: |
export BUILD_NUM=$((${{ github.run_number }}))
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/lint-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Ruby 3.3.5
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.5

- name: Setup Bundler
run: |
bundle config --local path ./vendor/bundle
Expand Down
17 changes: 1 addition & 16 deletions .github/workflows/test-android-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,7 @@ jobs:
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.DefaultConnectionFlowSuite
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.DefaultConnectionFlowSuite2
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSConnectionSuite
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSSignInSuite
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingStartTrackingTest
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingStopTrackingTest
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingDeleteTrackingHistoryTest
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingStartTrackingHistoryLoggedTest
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingStartTrackingMapDisplayTest
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.GeofenceAddTest
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingGeofenceEnterTest
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingGeofenceExitTest
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingDeleteTrackingHistoryTest
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.GeofenceEditTest
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.GeofenceDeleteTest
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.SettingSignOutTest
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.SettingSignInTest
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.SettingAWSDisconnectingTest
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.ConnectToAWSTest
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSConnectionSuite2
- name: Upload test results
uses: actions/upload-artifact@v4
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Ruby 3.3.5
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.5

- name: Setup Bundler
run: |
bundle config --local path ./vendor/bundle
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
source "https://rubygems.org"
ruby "3.3.5"

gem "fastlane"
eval_gemfile("fastlane/Pluginfile")
37 changes: 20 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.959.0)
aws-sdk-core (3.201.3)
aws-partitions (1.976.0)
aws-sdk-core (3.206.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.88.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sdk-kms (1.91.0)
aws-sdk-core (~> 3, >= 3.205.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.156.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sdk-s3 (1.162.0)
aws-sdk-core (~> 3, >= 3.205.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.9.1)
aws-sigv4 (1.10.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
Expand Down Expand Up @@ -135,7 +135,7 @@ GEM
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.31.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.7.0)
google-cloud-core (1.7.1)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
Expand All @@ -156,12 +156,12 @@ GEM
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.6)
http-cookie (1.0.7)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.7.2)
jwt (2.8.2)
jwt (2.9.0)
base64
mini_magick (4.13.2)
mini_mime (1.1.5)
Expand All @@ -180,8 +180,7 @@ GEM
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.3.6)
strscan
rexml (3.3.7)
rouge (2.0.7)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
Expand All @@ -194,7 +193,6 @@ GEM
simctl (1.6.10)
CFPropertyList
naturally
strscan (3.1.0)
terminal-notifier (2.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
Expand All @@ -204,14 +202,15 @@ GEM
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unicode-display_width (2.5.0)
unicode-display_width (2.6.0)
word_wrap (1.0.0)
xcodeproj (1.19.0)
xcodeproj (1.25.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (>= 3.3.2, < 4.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
Expand All @@ -220,6 +219,7 @@ GEM
PLATFORMS
arm64-darwin-22
ruby
x64-mingw-ucrt
x86_64-darwin-20
x86_64-linux

Expand All @@ -229,5 +229,8 @@ DEPENDENCIES
fastlane-plugin-firebase_app_distribution
fastlane-plugin-versioning_android

RUBY VERSION
ruby 3.3.5

BUNDLED WITH
2.2.27
2.5.18
17 changes: 1 addition & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,22 +134,7 @@ Note:
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.DefaultConnectionFlowSuite
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.DefaultConnectionFlowSuite2
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSConnectionSuite
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSSignInSuite
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingStartTrackingTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingStopTrackingTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingDeleteTrackingHistoryTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingStartTrackingHistoryLoggedTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingStartTrackingMapDisplayTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.GeofenceAddTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingGeofenceEnterTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingGeofenceExitTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.TrackingDeleteTrackingHistoryTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.GeofenceEditTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.GeofenceDeleteTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.SettingSignOutTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.SettingSignInTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.SettingAWSDisconnectingTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.main.ConnectToAWSTest
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSConnectionSuite2

## Resources
> Maps (Name - Style)
Expand Down
65 changes: 25 additions & 40 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ android {
defaultConfig {
applicationId "com.aws.amazonlocation"
minSdk 24
//noinspection OldTargetApi
targetSdk 34
versionCode 44
versionName "1.0.1"
Expand Down Expand Up @@ -94,41 +93,32 @@ android {
unitTests {
includeAndroidResources = true
}
unitTests.all {
jacoco {
jvmArgs '-noverify'
}
}
}
bundle {
language {
enableSplit = false
}
}
packagingOptions {
exclude "lib/armeabi/**"
}
lint {
disable 'IconLauncherShape', 'Overdraw', 'IconDensities', 'IconDipSize', 'IconDuplicatesConfig'
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// noinspection GradleDependency
implementation 'androidx.core:core-ktx:1.8.0'
// noinspection GradleDependency
implementation 'androidx.appcompat:appcompat:1.6.0'
// noinspection GradleDependency
implementation 'com.google.android.material:material:1.6.1'
// noinspection GradleDependency
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
// noinspection GradleDependency
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
// noinspection GradleDependency
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
// noinspection GradleDependency
androidTestImplementation "androidx.test.espresso:espresso-contrib:3.3.0"
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
androidTestImplementation "androidx.test.espresso:espresso-contrib:3.6.1"
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'

implementation 'androidx.test.espresso:espresso-web:3.6.1'
// Testing
testImplementation 'androidx.test:monitor:1.7.1'
testImplementation 'androidx.test.ext:junit-ktx:1.2.1'
Expand All @@ -138,7 +128,7 @@ dependencies {
testImplementation 'org.mockito:mockito-core:4.7.0'
testImplementation "org.mockito.kotlin:mockito-kotlin:3.2.0"
testImplementation "org.mockito:mockito-inline:3.11.1"
testImplementation 'org.robolectric:robolectric:4.11'
testImplementation 'org.robolectric:robolectric:4.13'
testImplementation 'app.cash.turbine:turbine:0.12.3'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
// hilt test
Expand All @@ -147,33 +137,28 @@ dependencies {
kaptAndroidTest 'com.google.dagger:hilt-android-compiler:2.48'
androidTestImplementation "com.google.dagger:hilt-android-testing:2.48"

// noinspection GradleDependency
implementation 'com.google.dagger:hilt-android:2.48'
// noinspection GradleDependency
kapt 'com.google.dagger:hilt-android-compiler:2.48'
// noinspection GradleDependency
implementation 'androidx.activity:activity-ktx:1.8.0'
implementation 'androidx.activity:activity-ktx:1.9.1'
// pref
implementation "androidx.preference:preference-ktx:1.2.1"
// Amplify core dependency
implementation 'com.amplifyframework:core:2.20.0'
implementation 'com.amplifyframework:aws-auth-cognito:2.20.0'
implementation 'com.amplifyframework:aws-geo-location:2.20.0'
implementation 'com.amplifyframework:maplibre-adapter:2.20.0'
// noinspection GradleDependency
implementation 'com.amazonaws:aws-android-sdk-core:2.72.0'
implementation('com.amazonaws:aws-android-sdk-cognitoauth:2.72.0@aar')
implementation 'com.amazonaws:aws-android-sdk-mobile-client:2.72.0'
implementation 'com.amazonaws:aws-android-sdk-location:2.72.0'
implementation 'com.amazonaws:aws-android-sdk-iot:2.72.0'
implementation 'com.amazonaws:aws-android-sdk-pinpoint:2.72.0'
implementation 'com.amazonaws:aws-android-sdk-mobile-client:2.72.0'

implementation "org.maplibre.gl:android-sdk:11.0.0"
implementation "org.maplibre.gl:android-plugin-annotation-v9:3.0.0"
implementation("software.amazon.location:auth:0.2.5")
implementation("com.google.android.gms:play-services-location:21.3.0")

implementation "androidx.navigation:navigation-fragment-ktx:2.7.7"
implementation "androidx.navigation:navigation-ui-ktx:2.7.7"
implementation "androidx.fragment:fragment-ktx:1.8.2"

implementation("aws.sdk.kotlin:iot:1.2.28")
implementation("com.amazonaws:aws-iot-device-sdk-java:1.3.9")
implementation("aws.sdk.kotlin:location:1.2.21")
implementation("aws.sdk.kotlin:cognitoidentity:1.2.21")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
// Support for Java 8 features
// noinspection GradleDependency
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
}

idea.project.settings {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import com.aws.amazonlocation.domain.repository.AuthRepository
import com.aws.amazonlocation.domain.repository.GeofenceRepository
import com.aws.amazonlocation.domain.repository.LocationSearchRepository
import com.aws.amazonlocation.utils.AWSLocationHelper
import com.aws.amazonlocation.utils.AmplifyHelper
import com.aws.amazonlocation.utils.BottomSheetHelper
import com.aws.amazonlocation.utils.MapHelper
import com.aws.amazonlocation.utils.PreferenceManager
Expand Down Expand Up @@ -37,14 +36,6 @@ object AppModuleTest {
fun getAWSLocationHelper(mMapHelper: MapHelper, mPreferenceManager: PreferenceManager) =
AWSLocationHelper(mMapHelper, mPreferenceManager)

@Provides
@Singleton
fun amplifyHelperInit(
@ApplicationContext appContext: Context,
mPreferenceManager: PreferenceManager
) =
AmplifyHelper(appContext, mPreferenceManager)

@Provides
@Singleton
fun getBottomSheetUtils() =
Expand Down
Loading

0 comments on commit 25b40e3

Please sign in to comment.