Migrate to AndroidX & Update dependencies by blundell · Pull Request #508 · openid/AppAuth-Android · GitHub
Skip to content

Migrate to AndroidX & Update dependencies#508

Merged
iainmcgin merged 8 commits into
openid:masterfrom
blundell:openid/update2019
Jun 17, 2020
Merged

Migrate to AndroidX & Update dependencies#508
iainmcgin merged 8 commits into
openid:masterfrom
blundell:openid/update2019

Conversation

@blundell

@blundell blundell commented Dec 13, 2019

Copy link
Copy Markdown
Collaborator

Migrates from the support library to AndroidX
Updates gradle from v4 to v5
Bumps the compile sdk to 29 alongside the gradle plugin & build tools.

Supercedes #465
Relates to #438
Fixed AndroidX issue mentioned in #444

- this requires bumping build tools to 29
- also updating the gradlewrapper (again, fully) to 5.4.1
This required changes to checkstyle & javadocs gradle files
(perhaps because of jetifier? not sure tbh)
Also mockito now can mock all final classes
@iainmcgin

Copy link
Copy Markdown
Member

@hnljp

hnljp commented Jan 10, 2020 via email

Copy link
Copy Markdown
Contributor

@karensg

karensg commented Jan 23, 2020

Copy link
Copy Markdown

@blundell Thanks for your PR! Any idea when we can get this merged?

@victoruriarte

Copy link
Copy Markdown

I have the original Appauth-Android project and I just downloaded this with androidx compatibility. I have copied the original json data to this project but it doesn't login to keycloak, it always returns error. Any compatibility issue?

@jajmo

jajmo commented May 8, 2020

Copy link
Copy Markdown

@victoruriarte I use this branch locally in one of my projects with Keycloak without error. What errors are you getting?

@CurtesMalteser

Copy link
Copy Markdown

There's any plan to merge these changes?
Or even update the project any time soon?

@ptc-nshroff

Copy link
Copy Markdown

I have the same query. Do we plan to merge this soon?

@CurtesMalteser

CurtesMalteser commented Jun 2, 2020

Copy link
Copy Markdown

In fact if there's the need for help with test something and eventually contribute with some work, let me know.
I really would like to see this project updated.

@jajmo

jajmo commented Jun 2, 2020

Copy link
Copy Markdown

@iainmcgin any plans on merging this in?

@CurtesMalteser

Copy link
Copy Markdown

I see that that the problem isn't just update to AndroidX. The library is very deprecated. Starting with usage of AsyncTaskManager to assertJ Android from square that isn't maintained.

@iainmcgin

Copy link
Copy Markdown
Member

I am checking with @blundell whether he has signed the OpenID CLA; until I have that I can't merge their changes.

@CurtesMalteser

Copy link
Copy Markdown

Thank you @iainmcgin. Good news.
By deprecated I mean that AsyncTask as well as AsyncTaskLoader have been deprecated.
These were replaced by Kotlin Coroutines.
If the idea is to keep this project alive there's a lot of work to be done to recover it.
Maybe openID needs some help.

@iainmcgin

Copy link
Copy Markdown
Member

There's no need to over-dramatize; the deprecated pieces you're talking about are a tiny portion of the library. Submit a PR, follow the requirements in CONTRIBUTING.md, and it will be fixed.

@CurtesMalteser

Copy link
Copy Markdown

I totally agree.
1- Just need to Kotlin support and add coroutines to replace all asyncTask and asyncTaskLoader.
2 - Or replace by RxJava.
Is this ok for you?
I would go with Kotlin and use Kotlin serialization too.
The first is a matter of personal choice, but the second is the way to keep it working in Java.
But isn't a simple task and I don't promise I can do it with so much work.
It just turn out that this lib became one requirement at my job.

@iainmcgin

Copy link
Copy Markdown
Member

As much as I like Kotlin, I don't want to make it a core component of this library as there are still many users with exclusively Java based codebases. If we do anything with Kotlin, it should be in an extension library, which shouldn't be too difficult to layer on top of this.

Re: AsyncTask in particular, I see the deprecation advice now (if not relying on Kotlin) is to use the java.util.concurrent related types directly. The usage is internal, I don't see any places where we directly expose use of AsyncTask so it shouldn't be too difficult to migrate. If we use an Executor for background processing, we could allow clients of the library to provide their own Executor implementation if necessary.

Probably the more relevant change to support Kotlin coroutines would be to provide Future based alternatives to the methods that take callback parameters right now, like AuthorizationService.performTokenRequest or AuthState.performActionWithFreshTokens. Futures would make it easier to wrap such calls in coroutines.

It just turn out that this lib became one requirement at my job.

Then please do contribute. This library isn't a core part of my job anymore, which is why I've been looking for a new maintainer (see #444). I still care a lot about OAuth2 / OpenID Connect, but I can't and shouldn't be the only person maintaining this.

@hnljp hnljp mentioned this pull request Jun 13, 2020
@CurtesMalteser

CurtesMalteser commented Jun 16, 2020

Copy link
Copy Markdown

@iainmcgin there's also an issue when moving to Android Studio 4. There are changes on new gradle plugin. Maybe you can help me solve it.

@iainmcgin

Copy link
Copy Markdown
Member

@blundell has assured me that he signed the CLA and while it his name hasn't appeared on the list yet I don't want to delay this further, so I'll merge now.

@iainmcgin iainmcgin merged commit eed3eef into openid:master Jun 17, 2020
@ptc-nshroff

Copy link
Copy Markdown

@iainmcgin Thanks for merging this code. When can we expect a new .aar file to use?

@iainmcgin

Copy link
Copy Markdown
Member

You should be able to use jitpack until I cut a new tagged release:

https://jitpack.io/#openid/AppAuth-Android/27b62d5da9

@ptc-nshroff

Copy link
Copy Markdown

Got it. Thanks @iainmcgin

athilahs added a commit to Skyscanner/AppAuth-Android that referenced this pull request Aug 17, 2020
* Minor README fixes (openid#351)

Thanks to @celphy for spotting these mistakes.

* Add WeWork to AUTHORS

WeWork, as my employer, is now the copyright owner for my
contributions to AppAuth.

* Dependency version bump

* Handle CustomTabsSession.newSession failures

Fixes openid#315.

* Enable Java 8 language features

* Do not automatically pass scope on token exchange request

Fixes openid#297.

* Do not override tab title setting

Fixes openid#358.

* Firefox customtabs (openid#378)

Add support for custom tabs in Firefox. Support for custom tabs was added to stable Firefox in version 57.0

Fixes: openid#368
Signed-off-by: Henning Nielsen Lund <henning.n.lund@jp.dk>

* Respect default browser of the user (openid#379)

Correctly orders the user's preferred browser to the start of the returned list.

* Custom Tabs was first added in Samsung Internet 4.0 (openid#383)

At the moment all versions of the Samsung Internet Browser is set to support Custom Tabs. Support for Custom Tabs was first added in version 4.0.

fixes: openid#382

* add getBrowserDescriptor() (openid#388)

Make it possible to get the BrowserDescriptor used by AuthorizationService.

fixes: openid#387
Signed-off-by: Henning Nielsen Lund <henning.n.lund@jp.dk>

* Android gradle plugin version bump

* Implement ID Token validation according to OIDC spec (openid#385)

Validate ID Tokens (if any) on TokenResponses according to http://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation

* Add Øyvind to the contributors list

* Update CONTRIBUTORS with email (openid#397)

* Use CustomTabsService.ACTION_CUSTOM_TABS_CONNECTION in BrowserSelector. (openid#411)

* This helps with the jetification. I produced an artifact locally,
  and wrote a sample app using:

  ```gradle
  implementation 'androidx.appcompat:appcompat:1.0.0-rc02'
  implementation 'androidx.browser:browser:1.0.0-rc02'
  ```

  to make sure that the app works.

Fixes: openid#395

* Issue openid#402: fixes NPE in case input stream is null (openid#414)

* Fix spelling mistake

* Update link to custom tabs documentation

* Fix typo in README.md (openid#455)

* Fix `Using access tokens` snippet in the readme (openid#510)

The snippet code in the `Using access tokens` section didn't follow java code formatting.

* Use capitalized form for "Bearer" token type

While this is case-insensitive, some provider implementations do not correctly handle the lower case form.

* Migrate to AndroidX & Update dependencies (openid#508)

* gradle update to 5.4.1

* gradle plugin update to 3.5.3

* minor bintray update

* bump compile sdk to 29

- this requires bumping build tools to 29
- also updating the gradlewrapper (again, fully) to 5.4.1

* Migrate to AndroidX

This required changes to checkstyle & javadocs gradle files
(perhaps because of jetifier? not sure tbh)
Also mockito now can mock all final classes

* Fix compiler warning

* update travis build tools to 29.0.2 to align with build.gradle

* update travis android sdk version to 29 to align with build.gradle

* Android11 support (openid#558)

- Migrated from the deprecated Android Support libraries to the newest versions of the AndroidX libraries.
- The Android gradle plugin is updated to the current 4.0.0.
- Glide is updated to the current 4.11.0, and 4.1x.x is needed for AndroidX support.
- limit the allowed queries to only fullbrowsers - openid#554 .
- Add support for CATEGORY_APP_BROWSER.
- Update dependencies

* Deprecate whitelist and blacklist (openid#555)

* Replace BrowserBlacklist with BrowserDenyList and BrowserWhitelist with BrowserAllowList

* Add xmlpull library dependency for tests because some of the unit tests fail without it.

* Override constructors and add a deprecation migration test

* Update library version to 0.8.0-skyscanner

* Fix build after upgrading gradle plugin (as result of syncing up with openid repo)

Co-authored-by: Iain McGinniss <iainmcgin@gmail.com>
Co-authored-by: Iain McGinniss <iain.mcginniss@wework.com>
Co-authored-by: Henning Lund <40355805+hnljp@users.noreply.github.com>
Co-authored-by: Øyvind Robertsen <oyvindrobertsen@gmail.com>
Co-authored-by: Rahul Ravikumar <tikurahul@users.noreply.github.com>
Co-authored-by: Thomas Rebouillon <thomas.rebouillon@gmail.com>
Co-authored-by: Mark Kowalski <mark.kowalski86@googlemail.com>
Co-authored-by: Ahmad El-Melegy <ahmad.melegy@gmail.com>
Co-authored-by: Paul Blundell <blundell.app.dev@gmail.com>
Co-authored-by: Jon F Hancock <jonfhancock@gmail.com>
Co-authored-by: Athila Santos <athilahs>
@agologan agologan mentioned this pull request Jan 13, 2021

@AbuIman585 AbuIman585 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Test

@blundell blundell deleted the openid/update2019 branch May 16, 2023 13:47
@cumcum8197

Copy link
Copy Markdown

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.

10 participants