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

staging -> main for 2.0.0 release #99

Merged
merged 58 commits into from
Jan 31, 2023
Merged

staging -> main for 2.0.0 release #99

merged 58 commits into from
Jan 31, 2023

Conversation

emdobrin
Copy link
Contributor

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

prudrabhat and others added 30 commits November 16, 2022 08:44
* Upgrade AGP, Gradle, language dependencies

- Upgrades
   - Gradle distribution 7.5
   - Gradle 7.3.1
   - Java 1.8
   - Kotlin 1.6.2
   - jacoco 0.8.8
- Expand .gitignore
- Restructure plugin declarations
- Fix functional test configuration (dex, androidx.test:core))

* Fix javadoc task

* Fix app namespace warning

* Address review comments

- remove *Version suffix for sdk options in gradle
- switch to gradle 7.3.0
- Use `required` instead of `enabled` for xml, csv, html reports
- Remove aar maven upload script

* Fix namespace warning and rename variable

* Enable multidex only for debug builds

Functional tests will fail without this flag as this module exceeds the DEX limit.
It is sufficient to enable this for debug as it is the type used for functional tests.
Consuming apps are responsible for making changes to their gradle to overcome
the DEX limit as necessary.

* Remove unneeded dependencies and variables
* Core 2.0 adoption

 - .gradle changes
    - Add jitpack to repositories
    - Consume Core 2.0 via com.github.adobe.aepsdk-core-android:core:v2.0.0-SNAPSHOT
      from jitpack
    - Prevent transitive dependencies from other extensions
    - Change moduleVersion, mavenCoreVersion to 2.0.0.

 - Change IdentityConstants.EXTENSION_VERSION to 2.0.0
 - Expose IdentityExtension.class via Idenity.EXTENSION
 - Switch to MobileCore.dispatchEventWithResponseCallback(event, timeout, callbackWithError)
   and ExtensionApi.dispatch(event)

 - Switch to using new shared state api
   - Remove multiple instance creation of SharedStateCallback.
   - Streamline shared state calls via SharedStateCallback within and
      outside the Identity extension

 - Implement IdentityExtension.onRegistered()
   - Change event listener registration to be done in onRegistered() instead of the
     IdentityExtension's constructor
 - Remove Listener*.java classes in favor of inline methods
   - Remove the inhouse executor service and mutex as the events are now incident
     via a single thread maintained by the extension container housing this extension.

 - Implement IdentityExtension.readyForEvent()
   - Add logic to wait for EventHub state and IdentityDirect registration check
     if ECID from persisted properties is unavailable.
   - Remove the logic to cache events internally. Take advantage of the Hub
     shared state fetching to boot up and disambiguate between Identity direct and
     EdgeIdentity.

 - Switch to use public utility classes and methods from Core where applicable
   - Use StringUtils.isEmpty()
   - Use JSONUtil.toMap() and JSONUtil.toList()
   - Use DataReader.opt*() to read and parse event data. Remove class cast
     exception guards and resolve unchecked cast warnings where possible.

 - General changes done on code path toched
   - private and finals where applicable
   - Use cascading constructors to eliminate constructor divergence risk and
     ease test injection

Out of scope for this PR
 - Switching to Log from MobileCore.Log
 - Switching IdentityStorageService to NamedCollection
 - Test changes
 - PowerMock elimination

* Core 2.0 adoption

 - .gradle changes
    - Add jitpack to repositories
    - Consume Core 2.0 via com.github.adobe.aepsdk-core-android:core:v2.0.0-SNAPSHOT
      from jitpack
    - Prevent transitive dependencies from other extensions
    - Change moduleVersion, mavenCoreVersion to 2.0.0.

 - Change IdentityConstants.EXTENSION_VERSION to 2.0.0
 - Expose IdentityExtension.class via Idenity.EXTENSION
 - Switch to MobileCore.dispatchEventWithResponseCallback(event, timeout, callbackWithError)
   and ExtensionApi.dispatch(event)

 - Switch to using new shared state api
   - Remove multiple instance creation of SharedStateCallback.
   - Streamline shared state calls via SharedStateCallback within and
      outside the Identity extension

 - Implement IdentityExtension.onRegistered()
   - Change event listener registration to be done in onRegistered() instead of the
     IdentityExtension's constructor
 - Remove Listener*.java classes in favor of inline methods
   - Remove the inhouse executor service and mutex as the events are now incident
     via a single thread maintained by the extension container housing this extension.

 - Implement IdentityExtension.readyForEvent()
   - Add logic to wait for EventHub state and IdentityDirect registration check
     if ECID from persisted properties is unavailable.
   - Remove the logic to cache events internally. Take advantage of the Hub
     shared state fetching to boot up and disambiguate between Identity direct and
     EdgeIdentity.

 - Switch to use public utility classes and methods from Core where applicable
   - Use StringUtils.isEmpty()
   - Use JSONUtil.toMap() and JSONUtil.toList()
   - Use DataReader.opt*() to read and parse event data. Remove class cast
     exception guards and resolve unchecked cast warnings where possible.

 - General changes done on code path toched
   - private and finals where applicable
   - Use cascading constructors to eliminate constructor divergence risk and
     ease test injection

Out of scope for this PR
 - Switching to Log from MobileCore.Log
 - Switching IdentityStorageService to NamedCollection
 - Test changes
 - PowerMock elimination

* Address review comments

- Switch to using handlers for each event listener
- Use TimeUtils where applicable
- Eliminate two calls to get event hub shared state
- Add comments and TODOs for verification and logging

* Switch to SNAPSHOT core artifact

* Change callback timeout to 500ms to match API contract
- Make IdentityStorageService methods non-static and inject from constuctor
- Rename IdentityStorageService to IdentityStorageManager
Adopt Log service and DataStoreService changes from Core 2.0
Remove Powermock and fix unit and functional tests
* Set pending shared state before updating identity map

* Create pending state when resetIdentities is called.
* Annotations, unit tests++

* Update test app

* Update registerExtension test

* Update docs
cacheung and others added 19 commits January 26, 2023 11:05
Update Documentation
Fix typo in a link
Update descriptions for related projects
Incorporated the review comment part 1
Update getting-started page format.
More update for the documentation
Update doc for the review comment
 The sample failing for adding this, will look at this later. Remove scheme change in AndroidManifest.
Update core github api links
Add deeplink to the test app and update get started doc
Update doc for v.2.0.0 and use Core MapUtils
Dev v2.0.0 -> Staging for second snapshot
Update registerExtension API doc link
Update registerExtension API doc link
* Update dependencies to core extensions

* Update dependencies
* Add Kotlin sample for API reference

* Update based on reviews
@emdobrin emdobrin requested review from addb, timkimadobe and kevinlind and removed request for timkimadobe January 31, 2023 21:42
@emdobrin emdobrin requested a review from timkimadobe January 31, 2023 21:42
@emdobrin emdobrin requested a review from cacheung January 31, 2023 21:42
Copy link
Contributor

@prudrabhat prudrabhat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emdobrin emdobrin merged commit 00a1715 into main Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants